Math
KitBase.linspace
— Functionlinspace(start, stop, n)
Python linspace function
KitBase.heaviside
— Functionheaviside(x)
Heaviside step function
KitBase.fortsign
— Functionfortsign(x, y)
Fortran sign function
KitBase.mat_split
— Functionmat_split(m)
Split matrix into row vectors
This function can be used for building physics-informed neural networks.
KitBase.central_diff
— Functioncentral_diff(y, x)
Central difference
central_diff(y, dx)
KitBase.central_diff!
— Functioncentral_diff!(dy, y, x)
Central difference
central_diff!(dy, y, dx)
KitBase.upwind_diff
— Functionupwind_diff(y, x; stream)
Upwind difference
upwind_diff(y, dx; stream)
KitBase.upwind_diff!
— Functionupwind_diff!(dy, y, x; stream)
Upwind difference
upwind_diff!(dy, y, dx; stream)
KitBase.unstruct_diff
— Functionunstruct_diff(u, x, nx; mode)
Finite difference for pseudo-unstructured mesh
unstruct_diff(u, x, nx, dim; mode)
KitBase.lgwt
— Functionlgwt(N, a, b)
Gauss Legendre integral for fast spectral method
Arguments
N
: number of quadrature points,a, b
: integral range
KitBase.extract_last
— Functionextract_last(a, idx; mode)
Extract subarray except the last column