Complex derivatives
3D derivatives
Basic 3D derivative function:
int wderiv_derivative_3d_c(int direction, int n, double complex *f, double complex *deriv)
Function computes n-th derivative with respect to direction of 3D complex function f(x,y,z): \frac{\partial^n f}{\partial t^n}.
-
direction- predefined integer corresponding to direction of derivative:WDERIV_DXorWDERIV_DYorWDERIV_DZ -
f- pointer to input function which is array of size [nx*ny*nz] -
deriv- pointer to output derivative function which is array of size [nx*ny*nz] -
return- error code
deriv can be the same pointer as f, then result overwrites input.
First 3D derivative functions:
int wderiv_dfdx_3d_c(double complex *f, double complex *dfdx)
Function computes first derivative with respect to x of 3D complex function f(x,y,z): \frac{\partial f}{\partial x}.
-
f- pointer to input function which is array of size [nx*ny*nz] -
dfdx- pointer to output derivative function which is array of size [nx*ny*nz] -
return- error code
dfdx can be the same pointer as f, then result overwrites input.
int wderiv_dfdy_3d_c(double complex *f, double complex *dfdy)
Function computes first derivative with respect to y of 3D complex function f(x,y,z): \frac{\partial f}{\partial y}.
-
f- pointer to input function which is array of size [nxnynz] -
dfdy- pointer to output derivative function which is array of size [nxnynz] -
return- error code
dfdy can be the same pointer as f, then result overwrites input.
int wderiv_dfdz_3d_c(double complex *f, double complex *dfdz)
Function computes first derivative with respect to z of 3D complex function f(x,y,z): \frac{\partial f}{\partial x}.
-
f- pointer to input function which is array of size [nxnynz] -
dfdz- pointer to output derivative function which is array of size [nxnynz] -
return- error code
dfdz can be the same pointer as f, then result overwrites input.
Second 3D derivative functions:
int wderiv_d2fdx2_3d_c(double complex *f, double complex *d2fdx2)
Function computes second derivative with respect to x of 3D complex function f(x,y,z): \frac{\partial^2 f}{\partial x^2}.
-
f- pointer to input function which is array of size [nx*ny*nz] -
d2fdx2- pointer to output derivative function which is array of size [nx*ny*nz] -
return- error code
d2fdx2 can be the same pointer as f, then result overwrites input.
int wderiv_d2fdy2_3d_c(double complex *f, double complex *d2fdy2)
Function computes second derivative with respect to y of 3D complex function f(x,y,z): \frac{\partial^2 f}{\partial y^2}.
-
f- pointer to input function which is array of size [nx*ny*nz] -
d2fdy2- pointer to output derivative function which is array of size [nx*ny*nz] -
return- error code
d2fdy2 can be the same pointer as f, then result overwrites input.
int wderiv_d2fdz2_3d_c(double complex *f, double complex *d2fdz2)
Function computes second derivative with respect to z of 3D complex function f(x,y,z): (\frac{d^2f}{dz^2}).
-
f- pointer to input function which is array of size [nxnynz] -
d2fdz2- pointer to output derivative function which is array of size [nxnynz] -
return- error code
d2fdz2 can be the same pointer as f, then result overwrites input.
n-th 3D derivative functions:
int wderiv_dnfdxn_3d_c(int n, double complex *f, double complex *dnfdxn)
Function computes n-th derivative with respect to x of 3D complex function f(x,y,z): (\frac{d^nf}{dx^n}).
-
f- pointer to input function which is array of size [nxnynz] -
dnfdxn- pointer to output derivative function which is array of size [nxnynz] -
return- error code
dnfdxn can be the same pointer as f, then result overwrites input.
int wderiv_dnfdyn_3d_c(int n, double complex *f, double complex *dnfdyn)
Function computes n-th derivative with respect to y of 3D complex function f(x,y,z): (\frac{d^nf}{dy^n}).
-
f- pointer to input function which is array of size [nxnynz] -
dnfdyn- pointer to output derivative function which is array of size [nxnynz] -
return- error code
dnfdyn can be the same pointer as f, then result overwrites input.
int wderiv_dnfdzn_3d_c(int n, double complex *f, double complex *dnfdzn)
Function computes n-th derivative with respect to z of 3D complex function f(x,y,z): (\frac{d^nf}{dz^n}).
-
f- pointer to input function which is array of size [nxnynz] -
dnfdzn- pointer to output derivative function which is array of size [nxnynz] -
return- error code
dnfdzn can be the same pointer as f, then result overwrites input.
3D gradient:
int wderiv_gradient_3d_c(double complex *f, double complex *dfdx, double complex *dfdy, double complex *dfdz);
Function computes gradient of 3D complex function f(x,y,z): \nabla f = (\frac{df}{dx},\frac{df}{dy},\frac{df}{dz}).
-
f- pointer to input function which is array of size [nxnynz] -
dfdx- pointer to output derivative function which is array of size [nxnynz] -
dfdy- pointer to output derivative function which is array of size [nxnynz] -
dfdz- pointer to output derivative function which is array of size [nxnynz] -
return- error code
3D gradient squared:
int wderiv_gradient2_3d_c(double complex *f, double complex *gradient_square)
Function computes squared gradient of 3D complex function f(x,y,z): |\nabla f|^2 = |\frac{df}{dx}|^2 +|\frac{df}{dy}|^2 +|\frac{df}{dz}|^2 .
-
f- pointer to input function which is array of size [nx*ny*nz] -
gradient_square- pointer to output gradient squared function which is array of size [nx*ny*nz] -
return- error code
gradient_square can be the same pointer as f, then result overwrites input.
3D laplacian:
int wderiv_laplace_3d_c(double complex *f, double complex *laplace)
Function computes laplacian of 3D complex function f(x,y,z): |\Delta f|^2 = \frac{d^2f}{dx^2} +\frac{d^2f}{dy^2} +\frac{d^2f}{dz^2} .
-
f- pointer to input function which is array of size [nx*ny*nz] -
laplace- pointer to output laplacian function which is array of size [nx*ny*nz] -
return- error code
laplace can be the same pointer as f, then result overwrites input.
3D divergence:
int wderiv_divergence_3d_c(double complex *f, double complex *divergence)
Function divergence of 3D complex function f(x,y,z): \nabla \cdot f = \frac{df}{dx} +\frac{df}{dy} +\frac{df}{dz} .
-
f- pointer to input function which is array of size [nx*ny*nz] -
divergence- pointer to output divergence function which is array of size [nx*ny*nz] -
return- error code
divergence can be the same pointer as f, then result overwrites input.
3D curl:
int wderiv_curl_3d_c(double complex *fx, double complex *fy, double complex *fz, double complex *curl_x, double complex *curl_y, double complex *curl_z);
Function computes curl of 3D complex vector (f_x, f_y, f_z): \nabla \times \vec{f} = (\frac{df_y}{dz} - \frac{df_z}{dy}, \frac{df_z}{dx} - \frac{df_x}{dz}, \frac{df_x}{dy} - \frac{df_y}{dx}).
-
fx- pointer to input function which is array of size [nx*ny*nz] -
fy- pointer to input function which is array of size [nx*ny*nz] -
fz- pointer to input function which is array of size [nx*ny*nz] -
curl_x- pointer to outputx-component function which is array of size [nx*ny*nz] -
curl_y- pointer to outputy-component function which is array of size [nx*ny*nz] -
curl_z- pointer to outputz-component function which is array of size [nx*ny*nz] -
return- error code
2D derivatives:
Basic 2D derivative function:
int wderiv_derivative_2d_c(int direction, int n, double complex *f, double complex *deriv)
Function computes n-th derivative with respect to direction of 2D complex function f(x,y): \frac{\partial^n f}{\partial t^n}.
-
direction- predefined integer corresponding to direction of derivative:WDERIV_DXorWDERIV_DY -
f- pointer to input function which is array of size [nx*ny] -
deriv- pointer to output derivative function which is array of size [nx*ny] -
return- error code
deriv can be the same pointer as f, then result overwrites input.
First 2D derivative functions:
int wderiv_dfdx_2d_c(double complex *f, double complex *dfdx)
Function computes first derivative with respect to x of 2D complex function f(x,y): \frac{\partial f}{\partial x}.
-
f- pointer to input function which is array of size [nx*ny] -
dfdx- pointer to output derivative function which is array of size [nx*ny] -
return- error code
dfdx can be the same pointer as f, then result overwrites input.
int wderiv_dfdy_2d_c(double complex *f, double complex *dfdy)
Function computes first derivative with respect to y of 2D complex function f(x,y): \frac{\partial f}{\partial y}.
-
f- pointer to input function which is array of size [nx*ny] -
dfdy- pointer to output derivative function which is array of size [nx*ny] -
return- error code
dfdy can be the same pointer as f, then result overwrites input.
Second 2D derivative functions:
int wderiv_d2fdx2_2d_c(double complex *f, double complex *d2fdx2)
Function computes second derivative with respect to x of 2D complex function f(x,y): \frac{\partial^2 f}{\partial x^2}.
-
f- pointer to input function which is array of size [nx*ny] -
d2fdx2- pointer to output derivative function which is array of size [nx*ny] -
return- error code
d2fdx2 can be the same pointer as f, then result overwrites input.
int wderiv_d2fdy2_2d_c(double complex *f, double complex *d2fdy2)
Function computes second derivative with respect to y of 2D complex function f(x,y): \frac{\partial^2 f}{\partial y^2}.
-
f- pointer to input function which is array of size [nx*ny] -
d2fdy2- pointer to output derivative function which is array of size [nx*ny] -
return- error code
d2fdy2 can be the same pointer as f, then result overwrites input.
n-th 2D derivative functions:
int wderiv_dnfdxn_2d_c(int n, double complex *f, double complex *dnfdxn)
Function computes n-th derivative with respect to x of 2D complex function f(x,y): (\frac{d^nf}{dx^n}).
-
f- pointer to input function which is array of size [nx*ny] -
dnfdxn- pointer to output derivative function which is array of size [nx*ny] -
return- error code
dnfdxn can be the same pointer as f, then result overwrites input.
int wderiv_dnfdyn_2d_c(int n, double complex *f, double complex *dnfdyn)
Function computes n-th derivative with respect to y of 2D complex function f(x,y): (\frac{d^nf}{dy^n}).
-
f- pointer to input function which is array of size [nx*ny] -
dnfdyn- pointer to output derivative function which is array of size [nx*ny] -
return- error code
dnfdyn can be the same pointer as f, then result overwrites input.
2D gradient:
int wderiv_gradient_2d_c(double complex *f, double complex *dfdx, double complex *dfdy);
Function computes gradient of 2D complex function f(x,y): \nabla f = (\frac{df}{dx},\frac{df}{dy}).
-
f- pointer to input function which is array of size [nx*ny] -
dfdx- pointer to output derivative function which is array of size [nx*ny] -
dfdy- pointer to output derivative function which is array of size [nx*ny] -
return- error code
2D gradient squared:
int wderiv_gradient2_2d_c(double complex *f, double complex *gradient_square)
Function computes squared gradient of 2D complex function f(x,y): |\nabla f|^2 = |\frac{df}{dx}|^2 +|\frac{df}{dy}|^2.
-
f- pointer to input function which is array of size [nx*ny] -
gradient_square- pointer to output gradient squared function which is array of size [nx*ny] -
return- error code
gradient_square can be the same pointer as f, then result overwrites input.
2D laplacian:
int wderiv_laplace_2d_c(double complex *f, double complex *laplace)
Function computes laplacian of 2D complex function f(x,y): |\Delta f|^2 = \frac{d^2f}{dx^2} +\frac{d^2f}{dy^2}.
-
f- pointer to input function which is array of size [nx*ny] -
laplace- pointer to output laplacian function which is array of size [nx*ny] -
return- error code
laplace can be the same pointer as f, then result overwrites input.
2D divergence:
int wderiv_divergence_2d_c(double complex *f, double complex *divergence)
Function divergence of 2D complex function f(x,y): \nabla \cdot f = \frac{df}{dx} +\frac{df}{dy}.
-
f- pointer to input function which is array of size [nx*ny] -
divergence- pointer to output divergence function which is array of size [nx*ny] -
return- error code
divergence can be the same pointer as f, then result overwrites input.
1D derivatives:
Basic 1D derivative function:
int wderiv_derivative_1d_c(int direction, int n, double complex *f, double complex *deriv)
Function computes n-th derivative with respect to direction of 1D complex function f(x): \frac{\partial^n f}{\partial t^n}.
-
direction- predefined integer corresponding to direction of derivative:WDERIV_DX -
f- pointer to input function which is array of size [nx] -
deriv- pointer to output derivative function which is array of size [nx] -
return- error code
deriv can be the same pointer as f, then result overwrites input.
First 1D derivative functions:
int wderiv_dfdx_1d_c(double complex *f, double complex *dfdx)
Function computes first derivative with respect to x of 1D complex function f(x): \frac{\partial f}{\partial x}.
-
f- pointer to input function which is array of size [nx] -
dfdx- pointer to output derivative function which is array of size [nx] -
return- error code
dfdx can be the same pointer as f, then result overwrites input.
Second 1D derivative functions:
int wderiv_d2fdx2_1d_c(double complex *f, double complex *d2fdx2)
Function computes second derivative with respect to x of 1D complex function f(x): \frac{\partial^2 f}{\partial x^2}.
-
f- pointer to input function which is array of size [nx] -
d2fdx2- pointer to output derivative function which is array of size [nx] -
return- error code
d2fdx2 can be the same pointer as f, then result overwrites input.
n-th 1D derivative functions:
int wderiv_dnfdxn_1d_c(int n, double complex *f, double complex *dnfdxn)
Function computes n-th derivative with respect to x of 1D complex function f(x): (\frac{d^nf}{dx^n}).
-
f- pointer to input function which is array of size [nx] -
dnfdxn- pointer to output derivative function which is array of size [nx] -
return- error code
dnfdxn can be the same pointer as f, then result overwrites input.
1D gradient:
int wderiv_gradient_1d_c(double complex *f, double complex *dfdx);
Function computes gradient of 1D complex function f(x): \nabla f = (\frac{df}{dx}).
-
f- pointer to input function which is array of size [nx] -
dfdx- pointer to output derivative function which is array of size [nx] -
return- error code
1D gradient squared:
int wderiv_gradient2_1d_c(double complex *f, double complex *gradient_square)
Function computes squared gradient of 1D complex function f(x): |\nabla f|^2 = |\frac{df}{dx}|^2.
-
f- pointer to input function which is array of size [nx] -
gradient_square- pointer to output gradient squared function which is array of size [nx] -
return- error code
gradient_square can be the same pointer as f, then result overwrites input.
1D laplacian:
int wderiv_laplace_1d_c(double complex *f, double complex *laplace)
Function computes laplacian of 1D complex function f(x): |\Delta f|^2 = \frac{d^2f}{dx^2}.
-
f- pointer to input function which is array of size [nx] -
laplace- pointer to output laplacian function which is array of size [nx] -
return- error code
laplace can be the same pointer as f, then result overwrites input.
1D divergence:
int wderiv_divergence_1d_c(double complex *f, double complex *divergence)
Function divergence of 1D complex function f(x): \nabla \cdot f = \frac{df}{dx}.
-
f- pointer to input function which is array of size [nx] -
divergence- pointer to output divergence function which is array of size [nx] -
return- error code
divergence can be the same pointer as f, then result overwrites input.