module NumRu::GPhys::Derivative in derivative.rb

Index

module NumRu::GPhys::Derivative

Module functions of Derivative Operater for GPhys.

threepoint_O2nd_deriv(gp, dim_or_dimname, 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(gp, dim_or_dimname, bc=LINEAR_EXT, altcoord=nil)

Derivate gp respect to dim th or dimname dimension with center difference. return a GPhys which result of the difference gp divided difference axis. ( in other wards, (z_{i+1} - z_{i-1}) / (x_{i+1} - x_{i-1}): now x is axis array which you wants to respects to, _{i} represents the suffix of {i} th element in the dim th dimension of array. ).

ARGUMENTS

RETURN VALUE

deriv2nd(gp, dim_or_dimname, bc=LINEAR_EXT, altcoord=nil)

2nd Derivate gp respect to dim th or dimname dimension covering non-uniform grids. Based on:

( (z_{i+1}-z_{i})/(x_{i+1}-x_{i}) - (z_{i}-z_{i-1})/(x_{i}-x_{i-1}) )
/ ((x_{i+1}-x_{i-1})/2)

See cderiv for usage.