FlexELA
Loading...
Searching...
No Matches
Classes | Functions
fields Namespace Reference

Template to wrap pointer to padded 3D cartesian data. More...

Classes

class  Helper
 A helper class to wrap pointers to padded 3D cartesian data. More...
 
class  Owner
 An extension of Helper<T> which owns the array. More...
 

Functions

constexpr std::size_t getLength (const int n[3], const int pad[6])
 Get the total number of elements (including padding)
 

Detailed Description

Template to wrap pointer to padded 3D cartesian data.

When calling Helper::Helper() or Owner::Owner(), the domain size is defined by the padding in each direction ( \(n_{i-}\), \(n_{i+}\)) and the number of cell in the domain in each direction ( \(N_i\)). Below is a 2D example.

Example (2D) Processor Domain
Note
The assumed ordering of the data ([i][j][k] or [k][j][i]) is set at compile time.

Function Documentation

◆ getLength()

constexpr std::size_t fields::getLength ( const int  n[3],
const int  pad[6] 
)
constexpr

Get the total number of elements (including padding)

Parameters
nThe number of (not pad) cells in each direction, \(\left[N_{i},N_{j},N_{k}\right]\)
padThe number of ghost cells in each direction, \(\left[n_{i-},n_{i+},n_{j-},n_{j+},n_{k-},n_{k+}\right]\)
Returns
constexpr std::size_t