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

Gas class derived from a GIZMO snapshot. More...

#include <GizmoGas.H>

Inheritance diagram for criptic::gas::GizmoGas:
criptic::gas::Gas

Public Member Functions

 GizmoGas (std::string filename, Real hLimit=0, int leafSize_=32)
 Construct a GizmoGas object with a filename.
 
 GizmoGas (const ParmParser &pp, const Geometry &geom_, const IdxType nBB, const int nGhost)
 Construct a GizmoGas object with the input deck.
 
 ~GizmoGas ()
 Destructor.
 
virtual GasData gasData (const RealVec &x, const Real t) const override
 Returns a gasData object describing the gas at the input point.
 
- Public Member Functions inherited from criptic::gas::Gas
virtual ~Gas ()
 Empty virtual destructor.
 
virtual void frame (const RealVec &x, const Real t, RealVec &v, TNBBasis &tnb) const
 Compute the comoving TNB frame for the gas.
 
virtual Real dxGhost () const
 Size of the ghost region in the gas data.
 
virtual void updateState (const Real t, Real &tNext)
 Update the gas data.
 

Static Public Member Functions

static GizmoGasloadData (const std::string filename, Real hLimit=0, int leafSize=32)
 Loads a GizmoGas object from just a filename.
 
static GizmoGasloadData (const std::string filename, const ParmParser &pp, const Geometry &geom_, const IdxType nBB_, const int nGhost_=1)
 Loads a GizmoGas object with the input deck and a filename.
 
static Real loadTime (std::string filename)
 Loads the snapshot time of a snapshot.
 

Private Attributes

std::string filename
 
Real hLim
 
int leafSize
 
int verbosity
 
GizmoReaderdata
 
GasTreeparticleTree
 

Detailed Description

Gas class derived from a GIZMO snapshot.

This is the gas class to use for initialising gas simulations. The full data is contained in the GizmoReader object, while GizmoGas also contains the particle tree and the necessary gasData function

Constructor & Destructor Documentation

◆ GizmoGas() [1/2]

GizmoGas::GizmoGas ( std::string  filename,
Real  hLimit = 0,
int  leafSize_ = 32 
)

Construct a GizmoGas object with a filename.

Parameters
filenameString of GIZMO snapshot location from root
hLimitReal number to limit smoothing lengths in the tree. Use zero for no limit on h
leafSize_int for leaf size in the tree

This constructor requires only a filename, which fully defines a snapshot file. Other constructors are necessary to get the requisite filename from the input deck

◆ GizmoGas() [2/2]

GizmoGas::GizmoGas ( const ParmParser pp,
const Geometry geom_,
const IdxType  nBB,
const int  nGhost 
)

Construct a GizmoGas object with the input deck.

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

This constructor is used to initialise a TimeInterp<GizmoGas> object such that the constructor inputs match those for a cartesian grid object. Only the ParmParser is used to get a filename to use. This constructor is defined for compatibility purposes with the rest of the code and should not be used for time-dependent runs–loadData should be used instead.

◆ ~GizmoGas()

criptic::gas::GizmoGas::~GizmoGas ( )
inline

Destructor.

Member Function Documentation

◆ gasData()

GasData GizmoGas::gasData ( const RealVec x,
const Real  t 
) const
overridevirtual

Returns a gasData object describing the gas at the input point.

Parameters
xRealVec of position to get gas quantities for
tSimulation time

This is the GizmoGas instantiation of the pure virtual Gas::gasData function, working with a single GIZMO snapshot.

Implements criptic::gas::Gas.

◆ loadData() [1/2]

static GizmoGas * criptic::gas::GizmoGas::loadData ( const std::string  filename,
const ParmParser pp,
const Geometry geom_,
const IdxType  nBB_,
const int  nGhost_ = 1 
)
inlinestatic

Loads a GizmoGas object with the input deck and a filename.

Parameters
filenameString of GIZMO snapshot location from root
ppcriptic::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

Used in timeInterp to load new snapshots, using enough parameters such that timeInterp works with Cartesian gas descriptions.

◆ loadData() [2/2]

static GizmoGas * criptic::gas::GizmoGas::loadData ( const std::string  filename,
Real  hLimit = 0,
int  leafSize = 32 
)
inlinestatic

Loads a GizmoGas object from just a filename.

Parameters
filenameString of GIZMO snapshot location from root
hLimitReal number to limit smoothing lengths in the tree.
leafSizeint for leaf size in the tree

loadData is used in timeInterp to load new snapshots while advancing over time. Functionally identical to the constructor with the same inputs

◆ loadTime()

Real GizmoGas::loadTime ( std::string  filename)
static

Loads the snapshot time of a snapshot.

Parameters
filenameString of filename to check

Member Data Documentation

◆ data

GizmoReader* criptic::gas::GizmoGas::data
private

Pointer to full data

◆ filename

std::string criptic::gas::GizmoGas::filename
private

Filename of the GIZMO snapshot from root

◆ hLim

Real criptic::gas::GizmoGas::hLim
private

Limit on smoothing lengths for the particle tree

◆ leafSize

int criptic::gas::GizmoGas::leafSize
private

Leaf size of the particle tree

◆ particleTree

GasTree* criptic::gas::GizmoGas::particleTree
private

Pointer to particle tree

◆ verbosity

int criptic::gas::GizmoGas::verbosity
private

Verbosity level


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