module NumRu::Derivative in derivative.rb

todo

Index

module NumRu::Derivative

Module functions of Derivative Operater for NArray.

threepoint_O2nd_deriv(z, x, dim, bc=LINEAR_EXT)

Derivate z respect to dim th dimension with 2nd Order difference. return an NArray which result of the difference z divided difference x (in other wards,

(s**2*z_{i+1} + (t**2 - s**2)*f_{i} - t**2*f_{i-1}) / (s*t*(s + t)):
now s represents (x_{i} - x_{i-1}) ,t represents (x_{i+1} - x_{i})
and _{i} represents the suffix of {i} th element in the ((<dim>)) th 
dimension of array. ).

ARGUMENTS

RETURN VALUE

cderiv(z, x, dim, bc=LINEAR_EXT)

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

RETURN VALUE

b_expand_linear_ext(z, dim)

expand boundary with linear value. extend array with 1 grid at each boundary with dim th dimension, and assign th value which diffrential value between a grid short of boundary and boundary grid in original array. (on other wards, 2*z_{0}-z_{1} or 2*z_{n-1}-z_{n-2}: now _{i} represents the

suffix of {i} th element in the ((<dim>)) th dimension of array. ).

ARGUMENTS

RETURN VALUE

cdiff(x, dim)

Diffrence operater. return an NArray which a difference x ( in other wards, (x_{i+1} - x_{i-1}): now _{i} represents the suffix of {i} th element in the dim th dimension of array. ).

ARGUMENTS

RETURN VALUE