12 #ifndef CD_SurfaceODESolver_H
13 #define CD_SurfaceODESolver_H
20 #include <CD_NamespaceHeader.H>
30 static_assert(N > 0,
"SurfaceODESolver<N> must have N > 0");
96 setRealm(const std::
string a_realm) noexcept;
103 setName(const std::
string a_name) noexcept;
123 virtual
phase::which_phase
148 setTime(const
int a_step, const Real a_time, const Real a_dt) noexcept;
186 getDt() const noexcept;
200 setPhi(const std::array<Real, N>& a_phi);
236 setRHS(const std::array<Real, N>& a_rhs);
286 preRegrid(const
int a_lbase, const
int a_oldFinestLevel) noexcept;
296 regrid(const
int a_lmin, const
int a_oldFinestLevel, const
int a_newFinestLevel) noexcept;
343 writeCheckpointLevel(HDF5Handle& a_handle,
const int a_level)
const noexcept;
353 readCheckpointLevel(HDF5Handle& a_handle,
const int a_level) noexcept;
373 virtual Vector<std::
string>
388 const std::
string a_outputRealm,
389 const
int a_level) const noexcept;
508 #include <CD_NamespaceFooter.H>
Declaration of core class for handling AMR-related operations (with embedded boundaries)
Implementation of CD_SurfaceODESolver.H.
Class for handling spatial operations.
Definition: CD_AmrMesh.H:44
Two-fluid index space.
Definition: CD_MultiFluidIndexSpace.H:42
Surface ODE solver.
Definition: CD_SurfaceODESolver.H:28
virtual void setName(const std::string a_name) noexcept
Set the solver name.
Definition: CD_SurfaceODESolverImplem.H:187
Real m_dt
Time increment.
Definition: CD_SurfaceODESolver.H:481
virtual int getVerbosity() const noexcept
Get verbosity.
Definition: CD_SurfaceODESolverImplem.H:247
virtual EBAMRIVData & getRHS()
Get internal state.
Definition: CD_SurfaceODESolverImplem.H:468
void parseVerbosity() noexcept
Parse verbosity.
Definition: CD_SurfaceODESolverImplem.H:90
SurfaceODESolver & operator=(const SurfaceODESolver &)=delete
Disallowed assignment operator.
virtual EBAMRIVData & getPhi() noexcept
Get internal state.
Definition: CD_SurfaceODESolverImplem.H:406
virtual void setRHS(const Real a_rhs)
Convenience function for setting m_rhs.
Definition: CD_SurfaceODESolverImplem.H:430
virtual phase::which_phase getPhase() const noexcept
Get phase.
Definition: CD_SurfaceODESolverImplem.H:223
virtual void setRealm(const std::string a_realm) noexcept
Set the realm.
Definition: CD_SurfaceODESolverImplem.H:175
std::string m_name
Solver name.
Definition: CD_SurfaceODESolver.H:405
virtual void resetElectrodes(const Real a_value) noexcept
Reset m_phi on electrode cells.
Definition: CD_SurfaceODESolverImplem.H:622
virtual int getStep() const noexcept
Get current time step.
Definition: CD_SurfaceODESolverImplem.H:332
virtual void parseOptions() noexcept
Parse solver options.
Definition: CD_SurfaceODESolverImplem.H:62
void parsePlotVariables() noexcept
Parse plot variables.
Definition: CD_SurfaceODESolverImplem.H:130
virtual void setPhase(const phase::which_phase a_phase) noexcept
Set phase.
Definition: CD_SurfaceODESolverImplem.H:211
SurfaceODESolver(const SurfaceODESolver &)=delete
Disallowed copy constructor.
EBAMRIVData m_cache
Cached state used during regridding.
Definition: CD_SurfaceODESolver.H:456
virtual void setAmr(const RefCountedPtr< AmrMesh > &a_amrMesh) noexcept
Set the amr object.
Definition: CD_SurfaceODESolverImplem.H:161
SurfaceODESolver()
Default constructor. Must subsequently set AmrMesh.
Definition: CD_SurfaceODESolverImplem.H:25
void parseRegrid() noexcept
Parse regrid method.
Definition: CD_SurfaceODESolverImplem.H:104
virtual void allocate() noexcept
Allocate internal storage for this class.
Definition: CD_SurfaceODESolverImplem.H:492
virtual Real getDt() const noexcept
Get last time step.
Definition: CD_SurfaceODESolverImplem.H:356
std::string getRealm() const noexcept
Get the realm where the solver is registered.
Definition: CD_SurfaceODESolverImplem.H:199
int m_step
Time step.
Definition: CD_SurfaceODESolver.H:471
Real m_time
Current time.
Definition: CD_SurfaceODESolver.H:476
bool m_plotRHS
Plot rhs or not.
Definition: CD_SurfaceODESolver.H:425
RefCountedPtr< AmrMesh > m_amr
AMR; needed for grid stuff.
Definition: CD_SurfaceODESolver.H:435
virtual void preRegrid(const int a_lbase, const int a_oldFinestLevel) noexcept
Pre-regrid function.
Definition: CD_SurfaceODESolverImplem.H:585
std::string m_className
Class name.
Definition: CD_SurfaceODESolver.H:400
SurfaceODESolver & operator=(const SurfaceODESolver &&)=delete
Disallowed assignment operator.
bool m_plotPhi
Plot phi or not.
Definition: CD_SurfaceODESolver.H:420
virtual ~SurfaceODESolver()
Destructor (does nothing).
Definition: CD_SurfaceODESolverImplem.H:52
virtual Real getTime() const noexcept
Get current time.
Definition: CD_SurfaceODESolverImplem.H:344
virtual void setVerbosity(const int a_verbosity) noexcept
Set verbosity.
Definition: CD_SurfaceODESolverImplem.H:235
virtual void writePlotData(LevelData< EBCellFAB > &a_output, int &a_comp, const std::string a_outputRealm, const int a_level) const noexcept
Write output data to a_output.
Definition: CD_SurfaceODESolverImplem.H:819
virtual void setPhi(const Real a_phi)
Convenience function for setting m_phi.
Definition: CD_SurfaceODESolverImplem.H:368
EBAMRIVData m_phi
State. Stored on cut-cells.
Definition: CD_SurfaceODESolver.H:451
bool m_conservativeRegrid
Conservative regrid or not.
Definition: CD_SurfaceODESolver.H:415
std::string m_realm
Realm where this solver is registered.
Definition: CD_SurfaceODESolver.H:395
RefCountedPtr< MultiFluidIndexSpace > m_mfis
Index spaces.
Definition: CD_SurfaceODESolver.H:430
virtual Real computeMass(const int a_comp=0) const noexcept
Compute the total mass for component a_comp in m_phi.
Definition: CD_SurfaceODESolverImplem.H:273
virtual Vector< std::string > getPlotVariableNames() const noexcept
Get output plot names.
Definition: CD_SurfaceODESolverImplem.H:892
Vector< RefCountedPtr< LayoutData< VoFIterator > > > m_dielectricVoFs
Cut-cells that are also dielectric cells. This does not include ghost cells.
Definition: CD_SurfaceODESolver.H:446
virtual void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) noexcept
Regrid function.
Definition: CD_SurfaceODESolverImplem.H:603
virtual void registerOperators() noexcept
Register operators.
Definition: CD_SurfaceODESolverImplem.H:571
EBAMRIVData m_rhs
Right-hand side.
Definition: CD_SurfaceODESolver.H:461
int m_verbosity
Solver verbosity.
Definition: CD_SurfaceODESolver.H:466
virtual void deallocate() noexcept
Deallocate internal storage.
Definition: CD_SurfaceODESolverImplem.H:509
virtual void parseRuntimeOptions() noexcept
Parse runtime solver options.
Definition: CD_SurfaceODESolverImplem.H:76
SurfaceODESolver(const SurfaceODESolver &&)=delete
Disallowed move constructor.
virtual void writePlotFile() const noexcept
Write a plot file.
Definition: CD_SurfaceODESolverImplem.H:766
phase::which_phase m_phase
Phase where the data lives.
Definition: CD_SurfaceODESolver.H:410
virtual void setTime(const int a_step, const Real a_time, const Real a_dt) noexcept
Set the time.
Definition: CD_SurfaceODESolverImplem.H:259
void defineVoFIterators() noexcept
Define iterators for iterating over cell subsets.
Definition: CD_SurfaceODESolverImplem.H:522
virtual int getNumberOfPlotVariables() const noexcept
Get number of variables to be plotted.
Definition: CD_SurfaceODESolverImplem.H:870
Vector< RefCountedPtr< LayoutData< VoFIterator > > > m_electrodeVoFs
Cut-cells that are electrode cells. This does not include ghost cells.
Definition: CD_SurfaceODESolver.H:441
virtual void resetDielectrics(const Real a_value) noexcept
Reset m_phi on dielectric cells.
Definition: CD_SurfaceODESolverImplem.H:667
phase names
Definition: CD_MultiFluidIndexSpace.H:27