chombo-discharge
|
Surface ODE solver. More...
#include <CD_SurfaceODESolver.H>
Public Member Functions | |
SurfaceODESolver () | |
Default constructor. Must subsequently set AmrMesh. More... | |
SurfaceODESolver (const RefCountedPtr< AmrMesh > &a_amr) | |
Full constructor. More... | |
SurfaceODESolver (const SurfaceODESolver &)=delete | |
Disallowed copy constructor. | |
SurfaceODESolver (const SurfaceODESolver &&)=delete | |
Disallowed move constructor. | |
virtual | ~SurfaceODESolver () |
Destructor (does nothing). | |
SurfaceODESolver & | operator= (const SurfaceODESolver &)=delete |
Disallowed assignment operator. | |
SurfaceODESolver & | operator= (const SurfaceODESolver &&)=delete |
Disallowed assignment operator. | |
virtual void | parseOptions () noexcept |
Parse solver options. | |
virtual void | parseRuntimeOptions () noexcept |
Parse runtime solver options. | |
virtual void | setAmr (const RefCountedPtr< AmrMesh > &a_amrMesh) noexcept |
Set the amr object. More... | |
virtual void | setRealm (const std::string a_realm) noexcept |
Set the realm. More... | |
virtual void | setName (const std::string a_name) noexcept |
Set the solver name. More... | |
std::string | getRealm () const noexcept |
Get the realm where the solver is registered. More... | |
virtual void | setPhase (const phase::which_phase a_phase) noexcept |
Set phase. More... | |
virtual phase::which_phase | getPhase () const noexcept |
Get phase. More... | |
virtual void | setVerbosity (const int a_verbosity) noexcept |
Set verbosity. More... | |
virtual int | getVerbosity () const noexcept |
Get verbosity. More... | |
virtual void | setTime (const int a_step, const Real a_time, const Real a_dt) noexcept |
Set the time. More... | |
virtual Real | computeMass (const int a_comp=0) const noexcept |
Compute the total mass for component a_comp in m_phi. More... | |
virtual Real | computeMass (const EBAMRIVData &a_data, const int a_comp=0) const noexcept |
Compute the total mass in a_phi. More... | |
virtual int | getStep () const noexcept |
Get current time step. More... | |
virtual Real | getTime () const noexcept |
Get current time. More... | |
virtual Real | getDt () const noexcept |
Get last time step. More... | |
virtual void | setPhi (const Real a_phi) |
Convenience function for setting m_phi. More... | |
virtual void | setPhi (const std::array< Real, N > &a_phi) |
Convenience function for setting m_phi. More... | |
virtual void | setPhi (const EBAMRIVData &a_phi) |
Convenience function for setting m_phi. More... | |
virtual EBAMRIVData & | getPhi () noexcept |
Get internal state. More... | |
virtual const EBAMRIVData & | getPhi () const noexcept |
Get internal state. More... | |
virtual void | setRHS (const Real a_rhs) |
Convenience function for setting m_rhs. More... | |
virtual void | setRHS (const std::array< Real, N > &a_rhs) |
Convenience function for setting m_rhs. More... | |
virtual void | setRHS (const EBAMRIVData &a_rhs) |
Convenience function for setting m_rhs. More... | |
virtual EBAMRIVData & | getRHS () |
Get internal state. More... | |
virtual const EBAMRIVData & | getRHS () const noexcept |
Get internal state. More... | |
virtual void | allocate () noexcept |
Allocate internal storage for this class. More... | |
virtual void | deallocate () noexcept |
Deallocate internal storage. | |
virtual void | registerOperators () noexcept |
Register operators. | |
virtual void | preRegrid (const int a_lbase, const int a_oldFinestLevel) noexcept |
Pre-regrid function. More... | |
virtual void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) noexcept |
Regrid function. More... | |
virtual void | resetElectrodes (const Real a_value) noexcept |
Reset m_phi on electrode cells. More... | |
virtual void | resetElectrodes (EBAMRIVData &a_phi, const Real a_value) const noexcept |
Reset the input data holder on electrode cells. More... | |
virtual void | resetDielectrics (const Real a_value) noexcept |
Reset m_phi on dielectric cells. More... | |
virtual void | resetDielectrics (EBAMRIVData &a_phi, const Real a_value) const noexcept |
Reset the input data holder on dielectric cells. More... | |
virtual void | writePlotFile () const noexcept |
Write a plot file. More... | |
virtual int | getNumberOfPlotVariables () const noexcept |
Get number of variables to be plotted. | |
virtual Vector< std::string > | getPlotVariableNames () const noexcept |
Get output plot names. More... | |
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. More... | |
Protected Member Functions | |
void | parseVerbosity () noexcept |
Parse verbosity. | |
void | parseRegrid () noexcept |
Parse regrid method. | |
void | parsePlotVariables () noexcept |
Parse plot variables. | |
void | defineVoFIterators () noexcept |
Define iterators for iterating over cell subsets. | |
Protected Attributes | |
std::string | m_realm |
Realm where this solver is registered. | |
std::string | m_className |
Class name. | |
std::string | m_name |
Solver name. | |
phase::which_phase | m_phase |
Phase where the data lives. | |
bool | m_conservativeRegrid |
Conservative regrid or not. | |
bool | m_plotPhi |
Plot phi or not. | |
bool | m_plotRHS |
Plot rhs or not. | |
RefCountedPtr< MultiFluidIndexSpace > | m_mfis |
Index spaces. | |
RefCountedPtr< AmrMesh > | m_amr |
AMR; needed for grid stuff. | |
Vector< RefCountedPtr< LayoutData< VoFIterator > > > | m_electrodeVoFs |
Cut-cells that are electrode cells. This does not include ghost cells. | |
Vector< RefCountedPtr< LayoutData< VoFIterator > > > | m_dielectricVoFs |
Cut-cells that are also dielectric cells. This does not include ghost cells. | |
EBAMRIVData | m_phi |
State. Stored on cut-cells. | |
EBAMRIVData | m_cache |
Cached state used during regridding. | |
EBAMRIVData | m_rhs |
Right-hand side. | |
int | m_verbosity |
Solver verbosity. | |
int | m_step |
Time step. | |
Real | m_time |
Current time. | |
Real | m_dt |
Time increment. | |
Surface ODE solver.
This is a basic solver that acts as an ODE solver on cut-cells.
SurfaceODESolver< N >::SurfaceODESolver |
Default constructor. Must subsequently set AmrMesh.
Sets realm to primal and phase to phase::gas.
SurfaceODESolver< N >::SurfaceODESolver | ( | const RefCountedPtr< AmrMesh > & | a_amr | ) |
|
virtualnoexcept |
Allocate internal storage for this class.
Allocates m_phi and m_rhs
|
virtualnoexcept |
Compute the total mass in a_phi.
[in] | a_phi | Input data |
[in] | a_comp | Component |
|
virtualnoexcept |
Compute the total mass for component a_comp in m_phi.
[in] | a_comp | Component |
|
virtualnoexcept |
Get last time step.
|
virtualnoexcept |
Get phase.
|
virtualnoexcept |
Get internal state.
|
virtualnoexcept |
Get internal state.
|
virtualnoexcept |
Get output plot names.
|
noexcept |
Get the realm where the solver is registered.
|
virtual |
Get internal state.
|
virtualnoexcept |
Get internal state.
|
virtualnoexcept |
Get current time step.
|
virtualnoexcept |
Get current time.
|
virtualnoexcept |
Get verbosity.
|
virtualnoexcept |
Pre-regrid function.
This stores the data on the old mesh so it can be regridded later.
[in] | a_lbase | Coarsest level which will change during regrids. |
[in] | a_oldFinestLevel | Finest level before the regrid operation. |
|
virtualnoexcept |
Regrid function.
[in] | a_lmin | Coarsest level where grids did not change. |
[in] | a_oldFinestLevel | Finest AMR level before the regrid. |
[in] | a_newFinestLevel | Finest AMR level after the regrid. |
This interpolates or coarsens conservatively, e.g. sigma_c = sum(A_f * sigma_f)/A_c if we coarsen.
|
virtualnoexcept |
Reset m_phi on dielectric cells.
This will set a_data to the specified value (in dielectric cells)
[in] | a_val | Value |
|
virtualnoexcept |
Reset the input data holder on dielectric cells.
This will set a_data to the specified value (in dielectric cells)
[in] | a_data | Input data to be set. |
[in] | a_val | Value |
|
virtualnoexcept |
Reset m_phi on electrode cells.
This will set a_data to the specified value (in electrode cells)
[in] | a_val | Value |
|
virtualnoexcept |
Reset the input data holder on electrode cells.
This will set a_data to the specified value (in electrode cells)
[in] | a_data | Input data to be set. |
[in] | a_val | Value |
|
virtualnoexcept |
Set the amr object.
[in] | a_amrMesh | AmrMesh object. |
|
virtualnoexcept |
Set the solver name.
[in] | a_name | Solver name |
|
virtualnoexcept |
Set phase.
[in] | a_phase | Phase. |
|
virtual |
Convenience function for setting m_phi.
[in] | a_phi | Values |
|
virtual |
Convenience function for setting m_phi.
[in] | a_phi | Values for all components |
|
virtual |
Convenience function for setting m_phi.
[in] | a_phi | Component-wise values. |
|
virtualnoexcept |
Set the realm.
[in] | a_realm | Realm name. |
|
virtual |
Convenience function for setting m_rhs.
[in] | a_rhs | Values per cell and component. |
|
virtual |
Convenience function for setting m_rhs.
[in] | a_rhs | Values for all components |
|
virtual |
Convenience function for setting m_rhs.
[in] | a_rhs | Component-wise values. |
|
virtualnoexcept |
Set the time.
[in] | a_step | Time step number |
[in] | a_time | Time (in seconds) |
[in] | a_dt | Time step increment |
|
virtualnoexcept |
Set verbosity.
[in] | a_verbosity | Verbosity level. |
|
virtualnoexcept |
Write output data to a_output.
[in,out] | a_output | Output data holder. |
[in,out] | a_icomp | Starting component where this solver begins writing the output. |
[in] | a_outputRealm | Realm where a_output belongs |
[in] | a_level | Grid level |
|
virtualnoexcept |
Write a plot file.
The name of the plot file is m_name.stepXXXXXXX.DIM.hdf5