20 #ifndef _ICEMODELVEC_INLINE_H_
21 #define _ICEMODELVEC_INLINE_H_
32 return static_cast<double**
>(
m_array)[j][i];
39 return static_cast<double**
>(
m_array)[j][i];
46 result.
ij =
self(i,j);
47 result.
e =
self(i+1,j);
48 result.
w =
self(i-1,j);
49 result.
n =
self(i,j+1);
50 result.
s =
self(i,j-1);
64 return {x(i, j), x(i, N), x(W, N), x(W, j), x(W,
S), x(i,
S), x(E,
S), x(E, j), x(E, N)};
73 result.
e =
self(i, j, 0);
74 result.
w =
self(i-1, j, 0);
75 result.
n =
self(i, j, 1);
76 result.
s =
self(i, j-1, 1);
85 const double **a = (
const double**)
m_array;
86 return static_cast<int>(floor(a[j][i] + 0.5));
110 return {x.
as_int(i, j), x.
as_int(i, N), x.
as_int(W, N), x.
as_int(W, j), x.
as_int(W,
S),
118 return static_cast<double***
>(
m_array)[j][i][
k];
125 return static_cast<double***
>(
m_array)[j][i][
k];
stencils::Box< int > box(int i, int j) const
int as_int(int i, int j) const
stencils::Star< int > star(int i, int j) const
A simple class "hiding" the fact that the mask is stored as floating-point scalars (instead of intege...
double & operator()(int i, int j)
Provides access (both read and write) to the internal double array.
stencils::Box< double > box(int i, int j) const
stencils::Star< double > star(int i, int j) const
stencils::Star< double > star(int i, int j) const
Returns the values at interfaces of the cell i,j using the staggered grid.
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
double & operator()(int i, int j, int k)
void check_array_indices(int i, int j, unsigned int k) const
Check array indices and warn if they are out of range.
Star stencil points (in the map-plane).
static double S(unsigned n)