Gradient Augmented Levelset Implementation in CPU & GPU
Gradient< T, T_GRID, GRADIENT_SCHEME > Class Template Reference

#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)
 

Detailed Description

template<typename T, typename T_GRID, typename GRADIENT_SCHEME = ThirdOrder<T, T_GRID>>
class GALS::CPU::Gradient< T, T_GRID, GRADIENT_SCHEME >

Class to create 3 component elements at a computational cell. For e.x. velocity, gradients, etc.

Definition at line 50 of file gradient.h.

Member Typedef Documentation

using value_type = T

Definition at line 53 of file gradient.h.

Constructor & Destructor Documentation

Gradient ( )

Default constructor

Definition at line 35 of file gradient.cc.

~Gradient ( )

Destructor

Definition at line 40 of file gradient.cc.

Member Function Documentation

void compute ( const Array< T_GRID, T > &  alpha,
Array< T_GRID, Vec3< T >> &  grad_alpha 
)
static

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.\)

Parameters
alphascalar variable for which gradient will be computed.
grad_alphagradient of alpha is written to this.

Definition at line 45 of file gradient.cc.

void compute ( const Array< T_GRID, Vec3< T >> &  alpha,
Array< T_GRID, Mat3< T >> &  grad_alpha 
)
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.\)

Parameters
alphavec3 variable for which gradient will be computed.
grad_alphagradient of alpha is written to this.

Definition at line 52 of file gradient.cc.


The documentation for this class was generated from the following files: