12 #ifndef CD_CdrPlasmaImExSdcStepper_H
13 #define CD_CdrPlasmaImExSdcStepper_H
20 #include <CD_NamespaceHeader.H>
60 advance(
const Real a_dt)
override;
82 regridInternals(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
156 Real m_decreaseSafety;
167 bool m_doAdvectionSource;
175 bool m_consistentRTE;
180 Vector<Real> m_cdrError;
187 Vector<Vector<Real>> m_qmj;
188 Vector<Vector<Real>> m_vandermonde;
189 Vector<Real> m_nodes;
193 std::string m_whichNodes;
196 RefCountedPtr<CdrStorage>&
198 RefCountedPtr<RtStorage>&
203 allocateCdrStorage();
205 allocateFieldStorage();
209 allocateSigmaStorage();
212 Vector<EBAMRCellData*>
213 getCdrSolversPhiK(
const int a_m);
215 getSigmaSolverK(
const int a_m);
219 setupQuadratureNodes(
const int a_p);
221 setupUniformNodes(
const int a_p);
223 setupLobattoNodes(
const int a_p);
225 setupChebyshevNodes(
const int a_p);
227 setupQmj(
const int a_p);
229 setupSubintervals(
const Real a_time,
const Real a_dt);
231 quad(
EBAMRCellData& a_quad,
const Vector<EBAMRCellData>& a_integrand,
const int a_m);
233 quad(
EBAMRIVData& a_quad,
const Vector<EBAMRIVData>& a_integrand,
const int a_m);
247 integrateRtTransient(
const Real a_dt);
249 integrateRtStationary();
253 integrate(
const Real a_dt,
const Real a_time,
const bool a_lagged_terms);
255 integrateAdvectionReaction(
const Real a_dt,
const int a_m,
const bool a_lagged_terms);
257 integrateAdvection(
const Real a_dt,
const int a_m,
const bool a_lagged_terms);
259 integrateDiffusion(
const Real a_dt,
const int a_m,
const bool a_lagged_terms);
264 Vector<EBAMRCellData*>
269 reconcileIntegrands();
283 computeNewDt(
bool& a_accept_step,
const Real a_dt,
const int a_num_corrections);
285 adaptiveReport(
const Real a_first_dt,
290 const Real a_max_err);
296 updateField(
const Vector<EBAMRCellData*>& a_densities,
const EBAMRIVData& a_sigma);
298 updateDiffusionCoefficients();
308 computeReactionNetwork(
const int a_m,
const Real a_time,
const Real a_dt);
310 computeElectricFieldIntoScratch();
312 computeCdrEbStates();
314 computeCdrEbStates(
const Vector<EBAMRCellData*>& a_phis);
316 computeCdrDomainStates();
318 computeCdrDomainStates(
const Vector<EBAMRCellData*>& a_phis);
320 computeCdrGradients();
322 computeCdrGradients(
const Vector<EBAMRCellData*>& a_phis);
324 computeCdrFluxes(
const Real a_time);
326 computeCdrFluxes(
const Vector<EBAMRCellData*>& a_phis,
const Real a_time);
328 computeCdrDomainFluxes(
const Real a_time);
330 computeCdrDomainFluxes(
const Vector<EBAMRCellData*>& a_phis,
const Real a_time);
332 computeCdrVelo(
const Real a_time);
334 computeCdrVelo(
const Vector<EBAMRCellData*>& a_phis,
const Real a_time);
344 getMaxNodeDistance();
348 writeStepProfile(
const Real a_dt,
350 const int a_substeps,
351 const int a_corrections,
352 const int a_rejections);
358 parseDiffusionCoupling();
360 parseAdaptiveOptions();
364 parseAdvectionOptions();
369 #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.
Iterator class for CdrLayout. This allows iteration through solvers (or subsets of solvers).
Definition: CD_CdrIterator.H:27
Definition: CD_CdrPlasmaImExSdcStorage.H:24
Definition: CD_CdrPlasmaImExSdcStorage.H:182
Definition: CD_CdrPlasmaImExSdcStorage.H:237
Definition: CD_CdrPlasmaImExSdcStorage.H:280
Class for evolving plasma equations using implicit-explicit spectral deferred corrections.
Definition: CD_CdrPlasmaImExSdcStepper.H:29
Real m_maxDtGrowth
Maximum growth factor for the time step when using adaptive stepping.
Definition: CD_CdrPlasmaImExSdcStepper.H:151
int m_k
Number of correction for the SDC discretization.
Definition: CD_CdrPlasmaImExSdcStepper.H:130
Real computeDt() override
Compute the time step.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:1298
void parseRuntimeOptions() override
Parse run-time options.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:85
int m_maxRetries
Maximum number of retries when using adaptive time steps.
Definition: CD_CdrPlasmaImExSdcStepper.H:120
int m_p
Number of subintervals in the SDC discretization.
Definition: CD_CdrPlasmaImExSdcStepper.H:125
Vector< EBAMRCellData * > getCdrErrors()
Get errors for CDR equations.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:1968
int m_minCorr
Minimum number of SDC corrections.
Definition: CD_CdrPlasmaImExSdcStepper.H:140
Real advance(const Real a_dt) override
Advance method. Implements the ImEx SDC algorithm.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:548
void parseOptions() override
Parse startup options.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:54
void deallocateInternals() override
De-allocation method for deleting run-time storage.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:1450
RefCountedPtr< FieldStorage > m_fieldScratch
Scratch storage for the field solver.
Definition: CD_CdrPlasmaImExSdcStepper.H:110
int m_errorIdx
The species error index – allows us to restrict error evaluation and adaptive times stepping to a spe...
Definition: CD_CdrPlasmaImExSdcStepper.H:146
Vector< RefCountedPtr< CdrStorage > > m_cdrScratch
Scratch storage for the CDR solvers.
Definition: CD_CdrPlasmaImExSdcStepper.H:100
Vector< RefCountedPtr< RtStorage > > m_rteScratch
Scratch storage for the radiative transfer solvers.
Definition: CD_CdrPlasmaImExSdcStepper.H:105
int m_errorNorm
Error norm to use when using adaptive time steps.
Definition: CD_CdrPlasmaImExSdcStepper.H:135
RefCountedPtr< SigmaStorage > m_sigmaScratch
Scratch storage for the surface charge solver.
Definition: CD_CdrPlasmaImExSdcStepper.H:115
void regridInternals(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
For regridding internal storage. Does nothing.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:1377
void allocateInternals() override
Allocation method for setting up internal storage.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:1386
virtual ~CdrPlasmaImExSdcStepper()
Destructor.
Definition: CD_CdrPlasmaImExSdcStepper.cpp:45
CdrPlasmaImExSdcStepper()=delete
Disallowed constructor – use the full constructor.
Abstract class for evolving the minimal plasma model in time.
Definition: CD_CdrPlasmaStepper.H:39
Iterator class for RtLayout.
Definition: CD_RtIterator.H:24
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15