criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Attributes | List of all members
criptic::gas::CartesianTimeInterp Class Referenceabstract

Gas model stored as snapshots on a Cartesian grid. More...

#include <CartesianTimeInterp.H>

Inheritance diagram for criptic::gas::CartesianTimeInterp:
criptic::gas::Gas criptic::gas::CartesianTimeInterpFLASH

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< RealtSlice
 
IdxType tPtr
 

Private Attributes

int verbosity
 
CartesianGridgasOld
 
CartesianGridgasNew
 
bool dataLoaded
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CartesianTimeInterp()

CartesianTimeInterp::CartesianTimeInterp ( const ParmParser pp,
const Geometry geom_,
const IdxType  nBB,
const int  nGhost = 1 
)

Constructor.

Parameters
ppcriptic::ParmParser object containing the input deck
geom_criptic::Geometry object describing problem geometry
nBBNumber of blackbody radiation components
nGhostNumber of ghost zones to add to grid

◆ ~CartesianTimeInterp()

CartesianTimeInterp::~CartesianTimeInterp ( )
virtual

Destructor.

Member Function Documentation

◆ dxGhost()

virtual Real criptic::gas::CartesianTimeInterp::dxGhost ( ) const
inlineoverridevirtual

Size of the ghost region in the gas data.

Returns
Ghost region size

This returns the physical size of the ghost region.

Reimplemented from criptic::gas::Gas.

◆ frame()

virtual void criptic::gas::CartesianTimeInterp::frame ( const RealVec x,
const Real  t,
RealVec v,
TNBBasis tnb 
) const
inlineoverridevirtual

Compute the comoving TNB frame for the gas.

Parameters
xPosition
tTime
vComoving velocity at specified position and time
tnbThe 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.

◆ gasData()

virtual GasData criptic::gas::CartesianTimeInterp::gasData ( const RealVec x,
const Real  t 
) const
inlineoverridevirtual

Return background gas state.

Parameters
xPosition
tTime
Returns
GasData at specified (x, t)

This method return the GasData describing the gas at the input (x, t).

Implements criptic::gas::Gas.

◆ loadData()

virtual void criptic::gas::CartesianTimeInterp::loadData ( const IdxType  idx,
CartesianGrid g 
)
pure virtual

Load a new snapshot into memory.

Parameters
idxIndex of snapshot to read
gThe 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.

◆ updateState()

void CartesianTimeInterp::updateState ( const Real  t,
Real tNext 
)
overridevirtual

Update the gas data.

Parameters
tCurrent time
tNextNext 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.

Member Data Documentation

◆ dataLoaded

bool criptic::gas::CartesianTimeInterp::dataLoaded
private

Have data been loaded yet?

◆ gasNew

CartesianGrid* criptic::gas::CartesianTimeInterp::gasNew
private

Pointer to new gas snapshot

◆ gasOld

CartesianGrid* criptic::gas::CartesianTimeInterp::gasOld
private

Pointer to old gas snapshot

◆ tPtr

IdxType criptic::gas::CartesianTimeInterp::tPtr
protected

Pointer to current snapshot

◆ tSlice

std::vector<Real> criptic::gas::CartesianTimeInterp::tSlice
protected

Times of snapshots

◆ verbosity

int criptic::gas::CartesianTimeInterp::verbosity
private

Verbosity level


The documentation for this class was generated from the following files: