12 #ifndef CD_AdvectionDiffusionStepper
13 #define CD_AdvectionDiffusionStepper
19 #include <CD_NamespaceHeader.H>
26 namespace AdvectionDiffusion {
77 writeCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
const override;
87 readCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
override;
119 const std::string a_outputRealm,
120 const int a_level)
const override;
170 preRegrid(
const int a_lbase,
const int a_finestLevel)
override;
184 advance(
const Real a_dt)
override;
193 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
214 setInitialData(
const std::function<Real(
const RealVect& a_position)>& a_initData) noexcept;
221 setVelocity(
const std::function<RealVect(
const RealVect& a_position)>& a_velocity) noexcept;
263 std::function<RealVect(
const RealVect& a_position)>
m_velocity;
268 std::function<Real(
const RealVect& a_position)>
m_diffCo;
324 #include <CD_NamespaceFooter.H>
Simple species for AdvectionDiffusion test problem.
Declaration of an abstract class for solving scalar convection-diffusion-reaction problems.
Declaration of main (abstract) time stepper class.
Implementation of TimeStepper which runs a single advection-diffusion-reaction solver.
Definition: CD_AdvectionDiffusionStepper.H:32
void registerOperators() override
Register all operators that will be used.
Definition: CD_AdvectionDiffusionStepper.cpp:177
RefCountedPtr< CdrSolver > m_solver
Reference to solver.
Definition: CD_AdvectionDiffusionStepper.H:243
void printStepReport() override
Print a step report if you want.
Definition: CD_AdvectionDiffusionStepper.H:142
void synchronizeSolverTimes(const int a_step, const Real a_time, const Real a_dt) override
Synchronize solver times.
Definition: CD_AdvectionDiffusionStepper.cpp:472
void setupSolvers() override
Instantiate the solver.
Definition: CD_AdvectionDiffusionStepper.cpp:138
Integrator
Switch for different integrators.
Definition: CD_AdvectionDiffusionStepper.H:235
void postInitialize() override
Perform post-initialization routines (there are none)
Definition: CD_AdvectionDiffusionStepper.H:66
void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
Regrid method – calls regrid method for solver.
Definition: CD_AdvectionDiffusionStepper.cpp:498
void parseIntegrator()
Parse the integration method.
Definition: CD_AdvectionDiffusionStepper.cpp:113
virtual ~AdvectionDiffusionStepper()
Destructor (does nothing)
Definition: CD_AdvectionDiffusionStepper.cpp:87
void parseRuntimeOptions() override
Parse runtime options.
Definition: CD_AdvectionDiffusionStepper.cpp:93
void postRegrid() override
Perform post-regrid routines. This does nothing.
Definition: CD_AdvectionDiffusionStepper.H:199
RefCountedPtr< AdvectionDiffusionSpecies > m_species
Reference to advected species.
Definition: CD_AdvectionDiffusionStepper.H:248
int getNumberOfPlotVariables() const override
Get the number of plot variables.
Definition: CD_AdvectionDiffusionStepper.cpp:281
Real m_cfl
CFL number to use.
Definition: CD_AdvectionDiffusionStepper.H:288
Integrator m_integrator
Integrator.
Definition: CD_AdvectionDiffusionStepper.H:313
Real m_minDt
Smallest acceptable time step.
Definition: CD_AdvectionDiffusionStepper.H:278
std::string m_realm
Realm where the solver lives.
Definition: CD_AdvectionDiffusionStepper.H:253
bool m_debug
For activating debugging. This is an option.
Definition: CD_AdvectionDiffusionStepper.H:298
Vector< std::string > getPlotVariableNames() const override
Get plot variable name.
Definition: CD_AdvectionDiffusionStepper.cpp:293
Real advance(const Real a_dt) override
Advancement function – advances one time step.
Definition: CD_AdvectionDiffusionStepper.cpp:368
void initialData() override
Fill solver with initial data.
Definition: CD_AdvectionDiffusionStepper.cpp:200
void preRegrid(const int a_lbase, const int a_finestLevel) override
Perform pre-regrid operations. Calls CdrSolver::preRegrid.
Definition: CD_AdvectionDiffusionStepper.cpp:487
Real m_maxDt
Largest acceptable time step.
Definition: CD_AdvectionDiffusionStepper.H:283
void registerRealms() override
Register all realms that will be used.
Definition: CD_AdvectionDiffusionStepper.cpp:166
bool m_diffusive
Diffusive or not.
Definition: CD_AdvectionDiffusionStepper.H:308
void setVelocity(const std::function< RealVect(const RealVect &a_position)> &a_velocity) noexcept
Set the velocity field.
Definition: CD_AdvectionDiffusionStepper.cpp:541
std::function< Real(const RealVect &a_position)> m_diffCo
Diffusion coefficient.
Definition: CD_AdvectionDiffusionStepper.H:268
void setDiffusionCoefficient(const std::function< Real(const RealVect &a_position)> &a_diffusion) noexcept
Set the diffusion coeffieint.
Definition: CD_AdvectionDiffusionStepper.cpp:552
AdvectionDiffusionStepper()
Default constructor – only parses options.
Definition: CD_AdvectionDiffusionStepper.cpp:24
void setInitialData(const std::function< Real(const RealVect &a_position)> &a_initData) noexcept
Set the initial data..
Definition: CD_AdvectionDiffusionStepper.cpp:530
std::function< RealVect(const RealVect &a_position)> m_velocity
Velocity field.
Definition: CD_AdvectionDiffusionStepper.H:263
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.
Definition: CD_AdvectionDiffusionStepper.cpp:304
bool m_mobile
Mobile or not.
Definition: CD_AdvectionDiffusionStepper.H:303
void setCFL(const Real a_cfl)
Set the CFL number.
Definition: CD_AdvectionDiffusionStepper.cpp:519
std::function< Real(const RealVect &a_initialData)> m_initialData
Initial data.
Definition: CD_AdvectionDiffusionStepper.H:273
Real m_forceCFL
Forced CFL (overrides input options)
Definition: CD_AdvectionDiffusionStepper.H:293
void allocate() override
Allocate memory.
Definition: CD_AdvectionDiffusionStepper.cpp:189
void postCheckpointSetup() override
Perform post-checkpoint setup routines.
Definition: CD_AdvectionDiffusionStepper.cpp:255
Real computeDt() override
Compute a time step to be used by Driver.
Definition: CD_AdvectionDiffusionStepper.cpp:321
phase::which_phase m_phase
Phase where the solver lives.
Definition: CD_AdvectionDiffusionStepper.H:258
Base class for advancing equations.
Definition: CD_TimeStepper.H:30
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15