Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wderiv wderiv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wderivwderiv
  • Wiki
  • Home

Home · Changes

Page history
Update home authored May 23, 2021 by Bartosz Ruszczak's avatar Bartosz Ruszczak
Hide whitespace changes
Inline Side-by-side
home.md
View page @ 4c8d237b
...@@ -24,141 +24,4 @@ Generic name of a function is `wderiv_operation_Nd_t`, where: ...@@ -24,141 +24,4 @@ Generic name of a function is `wderiv_operation_Nd_t`, where:
* `3` for [3D problems](Derivatives#3d-derivatives) * `3` for [3D problems](Derivatives#3d-derivatives)
* `t`: * `t`:
* `r` for real problems * `r` for real problems
* `c` for complex problems * `c` for complex problems
# Function Documentation \ No newline at end of file
## 3D derivatives:
### Basic 3D derivative function:
```c
int wderiv_derivative_3d_r(int direction, int n, double *f, double *deriv)
```
Function computes n-th derivative with respect to `direction` of 3D real function $`f(x,y,z)`$: $`\frac{\partial^n f}{\partial t^n}`$.
* `direction` - predefined integer corresponding to direction of derivative: `WDERIV_DX` or `WDERIV_DY` or `WDERIV_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:
```c
int wderiv_dfdx_3d_r(double *f, double *dfdx)
```
Function computes first derivative with respect to $`x`$ of 3D real 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.
```c
int wderiv_dfdy_3d_r(double *f, double *dfdy)
```
Function computes first derivative with respect to $`y`$ of 3D real function $`f(x,y,z)`$: $`\frac{\partial f}{\partial y}`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `dfdy` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`dfdy` can be the same pointer as `f`, then result overwrites input.
```c
int wderiv_dfdz_3d_r(double *f, double *dfdz)
```
Function computes first derivative with respect to $`z`$ of 3D real function $`f(x,y,z)`$: $`\frac{\partial f}{\partial x}`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `dfdz` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`dfdz` can be the same pointer as `f`, then result overwrites input.
### Second 3D derivative functions:
```c
int wderiv_d2fdx2_3d_r(double *f, double *d2fdx2)
```
Function computes second derivative with respect to $`x`$ of 3D real 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.
```c
int wderiv_d2fdy2_3d_r(double *f, double *d2fdy2)
```
Function computes second derivative with respect to $`y`$ of 3D real 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.
```c
int wderiv_d2fdz2_3d_r(double *f, double *d2fdz2)
```
Function computes second derivative with respect to $`z`$ of 3D real function $`f(x,y,z)`$: $`(\frac{d^2f}{dz^2})`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `d2fdz2` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`d2fdz2` can be the same pointer as `f`, then result overwrites input.
### n-th 3D derivative functions:
```c
int wderiv_dnfdxn_3d_r(int n, double *f, double *dnfdxn)
```
Function computes n-th derivative with respect to $`x`$ of 3D real function $`f(x,y,z)`$: $`(\frac{d^nf}{dx^n})`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `dnfdxn` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`dnfdxn` can be the same pointer as `f`, then result overwrites input.
```c
int wderiv_dnfdyn_3d_r(int n, double *f, double *dnfdyn)
```
Function computes n-th derivative with respect to $`y`$ of 3D real function $`f(x,y,z)`$: $`(\frac{d^nf}{dy^n})`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `dnfdyn` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`dnfdyn` can be the same pointer as `f`, then result overwrites input.
```c
int wderiv_dnfdzn_3d_r(int n, double *f, double *dnfdzn)
```
Function computes n-th derivative with respect to $`z`$ of 3D real function $`f(x,y,z)`$: $`(\frac{d^nf}{dz^n})`$.
* `f` - pointer to input function which is array of size [nx*ny*nz]
* `dnfdzn` - pointer to output derivative function which is array of size [nx*ny*nz]
* `return` - error code
`dnfdzn` can be the same pointer as `f`, then result overwrites input.
/**
* Function computes gradient
* of 3D real function f(x,y,z)
* @param f pointer to function, array of size [nx*ny*nz] (INPUT)
* @param dfdx pointer to function, array of size [nx*ny*nz] (OUTPUT)
* @param dfdy pointer to function, array of size [nx*ny*nz] (OUTPUT)
* @param dfdz pointer to function, array of size [nx*ny*nz] (OUTPUT)
* @return error code
* */
int wderiv_gradient_3d_r(double *f, double *dfdx, double *dfdy, double *dfdz);
/**
* Function computes second derivative with respect to z (d^2f/dz^2)
* of 3D complex function f(x,y,z)
* @param f pointer to function, array of size [nx*ny*nz] (INPUT)
* @param d2fdz2 pointer to function, array of size [nx*ny*nz] (OUTPUT)
* NOTE: d2fdz2 can be the same pointer as f, then result overwrites input
* @return error code
* */
int wderiv_d2fdz2_3d_c(double complex *f, double complex *d2fdz2);
/**
* Function computes n-th derivative with respect to x (d^nf/dx^n)
* of 1D complex function f(x)
* @param n order of derivative
* @param f pointer to function, array of size [nx] (INPUT)
* @param dnfdxn pointer to function, array of size [nx] (OUTPUT)
* NOTE: dnfdxn can be the same pointer as f, then result overwrites input
* @return error code
* */
int wderiv_dnfdxn_1d_c(int n, double complex *f, double complex *dnfdxn);
```
Clone repository
  • Complex derivatives
  • Gradient square
  • Initialization
  • Real derivatives
  • Home