|
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 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. | |
| virtual bool | advance (const Real a_dt, EBAMRCellData &a_phi, const bool a_zeroPhi=false) |
| Advance method. Advances one time step. | |
| 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. | |
| virtual void | setRealm (const std::string &a_realm) |
| Set realm where this solver lives. | |
| virtual void | setRtSpecies (const RefCountedPtr< RtSpecies > &a_RtSpecies) |
| Set the radiative transfer species (RtSpecies) | |
| virtual void | setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry) |
| Set computational geometry. | |
| 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. | |
| virtual void | setAmr (const RefCountedPtr< AmrMesh > &a_amr) |
| Set the amr object. | |
| virtual void | setPhase (phase::which_phase a_phase=phase::gas) |
| Set phase. | |
| virtual void | setVerbosity (const int a_verbosity) |
| Set verbosity. | |
| virtual void | setTime (const int a_step, const Real a_time, const Real a_dt) |
| Set the time for this solver. | |
| virtual void | setStationary (const bool a_stationary) |
| Set stationary solver or not. | |
| 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) | |
| 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) | |
| virtual void | computeFlux (EBAMRCellData &a_flux, const EBAMRCellData &a_phi)=0 |
| Compute the flux. | |
| virtual void | computeDensity (EBAMRCellData &a_isotropic, const EBAMRCellData &a_phi)=0 |
| Get isotropic part. | |
| 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. | |
| virtual void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel)=0 |
| Regrid this solver. | |
| virtual void | registerOperators ()=0 |
| Register operators. | |
| virtual void | initialData () |
| Fill solver with initial data. By default, this sets internal data to zero. | |
| virtual void | setSource (const EBAMRCellData &a_source) |
| Set source term. | |
| virtual void | setSource (const Real a_source) |
| Set source. | |
| virtual void | setSource (const std::function< Real(const RealVect a_pos)> &a_source) |
| Set source. | |
| virtual void | writePlotFile ()=0 |
| Write plot file. | |
| virtual int | getNumberOfPlotVariables () const |
| Get number of output fields. | |
| 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. | |
| virtual Real | getTime () const |
| Get current time. | |
| virtual phase::which_phase | getPhase () |
| Get the RTE phase. | |
| virtual EBAMRCellData & | getPhi () |
| Get solver state. | |
| virtual EBAMRCellData & | getSource () |
| Get multifluid source. | |
| virtual EBAMRFluxData & | getKappa () |
| Get the absorption length. | |
| virtual EBAMRIVData & | getKappaEb () |
| Get the absorption coefficient on irregular EB faces. | |
| 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. | |
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 = "RtSolver" |
| Name for this solver. | |
| std::string | m_className = "RtSolver" |
| Class name – needed because inherited classes will be named different. | |
| EBAMRCellData | m_cachePhi |
| Cached state used for regridding. | |
| EBAMRCellData | m_phi |
| Internal state. | |
| EBAMRCellData | m_source |
| Source term. | |
| 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 = -1 |
| 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 EddingtonSP1, and McPhoto.
|
pure virtual |
Allocate internal storage.
Implemented in EddingtonSP1, and McPhoto.
|
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 EddingtonSP1, and McPhoto.
|
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 EddingtonSP1, and McPhoto.
|
pure virtual |
Compute the domain flux given a state (a_phi will be different for different RTE approximations)
| [in] | a_phi | Cell-centered solution for the RTE state (e.g. for Eddington this is just the isotropic part). |
| [in] | a_domainflux | Domainflux |
Implemented in EddingtonSP1, and McPhoto.
|
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 EddingtonSP1, and McPhoto.
|
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.
|
pure virtual |
Deallocate internal storage.
Implemented in EddingtonSP1, and McPhoto.
|
virtual |
Get the absorption length.
|
virtual |
Get the absorption coefficient on irregular EB faces.
|
virtual |
Get solver name.
|
virtual |
Get number of output fields.
Reimplemented in McPhoto.
|
virtual |
Get the RTE phase.
|
virtual |
Get solver state.
|
virtual |
|
virtual |
Get the realm where the solver lives.
|
virtual |
Get multifluid source.
|
virtual |
Get species.
|
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.
|
virtual |
Check if solver is stationary.
|
pure virtual |
Parse options.
Implemented in EddingtonSP1, and McPhoto.
|
pure virtual |
Parse runtime options.
Implemented in EddingtonSP1, and McPhoto.
|
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 EddingtonSP1, and McPhoto.
|
pure virtual |
Register operators.
Implemented in EddingtonSP1, and McPhoto.
|
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 EddingtonSP1, and McPhoto.
|
virtual |
Set the amr object.
| [in] | a_amr | AmrMesh object. |
|
virtual |
Set computational geometry.
| [in] | a_computationalGeometry | Computational geometry |
|
protected |
Set ebis.
| [in,out] | a_ebis | Description |
|
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_RtSpecies | 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] | 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 |
| [in] | a_comp | Comp |
|
virtualnoexcept |
|
pure virtual |
Write plot file.
Implemented in EddingtonSP1, and 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.