|
chombo-discharge
|
Implementation of TimeStepper which runs a single advection-diffusion-reaction solver. More...
#include <CD_AdvectionDiffusionStepper.H>


Public Member Functions | |
| AdvectionDiffusionStepper () | |
| Default constructor – only parses options. | |
| AdvectionDiffusionStepper (RefCountedPtr< CdrSolver > &a_solver) | |
| Full constructor. | |
| virtual | ~AdvectionDiffusionStepper () |
| Destructor (does nothing) | |
| void | initialData () override |
| Fill solver with initial data. | |
| void | allocate () override |
| Allocate memory. | |
| void | postInitialize () override |
| Perform post-initialization routines (there are none) | |
| void | postCheckpointSetup () override |
| Perform post-checkpoint setup routines. | |
| int | getNumberOfPlotVariables () const override |
| Get the number of plot variables. | |
| Vector< std::string > | getPlotVariableNames () const override |
| Get plot variable name. | |
| 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. | |
| Real | computeDt () override |
| Compute a time step to be used by Driver. | |
| void | synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override |
| Synchronize solver times. | |
| void | printStepReport () override |
| Print a step report if you want. | |
| void | parseRuntimeOptions () override |
| Parse runtime options. | |
| void | registerRealms () override |
| Register all realms that will be used. | |
| void | registerOperators () override |
| Register all operators that will be used. | |
| void | preRegrid (const int a_lbase, const int a_finestLevel) override |
| Perform pre-regrid operations. Calls CdrSolver::preRegrid. | |
| void | setupSolvers () override |
| Instantiate the solver. | |
| Real | advance (const Real a_dt) override |
| Advancement function – advances one time step. | |
| void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override |
| Regrid method – calls regrid method for solver. | |
| void | postRegrid () override |
| Perform post-regrid routines. This does nothing. | |
| void | setCFL (const Real a_cfl) |
| Set the CFL number. | |
| void | setInitialData (const std::function< Real(const RealVect &a_position)> &a_initData) noexcept |
| Set the initial data.. | |
| void | setVelocity (const std::function< RealVect(const RealVect &a_position)> &a_velocity) noexcept |
| Set the velocity field. | |
| void | setDiffusionCoefficient (const std::function< Real(const RealVect &a_position)> &a_diffusion) noexcept |
| Set the diffusion coeffieint. | |
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. | |
| void | setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry) |
| Set the computational geometry. | |
| 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. | |
| virtual bool | needToRegrid () |
| Fuction which can have Driver do regrids at arbitrary points in the simulation. | |
| 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. | |
| 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. | |
Protected Types | |
| enum | Integrator { Heun , IMEX } |
| Switch for different integrators. | |
Protected Member Functions | |
| void | parseIntegrator () |
| Parse the integration method. | |
Protected Attributes | |
| RefCountedPtr< CdrSolver > | m_solver |
| Reference to solver. | |
| RefCountedPtr< AdvectionDiffusionSpecies > | m_species |
| Reference to advected species. | |
| std::string | m_realm |
| Realm where the solver lives. | |
| phase::which_phase | m_phase |
| Phase where the solver lives. | |
| std::function< RealVect(const RealVect &a_position)> | m_velocity |
| Velocity field. | |
| std::function< Real(const RealVect &a_position)> | m_diffCo |
| Diffusion coefficient. | |
| std::function< Real(const RealVect &a_initialData)> | m_initialData |
| Initial data. | |
| Real | m_minDt |
| Smallest acceptable time step. | |
| Real | m_maxDt |
| Largest acceptable time step. | |
| Real | m_cfl |
| CFL number to use. | |
| Real | m_forceCFL |
| Forced CFL (overrides input options) | |
| bool | m_debug |
| For activating debugging. This is an option. | |
| bool | m_mobile |
| Mobile or not. | |
| bool | m_diffusive |
| Diffusive or not. | |
| Integrator | m_integrator |
| Integrator. | |
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< AmrMesh > | m_amr |
| AmrMesh. | |
| RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| Computational geometry. | |
Implementation of TimeStepper which runs a single advection-diffusion-reaction solver.
| AdvectionDiffusionStepper::AdvectionDiffusionStepper | ( | RefCountedPtr< CdrSolver > & | a_solver | ) |
Full constructor.
| [in] | a_solver | CDR solver. |
Advancement function – advances one time step.
| [in] | a_dt | Time step to be used for advancement |
Implements TimeStepper.
|
overridevirtual |
Allocate memory.
Implements TimeStepper.
|
overridevirtual |
Compute a time step to be used by Driver.
Implements TimeStepper.
|
overridevirtual |
Get the number of plot variables.
Implements TimeStepper.
|
overridevirtual |
Get plot variable name.
Implements TimeStepper.
|
overridevirtual |
Fill solver with initial data.
Implements TimeStepper.
|
overridevirtual |
Parse runtime options.
Reads in verbosity level, integrator, and CFL number to use.
Reimplemented from TimeStepper.
|
overridevirtual |
Perform post-checkpoint setup routines.
This will set source terms, velocities, and diffusion coefficients.
Implements TimeStepper.
|
inlineoverridevirtual |
Perform post-initialization routines (there are none)
Implements TimeStepper.
|
inlineoverridevirtual |
Perform post-regrid routines. This does nothing.
Implements TimeStepper.
|
overridevirtual |
Perform pre-regrid operations. Calls CdrSolver::preRegrid.
| [in] | a_lmin | The coarsest level that changes |
| [in] | a_oldFinestLevel | The finest level before the regrid. |
Implements TimeStepper.
|
inlineoverridevirtual |
|
overridevirtual |
Register all operators that will be used.
Implements TimeStepper.
|
overridevirtual |
Register all realms that will be used.
Implements TimeStepper.
|
overridevirtual |
Regrid method – calls regrid method for solver.
| [in] | a_lmin | The coarsest level that changed. |
| [in] | a_oldFinestLevel | The finest level before the regrid. |
| [in] | a_newFinestLevel | The finest level after the regrid. |
Implements TimeStepper.
Set the CFL number.
| [in] | a_cfl; |
|
noexcept |
Set the diffusion coeffieint.
| [in] | a_diffusion | Diffusion coefficient |
|
noexcept |
Set the initial data..
| [in] | a_initData | Initial data function. |
|
overridevirtual |
Instantiate the solver.
Implements TimeStepper.
|
noexcept |
Set the velocity field.
| [in] | a_velocity | Velocity field. |
|
overridevirtual |
Synchronize solver times.
| [in] | a_step | Time step |
| [in] | a_time | Time (in seconds) |
| [in] | a_dt | Time step that was used. |
Implements TimeStepper.
|
overridevirtual |
Write plot data to output holder.
| [in,out] | a_output | Output data holder. |
| [in,out] | a_icomp | Starting component in a_output to begin at. |
| [in] | a_outputRealm | Realm where a_output belongs |
| [in] | a_level | Grid level |
Implements TimeStepper.