12 #ifndef CD_CdrPlasmaGodunovStepper_H
13 #define CD_CdrPlasmaGodunovStepper_H
24 #include <CD_NamespaceHeader.H>
77 advance(
const Real a_dt)
override;
86 preRegrid(
const int a_lbase,
const int a_oldFinestLevel)
override;
96 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
280 RefCountedPtr<CdrStorage>&
288 RefCountedPtr<RtStorage>&
298 regridInternals(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
427 floorMass(
EBAMRCellData& a_data,
const std::string a_message,
const RefCountedPtr<CdrSolver>& a_solver)
const;
528 writeCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
const override;
539 readCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
override;
545 #include <CD_NamespaceFooter.H>
Declaration of core class for handling AMR-related operations (with embedded boundaries)
Declaration of an iterator class for CdrLayout (for iterating through subsets of solvers).
Declaration of a CdrPlasmaStepper, an abstract class for evolving cdr plasma equations in time.
Iterator class for RtLayout.
Implementation of CD_Timer.H.
Iterator class for CdrLayout. This allows iteration through solvers (or subsets of solvers).
Definition: CD_CdrIterator.H:27
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:28
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:249
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:345
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:427
Class for evolving plasma equations using a split step Godunov method.
Definition: CD_CdrPlasmaGodunovStepper.H:34
void deallocateInternals() override
Deallocate transient memory.
Definition: CD_CdrPlasmaGodunovStepper.cpp:695
bool m_debug
Enable for debugging this class.
Definition: CD_CdrPlasmaGodunovStepper.H:228
void computeElectricFieldIntoScratch()
Compute electric field into scratch storage.
Definition: CD_CdrPlasmaGodunovStepper.cpp:773
EBAMRCellData m_conductivityFactorCell
Used for storing conductivity*dt/eps0 on the cell center.
Definition: CD_CdrPlasmaGodunovStepper.H:198
RefCountedPtr< CdrStorage > & getCdrStorage(const CdrIterator< CdrSolver > &a_solverIt)
Function for getting the transient storage assocaited with a particular CDR solver.
Definition: CD_CdrPlasmaGodunovStepper.cpp:294
void extrapolateCdrToEB()
Extrapolate the cell-centered states to the EB.
Definition: CD_CdrPlasmaGodunovStepper.cpp:855
DiffusionAlgorithm
Enum for distinguishing various ways we handle diffusion.
Definition: CD_CdrPlasmaGodunovStepper.H:143
bool m_fhd
If true, add a stochastic diffusion flux.
Definition: CD_CdrPlasmaGodunovStepper.H:243
FieldCoupling
Enum for representing the coupling between the electric field and charge transport.
Definition: CD_CdrPlasmaGodunovStepper.H:124
AdvectionSolver m_advectionSolver
Advection solver.
Definition: CD_CdrPlasmaGodunovStepper.H:162
Real computeDt() override
Compute the time step – this will be different for the different supported algorithms.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1515
void parseOptions() override
Parse startup options.
Definition: CD_CdrPlasmaGodunovStepper.cpp:53
void extrapolateWithSourceTerm(const Real a_dt)
Extrapolate cell-centered states with the source term.
Definition: CD_CdrPlasmaGodunovStepper.cpp:826
void parseField()
Parse the transport algorithm.
Definition: CD_CdrPlasmaGodunovStepper.cpp:164
void advanceRadiativeTransfer(const Real a_dt)
Advance the radiative transfer problem.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1432
void computeCdrDomainFluxes()
Compute the CDR boundary condition fluxes on the domain faces.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1035
std::unique_ptr< Timer > m_timer
Timer for run-time profiling.
Definition: CD_CdrPlasmaGodunovStepper.H:167
int m_diffusionOrder
Integration order for diffusion equations.
Definition: CD_CdrPlasmaGodunovStepper.H:263
void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
Regrid method.
Definition: CD_CdrPlasmaGodunovStepper.cpp:415
RefCountedPtr< FieldStorage > m_fieldScratch
Scratch storage for the field solver.
Definition: CD_CdrPlasmaGodunovStepper.H:182
AdvectionSolver
Enum for switching between various advection solvers.
Definition: CD_CdrPlasmaGodunovStepper.H:133
Real m_implicitDiffusionThreshold
Diffusion threshold factor.
Definition: CD_CdrPlasmaGodunovStepper.H:258
FieldCoupling m_fieldCoupling
For figuring out which transport algorithm we use.
Definition: CD_CdrPlasmaGodunovStepper.H:152
void extrapolateCdrToDomain()
Extrapolate the CDR cell-centered densities to domain edges/face.
Definition: CD_CdrPlasmaGodunovStepper.cpp:989
void advanceCdrReactions(const Real a_dt)
Advance the reactive problem over a time step dt.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1394
void postRegrid() override
Perform post-regrid operations.
Definition: CD_CdrPlasmaGodunovStepper.cpp:506
void parseRuntimeOptions() override
Parse run-time adjustable parameters.
Definition: CD_CdrPlasmaGodunovStepper.cpp:82
DiffusionAlgorithm m_diffusionAlgorithm
For figuring out how we handle diffusion.
Definition: CD_CdrPlasmaGodunovStepper.H:157
Real advance(const Real a_dt) override
Implementation of the advance method.
Definition: CD_CdrPlasmaGodunovStepper.cpp:306
Vector< RefCountedPtr< RtStorage > > m_rteScratch
Scratch storage for the RTE solvers.
Definition: CD_CdrPlasmaGodunovStepper.H:177
bool m_regridSlopes
Regrid slopes or not.
Definition: CD_CdrPlasmaGodunovStepper.H:248
void parseFHD()
Parse inclusion of random diffusion flux.
Definition: CD_CdrPlasmaGodunovStepper.cpp:254
bool m_extrapAdvect
A special flag for letting the CDR solvers know that we want to compute advective derivatives at half...
Definition: CD_CdrPlasmaGodunovStepper.H:223
void postStep()
Perform post-step operations.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1687
bool m_filterCompensate
Use compensation step in filter or not.
Definition: CD_CdrPlasmaGodunovStepper.H:253
void advanceTransportSemiImplicit(const Real a_dt)
Advance the transport problem using a semi-implicit formulation for the electric field.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1318
void parseAdvection()
Parse centering for the advective integrator.
Definition: CD_CdrPlasmaGodunovStepper.cpp:187
Vector< RefCountedPtr< CdrStorage > > m_cdrScratch
Scratch storage for the CDR solvers.
Definition: CD_CdrPlasmaGodunovStepper.H:172
void allocateScratch()
Allocate internal storage.
Definition: CD_CdrPlasmaGodunovStepper.cpp:656
EBAMRCellData m_scratchConductivity
Scratch storage for storing m_conductivityFactorCell on the old grids during regrid operations.
Definition: CD_CdrPlasmaGodunovStepper.H:218
int m_numFilterRho
Number of filterings for space charge.
Definition: CD_CdrPlasmaGodunovStepper.H:268
void parseFloor()
Parse whether or not we should floor the mass.
Definition: CD_CdrPlasmaGodunovStepper.cpp:214
virtual ~CdrPlasmaGodunovStepper()
Destructor.
Definition: CD_CdrPlasmaGodunovStepper.cpp:44
void computeCdrDiffusionCoefficients(const Real a_time)
Compute CDR diffusion coefficients.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1463
EBAMRFluxData m_conductivityFactorFace
Used for storing conductivity*dt/eps0 on the face centers.
Definition: CD_CdrPlasmaGodunovStepper.H:203
void advanceTransport(const Real a_dt)
Advance the transport problem.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1145
void floorMass(EBAMRCellData &a_data, const std::string a_message, const RefCountedPtr< CdrSolver > &a_solver) const
Print how much mass was injected into the system.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1658
void computeSigmaFlux()
Compute the surface flux for the surface charge solver.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1115
void deallocateScratch()
Allocate internal storage.
Definition: CD_CdrPlasmaGodunovStepper.cpp:737
void preRegrid(const int a_lbase, const int a_oldFinestLevel) override
Pre-regrid method. Used for storing important variables for the solvers.
Definition: CD_CdrPlasmaGodunovStepper.cpp:388
bool m_floor
True if we floor the CDR densities. Due to reactions/EBs, they are not generally non-negative.
Definition: CD_CdrPlasmaGodunovStepper.H:238
void advanceTransportExplicitField(const Real a_dt)
Advance the transport problem using the explicit or explicit-implicit Euler rule.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1172
std::vector< bool > m_useImplicitDiffusion
If true, we are using implicit diffusion. Otherwise it's explicit diffusion.
Definition: CD_CdrPlasmaGodunovStepper.H:273
EBAMRIVData m_conductivityFactorEB
Used for storing conductivity*dt/eps0 on the EB centers.
Definition: CD_CdrPlasmaGodunovStepper.H:208
bool solveSemiImplicitPoisson()
Solve the semi-implicit Poisson equation.
Definition: CD_CdrPlasmaGodunovStepper.cpp:584
void computeCdrFluxesEB()
Compute the CDR boundary condition fluxes on the EBs.
Definition: CD_CdrPlasmaGodunovStepper.cpp:912
CdrPlasmaGodunovStepper()=delete
Disallowed constructor – use strong construction.
void parseRegridSlopes()
Parse whether or not to use slopes when regridding.
Definition: CD_CdrPlasmaGodunovStepper.cpp:267
void postCheckpointSetup() override
Run post-checkpoint setup operations.
Definition: CD_CdrPlasmaGodunovStepper.cpp:523
void computeSourceTerms(const Real a_dt)
Compute source terms for the CDR and RTE equations.
Definition: CD_CdrPlasmaGodunovStepper.cpp:1476
void parseDiffusion()
Parse how we handle diffusion.
Definition: CD_CdrPlasmaGodunovStepper.cpp:119
RefCountedPtr< RtStorage > & getRtStorage(const RtIterator< RtSolver > &a_solverIt)
Function for getting the transient storage assocaited with a particular RTE solver.
Definition: CD_CdrPlasmaGodunovStepper.cpp:300
void parseDebug()
Parse debug mode.
Definition: CD_CdrPlasmaGodunovStepper.cpp:228
EBAMRCellData m_scratchSemiImplicitRho
Scratch storage for storing m_semiImplicitRho on the old grids during regrid operations.
Definition: CD_CdrPlasmaGodunovStepper.H:213
bool m_profile
Enable performance profiling.
Definition: CD_CdrPlasmaGodunovStepper.H:233
void allocateInternals() override
Allocate internal storage.
Definition: CD_CdrPlasmaGodunovStepper.cpp:631
void parseProfile()
Parse profiling mode.
Definition: CD_CdrPlasmaGodunovStepper.cpp:241
RefCountedPtr< SigmaStorage > m_sigmaScratch
Scratch storage for the surface charge solver.
Definition: CD_CdrPlasmaGodunovStepper.H:187
void regridInternals(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
For regridding internal storage. Does nothing.
Definition: CD_CdrPlasmaGodunovStepper.cpp:575
void parseFiltering()
Parse filtering settings.
Definition: CD_CdrPlasmaGodunovStepper.cpp:280
EBAMRCellData m_semiImplicitRho
Use for holding the "space charge" when doing semi-implicit solves.
Definition: CD_CdrPlasmaGodunovStepper.H:193
void computeCdrGradients()
Compute gradients of the CDR densities into scratch storage.
Definition: CD_CdrPlasmaGodunovStepper.cpp:796
Abstract class for evolving the minimal plasma model in time.
Definition: CD_CdrPlasmaStepper.H:39
virtual void computeCdrDriftVelocities()
Compute the CDR drift velocities.
Definition: CD_CdrPlasmaStepper.cpp:2018
Iterator class for RtLayout.
Definition: CD_RtIterator.H:24
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15