#include <GridFunction.h>
Inheritance diagram for GridFunction< GFType, dim >:
Public Member Functions | |
GridFunction (const char name[], const int t_sten, const int *s_sten, GridHierarchy &gh, const int type, const int loff, const int cfac, const int align, const int cflag, const int bflag, const int adptbflag, const int extghflag) | |
Most flexible Construtor. | |
GridFunction (const char name[], const int t_sten, const int *s_sten, const int time, const int level, GridHierarchy &gh, const int type, const int loff, const int cfac, const int cflag, const int bflag, const int adptbflag, const int extghflag=((-1))) | |
Constructor for a particular time and level. | |
GridFunction (const char name[], const GridFunction< GFType, dim > &gf, const int time, const int level, const int cflag, const int bflag, const int adptbflag, const int extghflag=((-1))) | |
Constructor from another GridFunction. | |
void | GF_CheckpointRecompose () |
Recompose GridFunction from checkpointing-file. | |
void | GF_CheckpointRecompose (std::stringstream &ifs) |
Recompose GridFunction from memory. | |
void | GF_Checkpoint (std::ofstream &ofs) |
Write GridFunction into checkpointing-file. | |
void | GF_Checkpoint (std::stringstream &ofs) |
Write GridFunction into memory. | |
void | GF_CheckpointRestart (int proc=-1) |
Read GridDataBlocks from checkpointing-file. | |
void | GF_CheckpointRestart (std::stringstream &ifs) |
Read GridDataBlocks from memory, when recomposing. | |
void | GF_SwapTimeLevels (const int l, const int t1, const int t2) |
Swap storage for time levels. | |
int | len (int lev) const |
Number of GridDataBlocks on a particular level. | |
GridDataBlock< GFType, dim > & | mygdb (const int t, const int l, const int c) |
Direct access to the cth GridDataBlock on level l at time-value t. | |
const int & | parents (const int t, const int l, const int c) const |
Number of parents of the cth GridDataBlock on level l at time-value t. | |
const GDB_Interaction * | parentlist (const int t, const int l, const int c) const |
Indices of parent GridDataBlocks on level l-1 of the cth GridDataBlock on level l at time-value t. | |
const int & | children (const int t, const int l, const int c) const |
Number of children of the cth GridDataBlock on level l at time-value t. | |
const GDB_Interaction * | childlist (const int t, const int l, const int c) const |
Indices of child GridDataBlocks on level l+1 of the cth GridDataBlock on level l at time-value t. | |
int | GF_CurrentTime (const int lev) const |
Actual time in internal integer time-units. | |
int | dagh_timevalue (const int t, const int l) const |
Actual time in internal integer time-units. | |
int | dagh_timeindex (const int t, const int l) const |
Internal storage index. | |
void | set_phystime_timevalue (const int t, const int l, const double pht) |
Assigns a double-valued real time to an internal time storage index. | |
double | get_phystime_timevalue (const int t, const int l) const |
Read out the a double-valued real time of an internal time storage index. | |
virtual void | GF_WriteGhosts (const int time, const int level, const int axis, const int dir) |
Send values from regions where ghost cells of other grids overlap to neighbouring processors. | |
virtual void | GF_ReadGhosts (const int time, const int level, const int axis, const int dir) |
Read ghost cell values from local and neighbouring processores. | |
void | GF_BndryUpdate (const int time, const int level) |
Calls all boundary update functions in right order. | |
virtual void | GF_Sync (const int time, const int level, const int axis, const int dir) |
Synchronize ghost cells only. | |
void | GF_Prolong (const int tf, const int lf, const int tt, const int lt, const BBox &bb) |
Call pfunc for an entire level. | |
void | GF_Restrict (const int tf, const int lf, const int tt, const int lt, const BBox &bb) |
Call rfunc for an entire level. | |
void | GF_AdaptiveBndryUpdate (const int time, const int level) |
Apply boundary conditions at internal adaptive boundaries. | |
void | GF_ExternalBndryUpdate (const int time, const int level) |
Apply physical boundary conditions. | |
BBox | boundingbbox (const int t, const int l, const int c) |
BBox of the interior region + ghost cells of the cth GridDataBlock on level l at time-value t. | |
BBox | interiorbbox (const int t, const int l, const int c) |
BBox of the interior region of the cth GridDataBlock on level l at time-value t. | |
BBox | databbox (const int t, const int l, const int c) |
The BBox of the GridData-object stored within the cth GridDataBlock on level l at time-value t. | |
GridData< GFType, dim > & | operator() (const int t, const int l, const int c) |
Access to the GridData stored within the cth GridDataBlock on level l at time-value t. | |
Friends | |
class | GridHierarchy |
GridFunction-objects store all data of an adaptive application. GridFunctions capsulate all parallelization details and from the user's point of view, all GridFunctions follow the "floor plan" of their GridHierarchy automatically. For each level this floor plan is stored in a GridBoxList in GridHierarchy. The lists are accessed via GridHierarchy::lgbl() and GridHierarchy::ggbl(). For each GridBox-object a GridDataBlock-object with an appropriate GridData-storage is allocated.
GridFunction< GFType, dim >::GridFunction | ( | const char | name[], | |
const int | t_sten, | |||
const int * | s_sten, | |||
GridHierarchy & | gh, | |||
const int | type, | |||
const int | loff, | |||
const int | cfac, | |||
const int | align, | |||
const int | cflag, | |||
const int | bflag, | |||
const int | adptbflag, | |||
const int | extghflag | |||
) |
Most flexible Construtor.
name | char[]. Name of the GridFunction, e.g. for IO. | |
t_sten | integer. Time-step radius of the numerical stencil around the actual time-step. | |
s_sten | integer[]. Radius of the numerical stencil in each spatial direction. This determines the size of the ghost cell regions. | |
gh | GridHierarchy. | |
type | integer. Only CellCentered really tried out yet. Be careful with Vertex- or FaceCentered! | |
loff | integer. Internal level offset. For each level a particular refinement factor is defined in GridHierarchy. The level offset allows the easy use of auxiliary GridFunctions that are coarsened or refined in respect to the refinement factors of the GridHierarchy. The advantage is, that in all GridFunctions the same GridDataBlock-index can be used. See GridFunctionVoid::usedbbox() for implementation details. | |
cfac | integer. Refines or coarsens GridFunctions by an arbitrary factor. cfac>0 coarsens. cfac<0 refines. Multiple successively coarsened GridFunctions would be used for instance in a multigrid implementation. cfac is related to GridHierarchy::gucfactor(), because only the GridHierarchy can ensure that the data on all required GridFunctions really is locally available. See GridFunctionVoid::usedbbox() for implementation details. | |
align | integer. Reduces the spatial dimension of the internal GridDataBlocks and assigns them to a particular side of the higher dimensional GridBox-object from which they have been derived. See GridDataBlock::gdbAlignBBox() for implementation details. | |
cflag | integer. GridFunction communication flag. Synchronization of ghost cells desired. Use DAGHCommSimple for standard synchronization and DAGHNoComm for GridFunctions that need not be synchronized. See DAGHParams.h for possible values. | |
bflag | integer. External or physical boundary types. The usual value should be DAGHBoundaryUserDef. See DAGHParams.h for possible values. | |
adptbflag | integer. Adaptive or internal boundary types. Use DAGHAdaptBoundaryInterp for standard linear time-space interpolation. See DAGHParams.h for possible values. | |
extghflag | integer. Allows additional auxiliary ghost cell. Use DAGHNoExternalGhost in standard cases. See DAGHParams.h for possible values. |
int GridFunction< GFType, dim >::dagh_timevalue | ( | const int | t, | |
const int | l | |||
) | const [inline] |
Actual time in internal integer time-units.
To each time-step that took place during a run a unique integer time-value is assigned. The time-value depends on the actual level and is calculated in respect to the refinement factors defined in GridHierarchy.
void GridFunction< GFType, dim >::GF_AdaptiveBndryUpdate | ( | const int | time, | |
const int | level | |||
) |
Apply boundary conditions at internal adaptive boundaries.
The values are derived via linear time-space interpolation from the coarser level.
void GridFunction< GFType, dim >::GF_CheckpointRestart | ( | int | proc = -1 |
) | [virtual] |
Read GridDataBlocks from checkpointing-file.
A Restart on a different number of processors is possible.
Reimplemented from GridFunctionVoid.
void GridFunction< GFType, dim >::GF_ExternalBndryUpdate | ( | const int | time, | |
const int | level | |||
) |
Apply physical boundary conditions.
Usually, the boundary type() will be DAGHBoundaryUserDef and the user-supplied function bfunc will be called.
void GridFunction< GFType, dim >::GF_Prolong | ( | const int | tf, | |
const int | lf, | |||
const int | tt, | |||
const int | lt, | |||
const BBox & | bb | |||
) |
Call pfunc for an entire level.
GF_Prolong requires level lf to be synchronized, if prolongation uses ghost cells. It prolongates even into ghost cells of level lt. Calling GF_Sync() on level lt is not necessary.
void GridFunction< GFType, dim >::GF_ReadGhosts | ( | const int | time, | |
const int | level, | |||
const int | axis, | |||
const int | dir | |||
) | [virtual] |
Read ghost cell values from local and neighbouring processores.
Local values simply have to copied. Multiple periodic boundaries are considered.
Reimplemented from GridFunctionVoid.
void GridFunction< GFType, dim >::GF_Restrict | ( | const int | tf, | |
const int | lf, | |||
const int | tt, | |||
const int | lt, | |||
const BBox & | bb | |||
) |
Call rfunc for an entire level.
GF_Restrict requires level lf to be synchronized, if restriction uses ghost cells. It restricts even into ghost cells of level lt, but only into grids with overlapping internal cells. Calling GF_Sync() on level lt is necessary for correct syncronization.
void GridFunction< GFType, dim >::GF_WriteGhosts | ( | const int | time, | |
const int | level, | |||
const int | axis, | |||
const int | dir | |||
) | [virtual] |
Send values from regions where ghost cells of other grids overlap to neighbouring processors.
Local values are just copied in GF_ReadGhosts and need not be considered in GF_WriteGhosts Multiple periodic boundaries are considered even over processor borders.
Reimplemented from GridFunctionVoid.