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

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

Detailed Description

template<typename T, typename T_GRID>
class GALS::CPU::SecondOrderCentral< T, T_GRID >

Gradient computation using second order central scheme.

Definition at line 48 of file second-order-central.h.

Member Typedef Documentation

using value_type = T

Definition at line 51 of file second-order-central.h.

Constructor & Destructor Documentation

Default constructor

Definition at line 35 of file second-order-central.cc.

Destructor

Definition at line 40 of file second-order-central.cc.

Member Function Documentation

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

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 second-order-central.cc.

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

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

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

Definition at line 68 of file second-order-central.cc.

void operator() ( const Array< T_GRID, T > &  alpha,
Array< T_GRID, Vec3< T >> &  grad_alpha 
)
inline

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

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

Definition at line 79 of file second-order-central.h.

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

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

Definition at line 103 of file second-order-central.h.


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