|
criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
|
Gas model stored as snapshots on a Cartesian grid. More...
#include <CartesianTimeInterp.H>
Public Member Functions | |
| CartesianTimeInterp (const ParmParser &pp, const Geometry &geom_, const IdxType nBB, const int nGhost=1) | |
| Constructor. | |
| virtual | ~CartesianTimeInterp () |
| Destructor. | |
| virtual void | frame (const RealVec &x, const Real t, RealVec &v, TNBBasis &tnb) const override |
| Compute the comoving TNB frame for the gas. | |
| virtual GasData | gasData (const RealVec &x, const Real t) const override |
| Return background gas state. | |
| virtual Real | dxGhost () const override |
| Size of the ghost region in the gas data. | |
| virtual void | updateState (const Real t, Real &tNext) override |
| Update the gas data. | |
| virtual void | loadData (const IdxType idx, CartesianGrid *g)=0 |
| Load a new snapshot into memory. | |
Public Member Functions inherited from criptic::gas::Gas | |
| virtual | ~Gas () |
| Empty virtual destructor. | |
Protected Attributes | |
| std::vector< Real > | tSlice |
| IdxType | tPtr |
Private Attributes | |
| int | verbosity |
| CartesianGrid * | gasOld |
| CartesianGrid * | gasNew |
| bool | dataLoaded |
Gas model stored as snapshots on a Cartesian grid.
This class provides the ability to describe a gas whose properties are specified on a series of Cartesian grids that represent distinct snapshots in time. The snapshots are stored on disk, and read into memory only as necessary. The reader is left as a pure virtual function, so this is an abstract base class. Derived classes can then implement methods to read data in their preferred format.
| CartesianTimeInterp::CartesianTimeInterp | ( | const ParmParser & | pp, |
| const Geometry & | geom_, | ||
| const IdxType | nBB, | ||
| const int | nGhost = 1 |
||
| ) |
Constructor.
| pp | criptic::ParmParser object containing the input deck |
| geom_ | criptic::Geometry object describing problem geometry |
| nBB | Number of blackbody radiation components |
| nGhost | Number of ghost zones to add to grid |
|
virtual |
Destructor.
|
inlineoverridevirtual |
Size of the ghost region in the gas data.
This returns the physical size of the ghost region.
Reimplemented from criptic::gas::Gas.
|
inlineoverridevirtual |
Compute the comoving TNB frame for the gas.
| x | Position |
| t | Time |
| v | Comoving velocity at specified position and time |
| tnb | The TNBBasis at the specified position and time |
This function computes the comoving TNB frame for the gas at a specified position and time.
Reimplemented from criptic::gas::Gas.
|
inlineoverridevirtual |
Return background gas state.
| x | Position |
| t | Time |
This method return the GasData describing the gas at the input (x, t).
Implements criptic::gas::Gas.
|
pure virtual |
Load a new snapshot into memory.
| idx | Index of snapshot to read |
| g | The CartesianGrid object into which to place the data |
This is a pure virtual function, which must be implemented by derived classes. Its purpose is to load a new snapshot into memory; the method update the data in the CartesianGrid object it is passed to the specified time index.
Implemented in criptic::gas::CartesianTimeInterpFLASH.
Update the gas data.
| t | Current time |
| tNext | Next time |
This function is called at the start of every time step, and is responsible for loading new snapshots into memory when required.
Reimplemented from criptic::gas::Gas.
|
private |
Have data been loaded yet?
|
private |
Pointer to new gas snapshot
|
private |
Pointer to old gas snapshot
|
protected |
Pointer to current snapshot
|
protected |
Times of snapshots
|
private |
Verbosity level