Derivate z
respect to dim
th dimension with center difference.
return an NArray which result of the difference z divided difference
x
( in other wards, (z_{i+1} - z_{i-1}) / (x_{i+1} - x_{i-1}):
now _{i} represents the suffix of {i} th element in the dim th
dimension of array. ).
ARGUMENTS
- z (NArray): a NArray which you want to derivative.
- x (NArray): a NArray represents the dimension which derivative respect
to. z.rank must be 1.
- dim (Numeric): a Numeric represents the dimention which derivative
respect to. you can give number count backward (dim < 0), but
z.rank + dim must be > 0.
- delta (Numeric): a Numeric represents distance between grids
which take difference.
- center (true/false): z is put on cell center in dim or not.
- bc (String) : Boundary condition.
Now
"linear_ext" (extend boundary using linear extrapolation)
"cyclic" (cyclic boundary condition)
"sym" (extrapolate by symmetric value to boundary) and
"asym" (set 0 value at boundary) are supported.
RETURN VALUE
- cderiv_data (NArray): (z_{i+delta} - z_{i}) / (x_{i+delta} - x_{i})