13#ifndef CD_MESHODESOLVER_H
14#define CD_MESHODESOLVER_H
21#include <CD_NamespaceHeader.H>
27template <
size_t N = 1>
402#include <CD_NamespaceFooter.H>
Declaration of core class for handling AMR-related operations (with embedded boundaries)
Implementation of CD_MeshODESolver.H.
Class for solving dy/dt = f on an AMR hierarchy.
Definition CD_MeshODESolver.H:29
MeshODESolver(const MeshODESolver &&)=delete
Disallowed move constructor.
virtual std::string getRealm() const noexcept
Get the realm where this solver is registered.
Definition CD_MeshODESolverImplem.H:441
virtual void setRHS(const std::function< Real(const RealVect &a_pos)> &a_srcFunc, size_t a_comp) noexcept
Set right-hand side for specified component.
Definition CD_MeshODESolverImplem.H:269
int m_verbosity
Chattiness.
Definition CD_MeshODESolver.H:308
virtual Vector< std::string > getPlotVariableNames() const noexcept
Get output plot names.
Definition CD_MeshODESolverImplem.H:614
virtual void writePlotFile() const noexcept
Write plot file.
Definition CD_MeshODESolverImplem.H:543
bool m_regridSlopes
Use slopes when regridding.
Definition CD_MeshODESolver.H:338
std::function< std::array< Real, N >(const std::array< Real, N > &, const Real)> RHSFunction
Alias for right-hand side.
Definition CD_MeshODESolver.H:34
bool m_plotPhi
Plot solution vector or not.
Definition CD_MeshODESolver.H:328
virtual void writePlotData(LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, int a_level) const noexcept
Write plot data to output holder.
Definition CD_MeshODESolverImplem.H:640
virtual void setName(const std::string &a_name) noexcept
Set solver name.
Definition CD_MeshODESolverImplem.H:465
MeshODESolver(const MeshODESolver &)=delete
Disallowed copy constructor.
virtual void writeData(LevelData< EBCellFAB > &a_output, int &a_comp, const EBAMRCellData &a_data, std::string a_outputRealm, int a_level, bool a_interpToCentroids, bool a_interpGhost) const noexcept
Write data to output. Convenience function.
Definition CD_MeshODESolverImplem.H:661
bool m_plotRHS
Plot source term or not.
Definition CD_MeshODESolver.H:333
virtual void parseRuntimeOptions() noexcept
Parse run-time configurable class options.
Definition CD_MeshODESolverImplem.H:82
MeshODESolver()
Default constructor. Must subsequently set everything through public member functions.
Definition CD_MeshODESolverImplem.H:28
EBAMRCellData m_cache
Cache storage when doing regrids.
Definition CD_MeshODESolver.H:374
virtual void setPhi(const std::function< Real(const RealVect &a_pos)> &a_phiFunc, size_t a_comp) noexcept
Set phi for a specific component.
Definition CD_MeshODESolverImplem.H:177
virtual void registerOperators() const noexcept
Register operators for AMR operations.
Definition CD_MeshODESolverImplem.H:477
std::string m_name
Solver name.
Definition CD_MeshODESolver.H:343
std::string m_className
Class name.
Definition CD_MeshODESolver.H:349
Real m_dt
Last time step increment.
Definition CD_MeshODESolver.H:323
RefCountedPtr< AmrMesh > m_amr
Write checkpoint data into HDF5 file.
Definition CD_MeshODESolver.H:303
MeshODESolver & operator=(const MeshODESolver &&)=delete
Disallowed move assignment operator.
EBAMRCellData & getPhi() noexcept
Get the solution vector (left-hand side of equation).
Definition CD_MeshODESolverImplem.H:129
EBAMRCellData m_rhs
Source term (right-hand side of equation).
Definition CD_MeshODESolver.H:369
virtual ~MeshODESolver()
Destructor.
Definition CD_MeshODESolverImplem.H:45
std::string m_realm
Realm where solver is registered.
Definition CD_MeshODESolver.H:354
virtual void setRealm(const std::string &a_realm) noexcept
Set the realm for this solver.
Definition CD_MeshODESolverImplem.H:493
virtual int getNumberOfPlotVariables() const noexcept
Get number of output fields.
Definition CD_MeshODESolverImplem.H:592
virtual void preRegrid(int a_lbase, int a_oldFinestLevel) noexcept
Perform pre-regrid operations.
Definition CD_MeshODESolverImplem.H:404
virtual void parseOptions() noexcept
Parse class options.
Definition CD_MeshODESolverImplem.H:64
Real m_time
Current time.
Definition CD_MeshODESolver.H:318
int m_timeStep
Time step.
Definition CD_MeshODESolver.H:313
virtual void parsePlotVariables() noexcept
Parse plot variables.
Definition CD_MeshODESolverImplem.H:99
MeshODESolver & operator=(const MeshODESolver &)=delete
Disallowed assignment operator.
EBAMRCellData & getRHS() noexcept
Get the right-hand side vector.
Definition CD_MeshODESolverImplem.H:153
virtual void setAmr(const RefCountedPtr< AmrMesh > &a_amrMesh) noexcept
Set AmrMesh.
Definition CD_MeshODESolverImplem.H:52
EBAMRCellData m_phi
Solution vector (left hand side of equation).
Definition CD_MeshODESolver.H:364
virtual void setVerbosity(int a_verbosity) noexcept
Set verbosity.
Definition CD_MeshODESolverImplem.H:517
virtual void setPhase(phase::which_phase a_phase) noexcept
Set phase.
Definition CD_MeshODESolverImplem.H:505
virtual void allocate() noexcept
Allocate internal storage.
Definition CD_MeshODESolverImplem.H:391
phase::which_phase m_phase
Phase where solver data lives.
Definition CD_MeshODESolver.H:359
virtual void regrid(int a_lmin, int a_oldFinestLevel, int a_newFinestLevel) noexcept
Regrid this solver.
Definition CD_MeshODESolverImplem.H:419
virtual std::string getName() const noexcept
Get solver name.
Definition CD_MeshODESolverImplem.H:453
virtual void setTime(int a_step, Real a_time, Real a_dt) noexcept
Set the time for this solver.
Definition CD_MeshODESolverImplem.H:529
virtual void computeRHS(const RHSFunction &a_rhsFunction) noexcept
Compute right-hand side from left-hand side. I.e. compute f = f(y,t).
Definition CD_MeshODESolverImplem.H:286
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38