chombo-discharge
|
Abstract RTE solver class for doing various kinds of radiative transfer equations. This class is a pure class and it is basically just an interface. More...
#include <CD_RtSolver.H>
Public Member Functions | |
RtSolver () | |
Constructor. | |
virtual | ~RtSolver () |
Constructor (does nothing) | |
virtual std::string | getName () |
Get solver name. | |
virtual const std::string | getRealm () const |
Get the realm where the solver lives. | |
virtual void | parseOptions ()=0 |
Parse options. | |
virtual void | parseRuntimeOptions ()=0 |
Parse runtime options. | |
virtual bool | advance (const Real a_dt, const bool a_zeroPhi=false) |
Advance equation one time step. More... | |
virtual bool | advance (const Real a_dt, EBAMRCellData &a_phi, const bool a_zeroPhi=false) |
Advance method. Advances one time step. More... | |
virtual bool | advance (const Real a_dt, EBAMRCellData &a_phi, const EBAMRCellData &a_source, const bool a_zeroPhi=false)=0 |
Advance method. Advances one time step. More... | |
virtual void | setRealm (const std::string a_realm) |
Set realm where this solver lives. More... | |
virtual void | setRtSpecies (const RefCountedPtr< RtSpecies > &a_species) |
Set the radiative transfer species (RtSpecies) More... | |
virtual void | setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > a_computationalGeometry) |
Set computational geometry. More... | |
virtual void | computeLoads (Vector< long long > &a_loads, const DisjointBoxLayout &a_dbl, const int a_level) const noexcept |
Get computational loads for a specific grid level. More... | |
virtual void | setAmr (const RefCountedPtr< AmrMesh > &a_amr) |
Set the amr object. More... | |
virtual void | setPhase (phase::which_phase a_phase=phase::gas) |
Set phase. More... | |
virtual void | setVerbosity (const int a_verbosity) |
Set verbosity. More... | |
virtual void | setTime (const int a_step, const Real a_time, const Real a_dt) |
Set the time for this solver. More... | |
virtual void | setStationary (const bool a_stationary) |
Set stationary solver or not. More... | |
virtual void | sanityCheck () |
Sanity check. | |
virtual bool | isStationary () |
Check if solver is stationary. | |
virtual void | computeBoundaryFlux (EBAMRIVData &a_ebFlux, const EBAMRCellData &a_phi)=0 |
Compute the boundary flux given a state (a_phi will be different for different RTE approximations) More... | |
virtual void | computeDomainFlux (EBAMRIFData &a_domainflux, const EBAMRCellData &a_phi)=0 |
Compute the domain flux given a state (a_phi will be different for different RTE approximations) More... | |
virtual void | computeFlux (EBAMRCellData &a_flux, const EBAMRCellData &a_phi)=0 |
Compute the flux. More... | |
virtual void | computeDensity (EBAMRCellData &a_isotropic, const EBAMRCellData &a_phi)=0 |
Get isotropic part. More... | |
virtual void | allocate ()=0 |
Allocate internal storage. | |
virtual void | deallocate ()=0 |
Deallocate internal storage. | |
virtual void | preRegrid (const int a_lbase, const int a_oldFinestLevel)=0 |
Perform pre-regrid operations. More... | |
virtual void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel)=0 |
Regrid this solver. More... | |
virtual void | registerOperators ()=0 |
Register operators. | |
virtual void | initialData () |
Fill solver with initial data. By default, this sets internal data to zero. More... | |
virtual void | setSource (const EBAMRCellData &a_source) |
Set source term. More... | |
virtual void | setSource (const Real a_source) |
Set source. More... | |
virtual void | setSource (const std::function< Real(const RealVect a_pos)> a_source) |
Set source. More... | |
virtual void | writePlotFile ()=0 |
Write plot file. | |
virtual int | getNumberOfPlotVariables () const |
Get number of output fields. More... | |
virtual Vector< std::string > | getPlotVariableNames () const |
Get output plot names. | |
virtual void | writePlotData (LevelData< EBCellFAB > &a_output, int &a_comp, const std::string a_outputRealm, const int a_level) const noexcept |
Write output data to a_output. More... | |
virtual Real | getTime () const |
Get current time. More... | |
virtual phase::which_phase | getPhase () |
Get the RTE phase. More... | |
virtual EBAMRCellData & | getPhi () |
Get solver state. More... | |
virtual EBAMRCellData & | getSource () |
Get multifluid source. More... | |
virtual EBAMRFluxData & | getKappa () |
Get the absorption length. More... | |
virtual EBAMRIVData & | getKappaEb () |
Get the absorption coefficient on irregular EB faces. More... | |
virtual RefCountedPtr< RtSpecies > & | getSpecies () |
Get species. | |
Protected Member Functions | |
void | setEbIndexSpace (const RefCountedPtr< EBIndexSpace > &a_ebis) |
Set ebis. | |
void | parseVerbosity () noexcept |
Parse verbosity. | |
virtual void | writeData (LevelData< EBCellFAB > &a_output, int &a_comp, const EBAMRCellData &a_data, const std::string a_outputRealm, const int a_level, const bool a_interpToCentroids, const bool a_interpGhost) const noexcept |
Write data to output. Convenience function. More... | |
Protected Attributes | |
Location::Cell | m_dataLocation |
Data location. | |
std::string | m_realm |
Realm where this solver lives. | |
RefCountedPtr< EBIndexSpace > | m_ebis |
EBIndexSpace for this solver. | |
RefCountedPtr< RtSpecies > | m_rtSpecies |
Radiative transfer species (contains meta-information like initial conditions) | |
RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
Computational geometry. | |
RefCountedPtr< AmrMesh > | m_amr |
AMR; needed for grid stuff. | |
phase::which_phase | m_phase |
Phase. | |
std::string | m_name |
Name for this solver. | |
std::string | m_className |
Class name – needed because inherited classes will be named different. | |
EBAMRCellData | m_cachePhi |
Cached state used for regridding. | |
EBAMRCellData | m_phi |
Internal state. More... | |
EBAMRCellData | m_source |
Source term. More... | |
EBAMRFluxData | m_kappa |
Absorption coefficient. | |
EBAMRIVData | m_kappaEB |
Absorption coefficient on EB faces. | |
Real | m_time |
Time. | |
Real | m_dt |
Time increment. | |
bool | m_stationary |
Stationary solver or not. | |
bool | m_plotPhi |
Output state. | |
bool | m_plotSource |
Output source term. | |
int | m_verbosity |
int | m_timeStep |
Time step. | |
Static Protected Attributes | |
static constexpr int | m_comp = 0 |
Default component that we solve for. | |
static constexpr int | m_nComp = 1 |
Default number of components. | |
Abstract RTE solver class for doing various kinds of radiative transfer equations. This class is a pure class and it is basically just an interface.
|
virtual |
Advance equation one time step.
[in] | a_dt | Time step |
[in] | a_zeroPhi | An optional argument for e.g. elliptic solves which can start from previous solution or zero. |
|
virtual |
Advance method. Advances one time step.
[in] | a_dt | Time step |
[in] | a_phi | Mesh solution |
[in] | a_zeroPhi | An optional argument for e.g. elliptic solves which can start from previous solution or zero. |
|
pure virtual |
Advance method. Advances one time step.
[in] | a_dt | Time step |
[in] | a_phi | Mesh solution |
[in] | a_source | Source term |
[in] | a_zeroPhi | An optional argument for e.g. elliptic solves which can start from previous solution or zero. |
Implemented in McPhoto, and EddingtonSP1.
|
pure virtual |
Compute the boundary flux given a state (a_phi will be different for different RTE approximations)
[in,out] | a_ebFlux | The flux on the EB |
[in] | a_phi | Cell-centered solution for the RTE state (e.g. for Eddington this is just the isotropic part). |
Implemented in McPhoto, and EddingtonSP1.
|
pure virtual |
Get isotropic part.
[in,out] | a_isotropic | Isotropic part of the RTE solution |
[in] | a_phi | Full RTE solution. |
This is normally just a copy, but I need the function signature in order to have a clear plasma-coupling interface
Implemented in McPhoto, and EddingtonSP1.
|
pure virtual |
Compute the domain flux given a state (a_phi will be different for different RTE approximations)
[in,out] | a_domainFlux | The flux on the domain wall |
[in] | a_phi | Cell-centered solution for the RTE state (e.g. for Eddington this is just the isotropic part). |
Implemented in McPhoto, and EddingtonSP1.
|
pure virtual |
Compute the flux.
[in,out] | a_flux | The RTE flux on the domain wall |
[in] | a_phi | Cell-centered solution for the RTE state (e.g. for Eddington this is just the isotropic part). |
For diffusive models, the flux will be something like grad(a_phi). For higher-order models, the flux will be contained in a_phi (somehow).
Implemented in McPhoto, and EddingtonSP1.
|
virtualnoexcept |
Get computational loads for a specific grid level.
[out] | a_loads | Grid loads for this level. |
[in] | a_dbl | Grids on input level |
[in] | a_level | Input level |
The default implementation returns the number of cells in the grid patch as a proxy for the load.
Reimplemented in McPhoto.
|
virtual |
Get the absorption length.
|
virtual |
Get the absorption coefficient on irregular EB faces.
|
virtual |
Get number of output fields.
Reimplemented in McPhoto.
|
virtual |
Get the RTE phase.
|
virtual |
Get solver state.
|
virtual |
Get multifluid source.
|
virtual |
Get current time.
|
virtual |
Fill solver with initial data. By default, this sets internal data to zero.
Default implementation sets to zero – override if you want to have different initial conditions.
|
pure virtual |
Perform pre-regrid operations.
[in] | a_lbase | Coarsest level that changed during regrid. |
[in] | a_oldFinestLevel | Finest grid level before the regrid operation. |
Implemented in McPhoto, and EddingtonSP1.
|
pure virtual |
Regrid this solver.
[in] | a_lmin | Coarsest level where grids did not change. |
[in] | a_oldFinestLevel | Finest AMR level before the regrid. |
[in] | a_newFinestLevel | Finest AMR level after the regrid. |
Implemented in McPhoto, and EddingtonSP1.
|
virtual |
Set the amr object.
[in] | a_amr | AmrMesh object. |
|
virtual |
Set computational geometry.
[in] | a_computationalGeometry | Computational geometry |
|
virtual |
Set phase.
[in] | a_phase | Phase (gas/solid) where the solver lives. |
This must be done BEFORE callilng setComputationalGeometry
|
virtual |
Set realm where this solver lives.
[in] | a_realm | Realm |
|
virtual |
Set the radiative transfer species (RtSpecies)
[in] | a_species | Species (see RtSpecies.H) |
|
virtual |
Set source term.
[in] | a_source | Source term |
|
virtual |
Set source.
[in] | a_source | Source term |
|
virtual |
Set source.
[in] | a_source | Source term (varies in space) |
|
virtual |
Set stationary solver or not.
[in] | a_stationary | If true, the solver is set to stationary mode. |
|
virtual |
Set the time for this solver.
[in] | a_step | Time step number |
[in] | a_time | Time (in seconds) |
[in] | a_dt | Time step increment |
|
virtual |
Set verbosity.
[in] | a_verbosity | Verbosity level. |
|
protectedvirtualnoexcept |
Write data to output. Convenience function.
[in,out] | a_output | Output data holder. |
[in,out] | a_icomp | Starting component where this solver begins writing the output. |
[in] | a_data | Data to write. |
[in] | a_level | Grid level |
[in] | a_outputRealm | Realm to which a_output belongs |
[in] | a_interpToCentroids | If true, a_data will be interpolated to cell centroids before writing to a_output. |
[in] | a_interpGhost | If true, interpolate ghost cells |
|
virtualnoexcept |
Write output data to a_output.
[in,out] | a_output | Output data holder. |
[in,out] | a_icomp | Starting component where this solver begins writing the output. |
[in] | a_outputRealm | Realm where a_output belongs |
[in] | a_level | Grid level |
Reimplemented in McPhoto.
|
protected |
Internal state.
For diffusive models, this will only contain the isotropic density. For higher order models, this should also include the flux, Eddigton tensor etc.
|
protected |
Source term.
For diffusive models, this will only contain the isotropic source. For higher order models, this should also include beam sources.