|
Gradient Augmented Levelset Implementation in CPU & GPU
|
#include <third-order.h>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| ThirdOrder () | |
| ~ThirdOrder () | |
| 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 third order scheme.
Definition at line 48 of file third-order.h.
| using value_type = T |
Definition at line 51 of file third-order.h.
| ThirdOrder | ( | ) |
Default constructor
Definition at line 35 of file third-order.cc.
| ~ThirdOrder | ( | ) |
Destructor
Definition at line 40 of file third-order.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 third-order.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 69 of file third-order.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 third-order.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 third-order.h.