Gradient Augmented Levelset Implementation in CPU & GPU
|
#include <second-order-central.h>
Public Types | |
using | value_type = T |
Public Member Functions | |
SecondOrderCentral () | |
~SecondOrderCentral () | |
void | compute (const Array< T_GRID, T > &alpha, Array< T_GRID, Vec3< T >> &grad_alpha) |
void | operator() (const Array< T_GRID, T > &alpha, Array< T_GRID, Vec3< T >> &grad_alpha) |
void | compute (const Array< T_GRID, Vec3< T >> &alpha, Array< T_GRID, Mat3< T >> &grad_alpha) |
void | operator() (const Array< T_GRID, Vec3< T >> &alpha, Array< T_GRID, Mat3< T >> &grad_alpha) |
Gradient computation using second order central scheme.
Definition at line 48 of file second-order-central.h.
using value_type = T |
Definition at line 51 of file second-order-central.h.
Default constructor
Definition at line 35 of file second-order-central.cc.
~SecondOrderCentral | ( | ) |
Destructor
Definition at line 40 of file second-order-central.cc.
Compute gradient of scalar.
For a scalar the gradient is stored in Vec3, for e.x.: \(\left(\nabla \alpha\right)_i = \{\partial_x \alpha, \partial_y \alpha, \partial_z \alpha\}_i.\)
alpha | scalar variable for which gradient will be computed. |
grad_alpha | gradient of alpha is written to this. |
Definition at line 45 of file second-order-central.cc.
Compute gradient of Vec3.
For a Vec3 the gradient is stored in Mat3, for e.x.: Let \(\boldsymbol{u} = \{u, v, w\} \) then, \(\left(\nabla \boldsymbol{u}\right)_i = \begin{bmatrix}\partial_x u & \partial_y u & \partial_z u \\ \partial_x v & \partial_y v & \partial_z v \\ \partial_x w & \partial_y w & \partial_z w \end{bmatrix}_i.\)
alpha | Vec3 variable for which gradient will be computed. |
grad_alpha | gradient of alpha is written to this. |
Definition at line 68 of file second-order-central.cc.
Overload operator to compute gradient of a scalar quantity.
For a scalar the gradient is stored in Vec3, for e.x.: \(\left(\nabla \alpha\right)_i = \{\partial_x \alpha, \partial_y \alpha, \partial_z \alpha\}_i.\)
alpha | scalar variable for which gradient will be computed. |
grad_alpha | gradient of alpha is written to this. |
Definition at line 79 of file second-order-central.h.
|
inline |
Overload operator to compute gradient of Vec3.
For a Vec3 the gradient is stored in Mat3, for e.x.: Let \(\boldsymbol{u} = \{u, v, w\} \) then, \(\left(\nabla \boldsymbol{u}\right)_i = \begin{bmatrix}\partial_x u & \partial_y u & \partial_z u \\ \partial_x v & \partial_y v & \partial_z v \\ \partial_x w & \partial_y w & \partial_z w \end{bmatrix}_i.\)
alpha | Vec3 variable for which gradient will be computed. |
grad_alpha | gradient of alpha is written to this. |
Definition at line 103 of file second-order-central.h.