Gradient Augmented Levelset Implementation in CPU & GPU
|
#include <gradient.h>
Public Types | |
using | value_type = T |
Public Member Functions | |
Gradient () | |
~Gradient () | |
Static Public Member Functions | |
static void | compute (const Array< T_GRID, T > &alpha, Array< T_GRID, Vec3< T >> &grad_alpha) |
static void | compute (const Array< T_GRID, Vec3< T >> &alpha, Array< T_GRID, Mat3< T >> &grad_alpha) |
Class to create 3 component elements at a computational cell. For e.x. velocity, gradients, etc.
Definition at line 50 of file gradient.h.
using value_type = T |
Definition at line 53 of file gradient.h.
Gradient | ( | ) |
Default constructor
Definition at line 35 of file gradient.cc.
~Gradient | ( | ) |
Destructor
Definition at line 40 of file gradient.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 gradient.cc.
|
static |
Compute gradient of vector.
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 52 of file gradient.cc.