Gradient Augmented Levelset Implementation in CPU & GPU
|
#include <grid.h>
Public Types | |
using | value_type = T |
using | position_type = Vec3< T > |
Public Member Functions | |
Grid (int nx, int ny, int nz) | |
Grid (int nx, int ny) | |
Grid (int nx) | |
~Grid () | |
Vec3< T > & | x (const int i, const int j=0, const int k=0) |
const int | dimension () const |
const int | size () const |
const int * | getMask () const |
const Vec3< int > | numCells () const |
const size_t | totalCells () const |
const int | getPadding () const |
const std::size_t | index (const int i, const int j, const int k) const |
const std::size_t | index (const Vec3< int > node_id) const |
const Vec3< int > | baseNodeId (const Vec3< T > &x) const |
const Vec3< T > & | dX () const |
const Vec3< T > & | oneOverDX () const |
const Vec3< T > & | operator() (const int i, const int j, const int k) const |
const Vec3< T > & | operator() (const Vec3< int > node_id) const |
void | setPadding (const int pad) |
void | generate (T x_min, T x_max, T y_min, T y_max, T z_min, T z_max) |
Static Public Attributes | |
static constexpr int | dim = DIM |
Dimension. More... | |
static const Mat3< int > | axis_vectors = Mat3<int>(1, 0, 0, 0, 1, 0, 0, 0, 1) |
vector along x: {1, 0, 0}; y: {0, 1, 0}; z: {0, 0, 1}. More... | |
static const Mat3< T > | identity_mat = Mat3<T>(1, 0, 0, 0, 1, 0, 0, 0, 1) |
static constexpr int | num_mixed_derivatives = GALS::CPU::num_mixed_derivatives(DIM) |
Number of mixed derivatives. More... | |
Class to create grid.
using position_type = Vec3<T> |
using value_type = T |
Grid | ( | int | nx, |
int | ny, | ||
int | nz | ||
) |
Grid | ( | int | nx, |
int | ny | ||
) |
Grid | ( | int | nx | ) |
const GALS::CPU::Vec3< int > baseNodeId | ( | const Vec3< T > & | x | ) | const |
const int dimension | ( | ) | const |
const GALS::CPU::Vec3< T > & dX | ( | ) | const |
void generate | ( | T | x_min, |
T | x_max, | ||
T | y_min, | ||
T | y_max, | ||
T | z_min, | ||
T | z_max | ||
) |
const int * getMask | ( | ) | const |
Returns pointer to mask.
For efficient computation of 3D index to 1D index a mask is used to differentiate between 1, 2, 3 dimentions.
const int getPadding | ( | ) | const |
const std::size_t index | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const |
const std::size_t index | ( | const Vec3< int > | node_id | ) | const |
const GALS::CPU::Vec3< int > numCells | ( | ) | const |
const GALS::CPU::Vec3< T > & oneOverDX | ( | ) | const |
const GALS::CPU::Vec3< T > & operator() | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const |
const GALS::CPU::Vec3< T > & operator() | ( | const Vec3< int > | node_id | ) | const |
void setPadding | ( | const int | pad | ) |
const int size | ( | ) | const |
const size_t totalCells | ( | ) | const |
GALS::CPU::Vec3< T > & x | ( | const int | i, |
const int | j = 0 , |
||
const int | k = 0 |
||
) |
|
static |