chombo-discharge
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::RadiativeTransfer::RadiativeTransferStepper< T > Class Template Reference

Implementation of TimeStepper for solving for a single radiative transfer species. This supports both Monte Carlo photons and Helmholtz approximations through the common RtSolver interface. More...

#include <CD_RadiativeTransferStepper.H>

Inheritance diagram for Physics::RadiativeTransfer::RadiativeTransferStepper< T >:
Inheritance graph
[legend]
Collaboration diagram for Physics::RadiativeTransfer::RadiativeTransferStepper< T >:
Collaboration graph
[legend]

Public Member Functions

 RadiativeTransferStepper ()
 Constructor. Reads a couple of input options.
 
virtual ~RadiativeTransferStepper ()
 Destructor (does nothing)
 
void setupSolvers () override
 Set up the solver.
 
void initialData () override
 Fill simulation with initial data.
 
void allocate () override
 Allocate necessary memory for solvers.
 
void postInitialize () override
 Post-initialization functionality – sets the source term.
 
void postCheckpointSetup () override
 Perform post-checkpoint setup routines (sets the source in the solver)
 
int getNumberOfPlotVariables () const override
 Get number of plot variables for this physics module.
 
Vector< std::string > getPlotVariableNames () const override
 Get plot variable names.
 
void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const override
 Write plot data to output holder. More...
 
Real computeDt () override
 Compute a time step to be used by Driver.
 
Real advance (const Real a_dt) override
 Advancement method. Calls the solver function. More...
 
void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override
 Synchronzie solver times and time steps. More...
 
void printStepReport () override
 Print a step report (does nothing) More...
 
void parseRuntimeOptions () override
 Parse runtime options.
 
void registerRealms () override
 Register realms.
 
void registerOperators () override
 Register operators – calls the solver registration routine.
 
void preRegrid (const int a_lmin, const int a_oldFinestLevel) override
 Perform pre-regrid operations – calls the solver function. operation takes a lot of memory. More...
 
void regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 Regrid function. Calls the solver function. More...
 
void postRegrid () override
 Post-regrid function. Sets a Gaussian source.
 
void forceDt (const Real a_dt)
 Force usage of a time step. More...
 
Real getDt () const
 Get the time step.
 
const EBAMRCellDatagetPhi () const
 Get the solver solution.
 
- Public Member Functions inherited from TimeStepper
 TimeStepper ()
 Default constructor (does nothing)
 
virtual ~TimeStepper ()
 Default destructor (does nothing)
 
void setAmr (const RefCountedPtr< AmrMesh > &a_amr)
 Set AmrMesh. More...
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry. More...
 
virtual void prePlot ()
 An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY before writing the plot file.
 
virtual void postPlot ()
 An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY after writing the plot file.
 
virtual Vector< long int > getCheckpointLoads (const std::string a_realm, const int a_level) const
 Get computational loads to be checkpointed. More...
 
virtual bool needToRegrid ()
 Fuction which can have Driver do regrids at arbitrary points in the simulation. More...
 
virtual bool loadBalanceThisRealm (const std::string a_realm) const
 Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines will be called during regrids. More...
 
virtual void loadBalanceBoxes (Vector< Vector< int >> &a_procs, Vector< Vector< Box >> &a_boxes, const std::string a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel)
 Load balance grid boxes for a specified realm. More...
 

Protected Member Functions

void setGaussianSource ()
 For setting a Gaussian source in the radiative transfer equation solver.
 

Protected Attributes

std::string m_realm
 Realm where solver lives.
 
Real m_dt
 Time step to use.
 
Real m_forceDt
 Forced time step. More...
 
RefCountedPtr< RtSolverm_solver
 Reference to solver.
 
RefCountedPtr< RtSpeciesm_species
 Reference to species.
 
- Protected Attributes inherited from TimeStepper
int m_verbosity
 Class verbosity.
 
int m_timeStep
 Time step.
 
Real m_time
 TIme.
 
Real m_dt
 Previous time step size.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry.
 

Detailed Description

template<class T>
class Physics::RadiativeTransfer::RadiativeTransferStepper< T >

Implementation of TimeStepper for solving for a single radiative transfer species. This supports both Monte Carlo photons and Helmholtz approximations through the common RtSolver interface.

Member Function Documentation

◆ advance()

template<typename T >
Real RadiativeTransferStepper::advance ( const Real  a_dt)
overridevirtual

Advancement method. Calls the solver function.

Parameters
[in]a_dtTime step to be used for advancement
Returns
a_dt

Implements TimeStepper.

◆ forceDt()

template<typename T >
void RadiativeTransferStepper::forceDt ( const Real  a_dt)

Force usage of a time step.

To remove the forced time step restriction, set a_dt to something negative

Parameters
[in]a_dtForced time step.

◆ preRegrid()

template<typename T >
void RadiativeTransferStepper::preRegrid ( const int  a_lmin,
const int  a_oldFinestLevel 
)
overridevirtual

Perform pre-regrid operations – calls the solver function. operation takes a lot of memory.

Parameters
[in]a_lminThe coarsest level that changes
[in]a_oldFinestLevelThe finest level before the regrid.

Implements TimeStepper.

◆ printStepReport()

template<typename T >
void RadiativeTransferStepper::printStepReport
overridevirtual

Print a step report (does nothing)

This is called by Driver after time step.

Implements TimeStepper.

◆ regrid()

template<typename T >
void RadiativeTransferStepper::regrid ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
overridevirtual

Regrid function. Calls the solver function.

Parameters
[in]a_lminThe coarsest level that changed.
[in]a_oldFinestLevelThe finest level before the regrid.
[in]a_newFinestLevelThe finest level after the regrid.

Implements TimeStepper.

◆ synchronizeSolverTimes()

template<typename T >
void RadiativeTransferStepper::synchronizeSolverTimes ( const int  a_step,
const Real  a_time,
const Real  a_dt 
)
overridevirtual

Synchronzie solver times and time steps.

Parameters
[in]a_stepTime step
[in]a_timeTime (in seconds)
[in]a_dtTime step that was used.

Implements TimeStepper.

◆ writePlotData()

template<typename T >
void RadiativeTransferStepper::writePlotData ( LevelData< EBCellFAB > &  a_output,
int &  a_icomp,
const std::string  a_outputRealm,
const int  a_level 
) const
overridevirtual

Write plot data to output holder.

Parameters
[in,out]a_outputOutput data holder.
[in,out]a_icompStarting component in a_output to begin at.
[in]a_outputRealmRealm where a_output belongs
[in]a_levelGrid level

Implements TimeStepper.

Member Data Documentation

◆ m_forceDt

template<class T >
Real Physics::RadiativeTransfer::RadiativeTransferStepper< T >::m_forceDt
protected

Forced time step.

This exists because the solver uses m_dt as a runtime input but there are cases when we want to force a time step.


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