|
|
| AdvectionDiffusionStepper () |
| | Default constructor. Parses all options from ParmParse and sets default velocity, diffusion coefficient, and initial data functors.
|
| |
| | AdvectionDiffusionStepper (RefCountedPtr< CdrSolver > &a_solver) |
| | Full constructor. Delegates to the default constructor and then stores the provided solver.
|
| |
|
virtual | ~AdvectionDiffusionStepper () |
| | Destructor.
|
| |
| void | initialData () override |
| | Fill the solver with initial data and set velocity, diffusion coefficient, and source term.
|
| |
| void | allocate () override |
| | Allocate internal storage in the solver.
|
| |
| void | postInitialize () override |
| | Post-initialization hook. No operations are performed.
|
| |
| void | postCheckpointSetup () override |
| | Post-checkpoint setup. Re-applies velocity, diffusion coefficient, source, and EB flux after a restart so the solver fields are consistent with the loaded state.
|
| |
| int | getNumberOfPlotVariables () const override |
| | Return the number of output variables contributed by this stepper.
|
| |
| Vector< std::string > | getPlotVariableNames () const override |
| | Return the names of the output variables contributed by this stepper.
|
| |
| void | writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const override |
| | Write plot data into the output holder.
|
| |
| Real | computeDt () override |
| | Compute the next time step.
|
| |
| void | synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override |
| | Update internal time/step counters and forward them to the solver.
|
| |
| void | printStepReport () override |
| | Print a step report. No output is produced.
|
| |
| void | parseRuntimeOptions () override |
| | Parse runtime options from ParmParse. Re-reads verbosity, CFL bounds, and integrator.
|
| |
| void | registerRealms () override |
| | Register the Primal realm with the AMR mesh.
|
| |
| void | registerOperators () override |
| | Register the operators required by the solver.
|
| |
| void | preRegrid (const int a_lbase, const int a_oldFinestLevel) override |
| | Pre-regrid hook. Notifies the solver to store data before the mesh changes.
|
| |
| void | setupSolvers () override |
| | Instantiate the species and configure the solver with realm, phase, and AMR data.
|
| |
| Real | advance (const Real a_dt) override |
| | Advance the solution by one time step using the selected integrator.
|
| |
| void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override |
| | Regrid the solver and re-apply the flow fields on the new mesh.
|
| |
| void | postRegrid () override |
| | Post-regrid hook. No operations are performed.
|
| |
| void | setCFL (const Real a_cfl) |
| | Force a specific CFL number, overriding the value read from input.
|
| |
| void | setInitialData (const std::function< Real(const RealVect &a_position)> &a_initData) noexcept |
| | Override the initial data functor.
|
| |
| void | setVelocity (const std::function< RealVect(const RealVect &a_position)> &a_velocity) noexcept |
| | Override the velocity field functor.
|
| |
| void | setDiffusionCoefficient (const std::function< Real(const RealVect &a_position)> &a_diffusion) noexcept |
| | Override the diffusion coefficient functor.
|
| |
|
| TimeStepper () |
| | Default constructor (does nothing)
|
| |
|
virtual | ~TimeStepper () |
| | Default destructor (does nothing)
|
| |
|
| TimeStepper (const TimeStepper &)=delete |
| | Disallow copy construction.
|
| |
|
TimeStepper & | operator= (const TimeStepper &)=delete |
| | Disallow copy assignment.
|
| |
|
| TimeStepper (TimeStepper &&)=default |
| | Allow move construction.
|
| |
| TimeStepper & | operator= (TimeStepper &&)=default |
| | Allow move assignment.
|
| |
| 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, int a_level) const |
| | Get computational loads to be checkpointed.
|
| |
| virtual bool | needToRegrid () |
| | Function which can have Driver do regrids at arbitrary points in the simulation.
|
| |
| bool | keepGoing () const |
| | Query whether the time stepper wants to continue stepping.
|
| |
| 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, int a_lmin, int a_finestLevel) |
| | Load balance grid boxes for a specified realm.
|
| |
|
|
RefCountedPtr< CdrSolver > | m_solver |
| | The CDR solver used for advancing the scalar field.
|
| |
|
RefCountedPtr< AdvectionDiffusionSpecies > | m_species |
| | Species definition passed to the CDR solver.
|
| |
|
std::string | m_realm |
| | Name of the realm on which the solver operates.
|
| |
|
phase::which_phase | m_phase |
| | Computational phase (gas or solid) on which the solver operates.
|
| |
|
std::function< RealVect(const RealVect &a_position)> | m_velocity |
| | Functor providing the advection velocity at a given position.
|
| |
|
std::function< Real(const RealVect &a_position)> | m_diffCo |
| | Functor providing the diffusion coefficient at a given position.
|
| |
|
std::function< Real(const RealVect &a_initialData)> | m_initialData |
| | Functor providing the initial scalar concentration at a given position.
|
| |
|
Real | m_minDt |
| | Minimum permissible time step in seconds.
|
| |
|
Real | m_maxDt |
| | Maximum permissible time step in seconds.
|
| |
|
Real | m_cfl |
| | CFL number read from input.
|
| |
|
Real | m_forceCFL |
| | Programmatically forced CFL number. Overrides m_cfl when positive.
|
| |
|
bool | m_debug |
| | If true, print mass-conservation diagnostics to stdout after each step.
|
| |
|
bool | m_mobile |
| | If true, the scalar is advected by the velocity field.
|
| |
|
bool | m_diffusive |
| | If true, the scalar undergoes diffusion.
|
| |
|
Integrator | m_integrator |
| | Selected time integration method.
|
| |
|
int | m_verbosity |
| | Class verbosity.
|
| |
|
int | m_timeStep |
| | Time step.
|
| |
|
Real | m_time |
| | TIme.
|
| |
|
Real | m_dt |
| | Previous time step size.
|
| |
| bool | m_keepGoing |
| | If false, Driver will stop the time loop after the current step.
|
| |
|
RefCountedPtr< AmrMesh > | m_amr |
| | AmrMesh.
|
| |
|
RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| | Computational geometry.
|
| |
TimeStepper implementation for advancing a single advection-diffusion equation.
This class drives a single CdrSolver through a sequence of time steps. The velocity field, diffusion coefficient, and initial data are specified as functors and can be set either through ParmParse input or programmatically via the setter methods. Two explicit integrators are supported: a second-order Heun (explicit trapezoidal) method and an IMEX method that treats advection explicitly and diffusion implicitly via Crank-Nicholson.