Class DataBlock

Class Documentation

class DataBlock

Public Functions

void InitFromGrid(Grid&, Input&)

init from a Grid object

void MakeGeometry()

Compute geometrical terms.

Compute the geometrical terms for the grid. This function computes all of the geometrical terms (cell volumes, faces surfaces, trigonometric functions)

void DumpToFile(std::string)

Dump current datablock to a file for inspection.

int CheckNan()

Return the number of cells which have Nans.

void EvolveStage()

Evolve this DataBlock by dt.

void SetBoundaries()

Enforce boundary conditions to this datablock.

void Coarsen()

Coarsen this datablock and its objects.

void ShowConfig()

Show the datablock’s configuration.

real ComputeTimestep()

compute maximum timestep from current state of affairs

void ResetStage()

Reset the variables needed at each major integration Stage.

void EnrollGridCoarseningLevels(GridCoarseningFunc)

Enroll a user function to compute coarsening levels.

void CheckCoarseningLevels()

Check that coarsening levels satisfy requirements.

DataBlock() = default

Public Members

std::vector<IdefixArray1D<real>> x

geometrical central points

std::vector<IdefixArray1D<real>> xr

cell right interface

std::vector<IdefixArray1D<real>> xl

cell left interface

std::vector<IdefixArray1D<real>> dx

cell width

std::vector<IdefixArray1D<real>> xgc

cell geometrical cell center

IdefixArray1D<real> rt

In spherical coordinates, gives $\tilde{r}$.

IdefixArray1D<real> sinx2m

In spherical coordinates, gives sin(th) at a j-1/2 interface

IdefixArray1D<real> tanx2m

In spherical coordinates, gives tan(th) at a j-1/2 interface

IdefixArray1D<real> sinx2

In spherical coordinates, gives sin(th) at the cell center.

IdefixArray1D<real> tanx2

In spherical coordinates, gives tan(th) at the cell center.

IdefixArray1D<real> dmu

In spherical coordinates, gives the $\theta$ volume = fabs(cos(th_m) - cos(th_p))

std::vector<IdefixArray2D<int>> coarseningLevel

Grid coarsening levels (only defined when coarsening is enabled)

std::vector<bool> coarseningDirection

whether a coarsening is used in each direction

std::vector<real> xbeg

Beginning of active domain in datablock.

std::vector<real> xend

End of active domain in datablock.

IdefixArray3D<real> dV

cell volume

std::vector<IdefixArray3D<real>> A

cell right interface area

std::vector<int> np_tot

total number of grid points in datablock

std::vector<int> np_int

active number of grid points in datablock (excl. ghost cells)

std::vector<int> nghost

number of ghost cells at each boundary

std::vector<BoundaryType> lbound

Boundary condition to the left.

std::vector<BoundaryType> rbound

Boundary condition to the right.

bool haveAxis = {false}

has been required for these.

DataBlock contains points on the axis and a special treatment

GridCoarsening haveGridCoarsening = {GridCoarsening::disabled}

Is grid coarsening enabled?

GridCoarseningFunc gridCoarseningFunc = {NULL}

The user-defined grid coarsening level computation function.

std::vector<int> beg

First local index of the active domain.

std::vector<int> end

Last local index of the active domain+1.

std::vector<int> gbeg

First global index of the active domain of this datablock.

std::vector<int> gend

Last global index of the active domain of this datablock.

real dt

Current timestep.

real t

Current time.

Grid *mygrid

Parent grid object.

std::map<std::string, StateContainer> states

conservative state of the datablock (contains references to dedicated objects)

Hydro hydro

The Hydro object attached to this datablock.

bool rklCycle = {false}

// Set to true when we’re inside a RKL call

bool haveFargo = {false}
Fargo fargo
bool haveGravity = {false}
Gravity gravity