67 template <
typename T,
int DIM = 3>
75 static constexpr
int dim = DIM;
90 Grid(
int nx,
int ny,
int nz);
121 Vec3<T>&
x(
const int i,
const int j = 0,
const int k = 0);
135 const int size()
const;
178 const std::size_t
index(
const int i,
const int j,
const int k)
const;
239 void generate(T x_min, T x_max, T y_min, T y_max, T z_min, T z_max);
242 int m_dimension, m_nx, m_ny, m_nz, m_pad;
243 size_t m_total_cells;
247 std::vector<Vec3<T>> m_grid;
250 template <
typename T,
int DIM>
253 template <
typename T,
int DIM>
constexpr int num_mixed_derivatives(const int dim)
const int dimension() const
void setPadding(const int pad)
const int getPadding() const
void generate(T x_min, T x_max, T y_min, T y_max, T z_min, T z_max)
const Vec3< T > & operator()(const int i, const int j, const int k) const
static constexpr int dim
Dimension.
static const Mat3< int > axis_vectors
vector along x: {1, 0, 0}; y: {0, 1, 0}; z: {0, 0, 1}.
const Vec3< int > baseNodeId(const Vec3< T > &x) const
Grid(int nx, int ny, int nz)
const Vec3< int > numCells() const
const Vec3< T > & oneOverDX() const
const Vec3< T > & dX() const
const int * getMask() const
const std::size_t index(const int i, const int j, const int k) const
const size_t totalCells() const
static const Mat3< T > identity_mat
static constexpr int num_mixed_derivatives
Number of mixed derivatives.
Vec3< T > & x(const int i, const int j=0, const int k=0)