#include <GridLatticeC.h>
Inheritance diagram for GridLatticeC::

Public Methods | |
| GridLatticeC (int nsd=1, bool scalar_in_half_index=true) | |
| GridLatticeC (int nsd, bool scalar_in_half_index, Ptv(int) half_shift_in_min, Ptv(int) half_shift_in_max) | |
| ~GridLatticeC () | |
| void | changeGridSize () |
| void | setIndexBase () |
| void | indexCheckOk (real i) const |
| void | indexCheckOk (real i, real j) const |
| void | indexCheckOk (real i, real j, real k) const |
| void | computeCgrid (const GridLattice &grid, const GridLattice::Component) |
NAME: GridLatticeC - staggered C-grid for finite difference computations
DESCRIPTION:
"GridLatticeC" enables the programmer to construct a staggered C-grid which is automatically copied and redimensioned into the right size when the grid is bound to a "FieldLattice" object which represents the different components in the calculations.
|
|
There are two constructors with two and three arguments respectively. The scalar_in_half_index argument is true if the scalar is located at the centroid of the cell (placing the velocity points at the vertices of the cells), and false in the opposite case. This variable will not be set by any other functions, hence if it is to be different than the default value true, it must be set at construction time. The half_shift_in_max argument is used to cut off half a grid cell at the upper part of the grid. This is typically used if one has a velocity component given at one boundary and the scalar value given at the other boundary. The variable is a Ptv(int) and has, in each direction, the value 1 if a half shift is to occur, and 0 if the grid is to be left as it is. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
alters a copy of the grid to make it the right size for the field it represents. The function, together with "setIndexBase", is called by "FieldLattice"'s reallocate function as soon as the "FieldLattice" object is constructed and the field has got information on which component it represents in the staggered grid. Reimplemented from GridLattice. |
|
|
alters a copy of the supplied grid to hold the appropriate size for the given component in a C-grid. This change is normally done by the "FieldLattice" constructor at the same time as the required array for holding the values is created, hence in ordinary sequencial programming this function should not be called explicitely by the user. In parallel programming however, one wishes to create the grid in the right size first, then distribute it on the available processors before the appropriate array is allocated. |
|
|
See documentation of one of the overloaded functions. Reimplemented from GridLattice. |
|
|
See documentation of one of the overloaded functions. Reimplemented from GridLattice. |
|
|
checks if the given indices are integers or integers pluss one half, depending on the type of staggered grid given. Reimplemented from GridLattice. |
|
|
sets the variable 'index_base' to the appropriate values determined by which component it represents in the staggered grid. Reimplemented from GridLattice. |