chombo-discharge
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::CdrPlasma::CdrPlasmaImExSdcStepper Class Reference

CdrPlasmaStepper subclass that advances plasma equations using implicit-explicit spectral deferred corrections (IMEX-SDC). More...

#include <CD_CdrPlasmaImExSdcStepper.H>

Inheritance diagram for Physics::CdrPlasma::CdrPlasmaImExSdcStepper:
Inheritance graph
[legend]
Collaboration diagram for Physics::CdrPlasma::CdrPlasmaImExSdcStepper:
Collaboration graph
[legend]

Classes

class  CdrStorage
 Per-CDR-species scratch storage for the IMEX-SDC time stepper. More...
 
class  FieldStorage
 Field solver scratch storage for the IMEX-SDC time stepper. More...
 
class  RtStorage
 Per-RTE-solver scratch storage for the IMEX-SDC time stepper. More...
 
class  SigmaStorage
 Surface charge solver scratch storage for the IMEX-SDC time stepper. More...
 

Public Member Functions

 CdrPlasmaImExSdcStepper ()=delete
 Disallowed default constructor.
 
 CdrPlasmaImExSdcStepper (RefCountedPtr< CdrPlasmaPhysics > &a_physics)
 Full constructor.
 
virtual ~CdrPlasmaImExSdcStepper ()
 Destructor.
 
Real advance (const Real a_dt) override
 Advance equations by one time step using the IMEX-SDC algorithm.
 
void allocateInternals () override
 Allocate internal SDC scratch storage.
 
void deallocateInternals () override
 Deallocate all internal SDC scratch storage.
 
void regridInternals (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 Regrid hook for internal storage. No operations are performed.
 
void parseOptions () override
 Parse all startup options from ParmParse.
 
void parseRuntimeOptions () override
 Parse runtime-adjustable options from ParmParse.
 
- Public Member Functions inherited from Physics::CdrPlasma::CdrPlasmaStepper
 CdrPlasmaStepper ()
 Empty constructor.
 
 CdrPlasmaStepper (RefCountedPtr< CdrPlasmaPhysics > &a_physics)
 Full constructor.
 
 ~CdrPlasmaStepper ()
 Destructor.
 
virtual void setupSolvers () override
 Instantiate solvers.
 
virtual void allocate () override
 Allocate data for the time stepper and solvers.
 
virtual void initialData () override
 Fill all solvers with initial data.
 
virtual void postInitialize () override
 Post-initialize operations to be performed after filling solvers with initialData.
 
virtual void postCheckpointSetup () override
 Post-initialize operations to be performed after filling solvers with data read from checkpoint files.
 
virtual void registerRealms () override
 Register realms to be used for the simulation.
 
virtual void registerOperators () override
 Register operators to be used for the simulation.
 
virtual void prePlot () override
 Pre-plot hook. Computes current density and physics plot variables for output.
 
virtual int getNumberOfPlotVariables () const override
 Get the number of plot variables for this time stepper.
 
virtual Vector< std::stringgetPlotVariableNames () const override
 Get plot variable names.
 
virtual void writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const override
 Write plot data to output holder.
 
virtual void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override
 Synchronize solver times.
 
virtual void printStepReport () override
 Print a step report.
 
virtual void preRegrid (const int a_lmin, const int a_oldFinestLevel) override
 Pre-regrid function – this is the one called by Driver.
 
virtual void preRegridInternals (const int a_lmin, const int a_oldFinestLevel)
 Do a preRegrid operation for internal storage (if needed).
 
virtual void regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 Regrid method.
 
virtual void postRegrid () override
 Perform post-regrid operations.
 
virtual void computeJ (EBAMRCellData &a_J) const
 Compute the current density.
 
virtual void computeElectricField (MFAMRCellData &a_electricFieldCell, const MFAMRCellData &a_potential) const
 Compute the cell-centered electric field on both phases.
 
virtual void computeElectricField (EBAMRCellData &a_electricFieldCell, const phase::which_phase a_phase) const
 Compute the cell-centered electric field on a specific phase using whatever is available in m_fieldSolver.
 
virtual void computeElectricField (EBAMRCellData &a_E, const phase::which_phase a_phase, const MFAMRCellData &a_potential) const
 Compute the cell-centered electric field on a specific phase.
 
virtual void computeElectricField (EBAMRFluxData &a_electricFieldFace, const phase::which_phase a_phase, const EBAMRCellData &a_electricFieldCell) const
 Compute the face-centered electric field. This will only do the normal component.
 
virtual void computeElectricField (EBAMRIVData &a_electricFieldEB, const phase::which_phase a_phase, const EBAMRCellData &a_electricFieldCell) const
 Compute the EB-centered electric field.
 
virtual void computeMaxElectricField (Real &a_maximumElectricField, const phase::which_phase a_phase)
 Compute the maximum of the electric field.
 
virtual Real getTime () const
 Return the current simulation time.
 
virtual bool stationaryRTE ()
 Check if RTE solvers are stationary.
 
virtual void deallocate ()
 Deallocation function. This will deallocate internal storage in the subclasses as well as the solvers.
 
virtual void computeSpaceChargeDensity ()
 Compute the centroid-centered space charge density by using the data inside the CDR solvers.
 
virtual void computeSpaceChargeDensity (MFAMRCellData &a_rho, const Vector< EBAMRCellData * > &a_cdrDensities)
 Compute the centroid-centered space charge density.
 
virtual void computeCellConductivity (EBAMRCellData &a_cellConductivity) const
 Compute the cell-centered conductivity.
 
virtual void computeFaceConductivity (EBAMRFluxData &a_conductivityFace, EBAMRIVData &a_conductivityEB, const EBAMRCellData &a_conductivityCell) const
 Compute the face-centered conductivity from a cell-centered conductivity.
 
virtual void setupSemiImplicitPoisson (const Real a_dt)
 Set up a semi-implicit Poisson solver.
 
virtual void setupSemiImplicitPoisson (const EBAMRFluxData &a_conductivityFace, const EBAMRIVData &a_conductivityEB, const Real a_factor)
 Set up a semi-implicit Poisson solver.
 
virtual bool solvePoisson ()
 Solve the electrostatic Poisson equation.
 
virtual bool solvePoisson (MFAMRCellData &a_potential, MFAMRCellData &a_rho, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRIVData &a_sigma)
 General electrostatic Poisson solver routine.
 
virtual void advanceReactionNetwork (const Real a_time, const Real a_dt)
 Advance the reaction network. This will compute the electric field (on the appropriate phase) and call the other version.
 
virtual void advanceReactionNetwork (Vector< EBAMRCellData * > &a_cdrSources, Vector< EBAMRCellData * > &a_rteSources, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_rteDensities, const EBAMRCellData &a_E, const Real &a_time, const Real &a_dt)
 Compute reaction network source terms.
 
virtual void advanceReactionNetwork (Vector< EBAMRCellData * > &a_cdrSources, Vector< EBAMRCellData * > &a_rteSources, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_cdrGradients, const Vector< EBAMRCellData * > &a_rteDensities, const EBAMRCellData &a_E, const Real &a_time, const Real &a_dt)
 Compute reaction network source terms. This is the AMR version that does all levels.
 
virtual void advanceReactionNetwork (Vector< LevelData< EBCellFAB > * > &a_cdrSources, Vector< LevelData< EBCellFAB > * > &a_rteSources, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const Vector< LevelData< EBCellFAB > * > &a_cdrGradients, const Vector< LevelData< EBCellFAB > * > &a_rteDensities, const LevelData< EBCellFAB > &a_E, const Real &a_time, const Real &a_dt, const int a_lvl)
 Compute reaction network source terms. This is the level version.
 
virtual void advanceReactionNetworkRegularCells (Vector< FArrayBox * > &a_cdrSources, Vector< FArrayBox * > &a_rteSources, const Vector< FArrayBox * > &a_cdrDensities, const Vector< FArrayBox * > &a_cdrGradients, const Vector< FArrayBox * > &a_rteDensities, const FArrayBox &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_cellBox)
 Compute reaction network sources. This is the regular version which does not do the cut-cells.
 
virtual void advanceReactionNetworkIrreg (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_cellBox, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. This is the irregular version which only does the cut-cells.
 
virtual void advanceReactionNetworkIrregInterp (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_cellBox, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. This version interpolates everything to the centroid and runs with that data.
 
virtual void advanceReactionNetworkIrregUpwind (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_box, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources.
 
virtual void computeCdrDiffusion ()
 Compute diffusion things using whatever is available in the solvers.
 
virtual void computeCdrDiffusion (const EBAMRCellData &a_electricFieldCell, const EBAMRIVData &a_electricFieldEB)
 Compute diffusion things using whatever is available in the solvers. This version uses the input electric fields.
 
virtual void computeCdrDiffusionCell (Vector< EBAMRCellData > &a_cdrDcoCell, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_electricFieldCell, const Real &a_time)
 Compute CDR diffusion coefficients on cell centers. This will call the level version.
 
virtual void computeCdrDiffusionCell (Vector< LevelData< EBCellFAB > * > &a_cdrDcoCell, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const LevelData< EBCellFAB > &a_electricFieldCell, const int a_lvl, const Real &a_time)
 Compute diffusion coefficients. This is the level version and it will iterate through grid patches.
 
virtual void computeCdrDiffusionCellRegular (Vector< FArrayBox * > &a_cdrDcoCell, const Vector< FArrayBox * > &a_cdrDensities, const FArrayBox &a_electricFieldCell, const Box a_cellBox, const Real a_dx, const Real a_time)
 Compute diffusion coefficients on cell centers. This does all the regular cells.
 
virtual void computeCdrDiffusionCellIrregular (Vector< EBCellFAB * > &a_cdrDcoCell, const Vector< EBCellFAB * > &a_cdrDensities, const EBCellFAB &a_electricFieldCell, const Real a_dx, const Real &a_time, const int a_lvl, const DataIndex &a_dit)
 Compute diffusion coefficients on cell centers. This version does the irregular cells.
 
virtual void computeCdrDiffusionFace (Vector< EBAMRFluxData * > &a_cdrDcoFace, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_electricFieldCell, const Real &a_time)
 Compute diffusion coefficients on face centers.
 
virtual void computeCdrDiffusionEb (Vector< EBAMRIVData * > &a_cdrDcoEB, const Vector< EBAMRIVData * > &a_cdrDensitiesEB, const EBAMRIVData &a_electricFieldEB, const Real &a_time)
 Compute diffusion coefficients on the EB. This is the AMR version – it will call the level version.
 
virtual void computeCdrDiffusionEb (Vector< LevelData< BaseIVFAB< Real > > * > &a_cdrDcoEB, const Vector< LevelData< BaseIVFAB< Real > > * > &a_cdrDensitiesEB, const LevelData< BaseIVFAB< Real > > &a_electricFieldEB, const Real &a_time, const int a_lvl)
 Compute diffusion coefficients on the EB. This is a level version but it will go through all patches.
 
virtual void computeCdrDriftVelocities ()
 Compute the CDR drift velocities.
 
virtual void computeCdrDriftVelocities (Vector< EBAMRCellData * > &a_cdrVelocities, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_E, const Real &a_time)
 Compute the cell-centered CDR velocities. This will call the level version.
 
virtual void computeCdrDriftVelocities (Vector< LevelData< EBCellFAB > * > &a_cdrVelocities, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const LevelData< EBCellFAB > &a_electricField, const int a_lvl, const Real &a_time)
 Compute the cell-centered CDR velocities.
 
virtual void computeCdrDriftVelocitiesRegular (Vector< FArrayBox * > &a_cdrVelocities, const Vector< FArrayBox * > &a_cdrDensities, const FArrayBox &a_electricField, const Box &a_cellBox, const Real &a_time, const Real &a_dx)
 Compute the cell-centered CDR velocities.
 
virtual void computeCdrDriftVelocitiesIrregular (Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_cdrDensities, const EBCellFAB &a_electricField, const Real &a_time, const Real &a_dx, const int a_lvl, const DataIndex &a_dit)
 Compute the cell-centered CDR velocities.
 
virtual void computeCdrFluxes (Vector< EBAMRIVData * > &a_cdrFluxesEB, const Vector< EBAMRIVData * > &a_extrapCdrFluxes, const Vector< EBAMRIVData * > &a_extrapCdrDensities, const Vector< EBAMRIVData * > &a_extrapCdrVelocities, const Vector< EBAMRIVData * > &a_extrapCdrGradients, const Vector< EBAMRIVData * > &a_extrapRteFluxes, const EBAMRIVData &a_electricField, const Real &a_time)
 Compute CDR fluxes on the EB. This is the AMR version – it will call the level version.
 
virtual void computeCdrFluxes (Vector< LevelData< BaseIVFAB< Real > > * > &a_cdrFluxesEB, const Vector< LevelData< BaseIVFAB< Real > > * > &a_extrapCdrFluxes, const Vector< LevelData< BaseIVFAB< Real > > * > &a_extrapCdrDensities, const Vector< LevelData< BaseIVFAB< Real > > * > &a_extrapCdrVelocities, const Vector< LevelData< BaseIVFAB< Real > > * > &a_extrapCdrGradients, const Vector< LevelData< BaseIVFAB< Real > > * > &a_extrapRteFluxes, const LevelData< BaseIVFAB< Real > > &a_electricField, const Real &a_time, const int a_lvl)
 Compute CDR fluxes on the EB. This is the level version which will fill EB fluxes on both electrode and dielectric cells.
 
virtual void computeCdrDomainFluxes (Vector< EBAMRIFData * > &a_cdrFluxes, const Vector< EBAMRIFData * > &a_extrapCdrFluxes, const Vector< EBAMRIFData * > &a_extrapCdrDensities, const Vector< EBAMRIFData * > &a_extrapCdrVelocities, const Vector< EBAMRIFData * > &a_extrapCdrGradients, const Vector< EBAMRIFData * > &a_extrapRteFluxes, const EBAMRIFData &a_electricField, const Real &a_time)
 Compute CDR fluxes on domain faces for usage in boundary conditions. This is the AMR version.
 
virtual void computeCdrDomainFluxes (Vector< LevelData< DomainFluxIFFAB > * > a_cdrFluxes, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrFluxes, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrDensities, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrVelocities, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrGradients, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapRteFluxes, const LevelData< DomainFluxIFFAB > &a_electricField, const Real &a_time, const int a_lvl)
 Compute CDR fluxes on domain faces for usage in boundary conditions. This is the level version.
 
virtual void computeExtrapolatedFluxes (Vector< EBAMRIVData * > &a_extrapCdrFluxesEB, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_cdrVelocities, const phase::which_phase a_phase)
 Extrapolate cell-centered fluxes to the EB centroid.
 
virtual void computeExtrapolatedDomainFluxes (Vector< EBAMRIFData * > &a_cdrDomainFluxes, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_cdrVelocities, const phase::which_phase a_phase)
 Extrapolate drift fluxes to domain faces.
 
virtual void computeExtrapolatedVelocities (Vector< EBAMRIVData * > &a_cdrVelocitiesEB, const Vector< EBAMRCellData * > &a_cdrVelocitiesCell, const phase::which_phase a_phase)
 Extrapolated cell-centered velocities to the EB.
 
virtual void deallocateSolverInternals ()
 Deallocate internal solver storages.
 
virtual void extrapolateToEb (Vector< EBAMRIVData * > &a_ebData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolated cell-centered data to the EB. This is the AMR version for all species.
 
virtual void extrapolateToEb (EBAMRIVData &a_ebData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolated cell-centered data to the EB. This is the AMR version.
 
virtual void extrapolateToEb (LevelData< BaseIVFAB< Real > > &a_ebData, const phase::which_phase a_phase, const LevelData< EBCellFAB > &a_cellData, const int a_lvl)
 Extrapolated cell-centered data to the EB. This is the level version.
 
virtual void extrapolateToDomainFaces (Vector< EBAMRIFData * > &a_domainData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolate cell-centered data to domain faces. This is the AMR version that does all species.
 
virtual void extrapolateToDomainFaces (EBAMRIFData &a_domainData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolate cell-centered data to domain faces. This is the AMR version.
 
virtual void extrapolateToDomainFaces (LevelData< DomainFluxIFFAB > &a_domainData, const phase::which_phase a_phase, const LevelData< EBCellFAB > &a_cellData, const int a_lvl)
 Extrapolate cell-centered data to domain faces. This is the AMR version.
 
virtual void extrapolateVectorToDomainFaces (Vector< EBAMRIFData * > &a_domainData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolate vector data to domain faces. This is the AMR version that does all species.
 
virtual void extrapolateVectorToDomainFaces (EBAMRIFData &a_domainData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolate vector data to domain faces. This is the AMR version.
 
virtual void extrapolateVelocitiesToDomainFaces (Vector< EBAMRIFData * > &a_domainVelocities, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellVelocities)
 Extrapolate velocities data to domain faces. This is the AMR version that does all species.
 
virtual void getCdrMax (Real &a_cdrMax, std::string &a_solverName) const
 Get maximum density in the CDR species. This will fetch both the value and the solver name.
 
virtual void initialSigma ()
 Initialize the surface charge.
 
virtual void projectFlux (EBAMRIVData &a_projectedFlux, const EBAMRIVData &a_flux)
 Project a flux onto the EB normal. This is the AMR version.
 
virtual void projectFlux (LevelData< BaseIVFAB< Real > > &a_projectedFlux, const LevelData< BaseIVFAB< Real > > &a_flux, const int a_lvl)
 Project a flux onto the EB normal. This is the level version.
 
virtual void projectDomain (EBAMRIFData &a_projectedFlux, const EBAMRIFData &a_flux)
 Project flux onto domain edges/faces.
 
virtual void regridSolvers (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel)
 Regrid all of our solvers.
 
virtual void resetDielectricCells (EBAMRIVData &a_data) const
 Set data defined over dielectric cells to zero.
 
virtual void sanityCheck () const
 Do a sanity check. Only works when DEBUG=TRUE.
 
virtual void setupCdr ()
 Setup the CDR solvers.
 
virtual void setupPoisson ()
 Setup the field solver.
 
virtual void setupRadiativeTransfer ()
 Setup the RTE solvers.
 
virtual void setupSigma ()
 Set up the surface charge solver.
 
virtual void setSolverVerbosity ()
 Set solver verbosity.
 
virtual void solverDump ()
 All solvers writes plot files. These are not the same as the plot files written by Driver.
 
virtual void setVoltage (std::function< Real(const Real a_time)> a_voltage)
 Set voltage curve.
 
virtual void solveRadiativeTransfer (const Real a_dt)
 Solve the radiative transfer problem.
 
virtual void setCdrSolvers (RefCountedPtr< CdrLayout< CdrSolver > > &a_cdr)
 Set the CDR layout.
 
virtual void setFieldSolver (RefCountedPtr< FieldSolver > &a_fieldSolver)
 Set the field solver.
 
virtual void setRadiativeTransferSolvers (RefCountedPtr< RtLayout< RtSolver > > &a_rte)
 Set the RTE solvers.
 
virtual Real computeElectrodeCurrent ()
 Compute the ohmic current on electrodes.
 
virtual Real computeDielectricCurrent ()
 Compute the ohmic current on dielectrics.
 
virtual Real computeDomainCurrent ()
 Compute the ohmic current through the domain faces.
 
virtual Real computeOhmicInductionCurrent ()
 Compute induced current in external circuit due to ohmic conduction.
 
virtual Real computeRelaxationTime ()
 Compute the relaxation time as dt = eps0/conductivity.
 
virtual Real getDt ()
 Get dt.
 
- Public Member Functions inherited from TimeStepper
 TimeStepper ()
 Default constructor (does nothing)
 
virtual ~TimeStepper ()
 Default destructor (does nothing)
 
 TimeStepper (const TimeStepper &)=delete
 Disallow copy construction.
 
TimeStepperoperator= (const TimeStepper &)=delete
 Disallow copy assignment.
 
 TimeStepper (TimeStepper &&)=default
 Allow move construction.
 
TimeStepperoperator= (TimeStepper &&)=default
 Allow move assignment.
 
void setAmr (const RefCountedPtr< AmrMesh > &a_amr)
 Set AmrMesh.
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry.
 
virtual void postPlot ()
 An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY after writing the plot file.
 
virtual Vector< long intgetCheckpointLoads (const std::string &a_realm, int a_level) const
 Get computational loads to be checkpointed.
 
virtual bool needToRegrid ()
 Function which can have Driver do regrids at arbitrary points in the simulation.
 
bool keepGoing () const
 Query whether the time stepper wants to continue stepping.
 
virtual bool loadBalanceThisRealm (const std::string &a_realm) const
 Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines will be called during regrids.
 
virtual void loadBalanceBoxes (Vector< Vector< int > > &a_procs, Vector< Vector< Box > > &a_boxes, const std::string &a_realm, const Vector< DisjointBoxLayout > &a_grids, int a_lmin, int a_finestLevel)
 Load balance grid boxes for a specified realm.
 

Protected Member Functions

RefCountedPtr< CdrStorage > & getCdrStorage (const CdrIterator< CdrSolver > &a_solverIt)
 Return the SDC scratch storage associated with a given CDR solver.
 
RefCountedPtr< RtStorage > & getRtStorage (const RtIterator< RtSolver > &a_solverIt)
 Return the SDC scratch storage associated with a given RTE solver.
 
void allocateCdrStorage ()
 Allocate scratch storage for all CDR solvers.
 
void allocateFieldStorage ()
 Allocate scratch storage for the field solver.
 
void allocateRtStorage ()
 Allocate scratch storage for all RTE solvers.
 
void allocateSigmaStorage ()
 Allocate scratch storage for the surface charge solver.
 
Vector< EBAMRCellData * > getCdrSolversPhiK (const int a_m)
 Return the CDR phi^k values at SDC node m.
 
EBAMRIVDatagetSigmaSolverK (const int a_m)
 Return the surface charge sigma^k at SDC node m.
 
void setupQuadratureNodes (const int a_p)
 Build quadrature nodes of type m_whichNodes with p subintervals.
 
void setupUniformNodes (const int a_p)
 Build p+1 uniformly spaced nodes on [0, 1].
 
void setupLobattoNodes (const int a_p)
 Build p+1 Gauss-Lobatto nodes on [0, 1].
 
void setupChebyshevNodes (const int a_p)
 Build p+1 Chebyshev nodes on [0, 1].
 
void setupQmj (const int a_p)
 Compute the SDC integration matrix Q_{mj} from the current node positions.
 
void setupSubintervals (const Real a_time, const Real a_dt)
 Map the unit-interval node positions to [a_time, a_time + a_dt] and compute sub-interval widths.
 
void quad (EBAMRCellData &a_quad, const Vector< EBAMRCellData > &a_integrand, const int a_m)
 Compute the quadrature sum of a_integrand from node 0 to node a_m.
 
void quad (EBAMRIVData &a_quad, const Vector< EBAMRIVData > &a_integrand, const int a_m)
 Compute the quadrature sum of a_integrand from node 0 to node a_m (EB-centered version).
 
void copyCdrToPhiM0 ()
 Copy current CDR solver states into the SDC phi^k storage at node 0.
 
void copySigmaToM0 ()
 Copy current surface charge into the SDC sigma^k storage at node 0.
 
void copyPhiPToCdr ()
 Copy the SDC phi^k storage at the final node p back into the CDR solvers.
 
void copySigmaPToSigma ()
 Copy the SDC sigma^k storage at the final node p back into the surface charge solver.
 
void integrateRtTransient (const Real a_dt)
 Advance RTE solvers transiently over a_dt.
 
void integrateRtStationary ()
 Advance RTE solvers to the stationary solution.
 
void integrate (const Real a_dt, const Real a_time, const bool a_lagged_terms)
 Perform one complete SDC sweep over all subintervals.
 
void integrateAdvectionReaction (const Real a_dt, const int a_m, const bool a_lagged_terms)
 Advance CDR species from node m to m+1 using explicit advection+reaction and implicit diffusion.
 
void integrateAdvection (const Real a_dt, const int a_m, const bool a_lagged_terms)
 Advance CDR species from node m to m+1 using explicit advection only (no diffusion).
 
void integrateDiffusion (const Real a_dt, const int a_m, const bool a_lagged_terms)
 Advance CDR species from node m to m+1 using implicit diffusion only.
 
Vector< EBAMRCellData * > getCdrErrors ()
 Return AMR pointers to the CDR error fields for all species.
 
void reconcileIntegrands ()
 Compute the combined operator F = F_AR + F_D at all SDC nodes.
 
void computeFD0 ()
 Compute the diffusion operator F_D at the first SDC node (t^n) from current solver states.
 
void initializeErrors ()
 Initialize error storage to zero before beginning correction sweeps.
 
void finalizeErrors ()
 Accumulate the maximum correction norm into m_cdrError and m_sigmaError.
 
void computeNewDt (bool &a_accept_step, const Real a_dt, const int a_num_corrections)
 Evaluate the PI step-size controller and decide whether to accept or reject the step.
 
void adaptiveReport (const Real a_first_dt, const Real a_dt, const Real a_new_dt, const int a_corr, const int a_rej, const Real a_max_err)
 Print a diagnostic summary of the adaptive stepping outcome.
 
void updateField ()
 Solve the Poisson equation using the current CDR solver densities and surface charge.
 
void updateField (const Vector< EBAMRCellData * > &a_densities, const EBAMRIVData &a_sigma)
 Solve the Poisson equation from explicitly supplied densities and surface charge.
 
void updateDiffusionCoefficients ()
 Recompute diffusion coefficients from the current electric field in scratch storage.
 
void storeSolvers ()
 Save the current CDR, RTE, field, and surface charge solver states to scratch.
 
void restoreSolvers ()
 Restore CDR, RTE, field, and surface charge solver states from scratch.
 
void computeReactionNetwork (const int a_m, const Real a_time, const Real a_dt)
 Evaluate the reaction network source terms at SDC node m and store the result.
 
void computeElectricFieldIntoScratch ()
 Compute the electric field from the current field solver state and store in m_fieldScratch.
 
void computeCdrEbStates ()
 Extrapolate current CDR solver states to EB centroids.
 
void computeCdrEbStates (const Vector< EBAMRCellData * > &a_phis)
 Extrapolate explicitly supplied CDR states to EB centroids.
 
void computeCdrDomainStates ()
 Extrapolate current CDR solver states to domain faces.
 
void computeCdrDomainStates (const Vector< EBAMRCellData * > &a_phis)
 Extrapolate explicitly supplied CDR states to domain faces.
 
void computeCdrGradients ()
 Compute cell-centered gradients of current CDR solver densities.
 
void computeCdrGradients (const Vector< EBAMRCellData * > &a_phis)
 Compute cell-centered gradients of explicitly supplied CDR densities.
 
void computeCdrFluxes (const Real a_time)
 Compute CDR boundary fluxes on EB faces from current solver states.
 
void computeCdrFluxes (const Vector< EBAMRCellData * > &a_phis, const Real a_time)
 Compute CDR boundary fluxes on EB faces from explicitly supplied states.
 
void computeCdrDomainFluxes (const Real a_time)
 Compute CDR boundary fluxes on domain faces from current solver states.
 
void computeCdrDomainFluxes (const Vector< EBAMRCellData * > &a_phis, const Real a_time)
 Compute CDR boundary fluxes on domain faces from explicitly supplied states.
 
void computeCdrVelo (const Real a_time)
 Compute CDR drift velocities from the current field in scratch storage.
 
void computeCdrVelo (const Vector< EBAMRCellData * > &a_phis, const Real a_time)
 Compute CDR drift velocities from explicitly supplied densities.
 
Real computeDt () override
 Compute the next time step based on CFL and adaptive-stepping constraints.
 
void computeSigmaFlux ()
 Compute the surface charge boundary flux from current solver states.
 
Real getMaxError ()
 Return the maximum CDR error norm across all species.
 
Real getMaxNodeDistance ()
 Return the largest sub-interval width in the current SDC discretization.
 
void writeStepProfile (const Real a_dt, const Real a_error, const int a_substeps, const int a_corrections, const int a_rejections)
 Write per-step SDC performance data to a profile file.
 
void parseNodes ()
 Parse the quadrature node type (m_whichNodes) and number of subintervals (m_p).
 
void parseDiffusionCoupling ()
 Parse the implicit diffusion coupling method (TGA or Crank-Nicholson).
 
void parseAdaptiveOptions ()
 Parse adaptive time-stepping parameters (thresholds, safety factors, growth limits).
 
void parseDebugOptions ()
 Parse debug flags that toggle individual physics operators.
 
void parseAdvectionOptions ()
 Parse advection-related options (half-time extrapolation).
 
- Protected Member Functions inherited from Physics::CdrPlasma::CdrPlasmaStepper
virtual void parseVerbosity ()
 Parse class verbosity.
 
virtual void parseSolverVerbosity ()
 Parse solver verbosities.
 
virtual void parseCFL ()
 Parse the CFL number.
 
virtual void parseRelaxationTime ()
 Parse the relaxation time restriction.
 
virtual void parseMinDt ()
 Parse the minimum allowed time step.
 
virtual void parseMaxDt ()
 Parse the maximum allowed time step.
 
virtual void parseFastPoisson ()
 Parse the "fast poisson" method, i.e. how often we solve the Poisson equation.
 
virtual void parseFastRadiativeTransfer ()
 Parse the "fast rte" method, i.e. how often we solve the Poisson equation.
 
virtual void parseSourceComputation ()
 Parse how we compute the source terms.
 
virtual void writeJ (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string &a_outputRealm, const int a_level) const
 Compute and put the current density in output data holder.
 
virtual void computePhysicsPlotVars (EBAMRCellData &a_plotVars) const noexcept
 Calculate the user-supplied plot variables.
 
virtual void writeData (LevelData< EBCellFAB > &a_output, int &a_comp, const EBAMRCellData &a_data, const std::string &a_outputRealm, const int a_level, const bool a_interpToCentroids, const bool a_interpGhost) const noexcept
 Write data to output. Convenience function.
 

Protected Attributes

Vector< RefCountedPtr< CdrStorage > > m_cdrScratch
 Per-CDR-solver SDC scratch storage.
 
Vector< RefCountedPtr< RtStorage > > m_rteScratch
 Per-RTE-solver SDC scratch storage.
 
RefCountedPtr< FieldStoragem_fieldScratch
 Field solver SDC scratch storage.
 
RefCountedPtr< SigmaStoragem_sigmaScratch
 Surface charge solver SDC scratch storage.
 
int m_maxRetries
 Maximum number of step rejections before accepting regardless.
 
int m_p
 Number of SDC quadrature subintervals. There are p+1 nodes covering [t^n, t^{n+1}].
 
int m_k
 Number of SDC correction sweeps to perform per time step.
 
int m_errorNorm
 Error norm selector: 0 for L-infinity, 2 for L2.
 
int m_minCorr
 Minimum number of corrections that must be completed before accepting a step.
 
int m_errorIdx
 CDR species index used to drive the adaptive step-size controller.
 
Real m_maxDtGrowth
 Maximum growth factor applied to the time step by the PI controller.
 
Real m_minCFL
 Minimum CFL number allowed during adaptive stepping.
 
Real m_maxCFL
 Maximum CFL number allowed during adaptive stepping.
 
Real m_errThresh
 Error threshold below which a step is accepted.
 
Real m_safety
 Safety factor applied to the step-size controller's growth estimate.
 
Real m_decreaseSafety
 Additional safety factor applied when decreasing the time step.
 
Real m_newDt
 Tentative time step for the next advance call, set by computeNewDt().
 
Real m_extrapDt
 Time step used for half-time extrapolation of advection states.
 
bool m_extrapAdvect
 If true, extrapolate CDR states to the half-time before computing advective fluxes.
 
bool m_adaptiveDt
 If true, use the PI controller to adaptively select the time step.
 
bool m_printReport
 If true, print a report of the adaptive stepping outcome after each step.
 
bool m_haveError
 True once an error estimate has been computed in the current step.
 
bool m_useTGA
 If true, use the TGA (Crank-Nicholson/RK2) second-order implicit diffusion scheme.
 
bool m_doAdvectionSource
 Debug flag: if false, skip the advection and reaction integration.
 
bool m_doDiffusion
 Debug flag: if false, skip the implicit diffusion integration.
 
bool m_doPoisson
 Debug flag: if false, skip the Poisson solve.
 
bool m_doRTE
 Debug flag: if false, skip the RTE advance.
 
bool m_computeD
 Debug flag: if false, skip diffusion coefficient updates.
 
bool m_computeV
 Debug flag: if false, skip drift velocity updates.
 
bool m_computeS
 Debug flag: if false, skip source term evaluation.
 
bool m_consistentE
 If true, recompute the electric field consistently at each SDC node.
 
bool m_consistentRTE
 If true, recompute the RTE solution consistently at each SDC node.
 
bool m_haveDtErr
 True once a time step error estimate has been computed.
 
bool m_profileSteps
 If true, write per-step SDC profile data to a file.
 
Vector< Realm_cdrError
 Per-CDR-species error norm from the most recent correction comparison.
 
Real m_sigmaError
 Surface charge error norm from the most recent correction comparison.
 
Real m_maxError
 Maximum error across all species and surface charge.
 
Real m_preError
 Error from the previous step, used by the PI controller.
 
Vector< Vector< Real > > m_qmj
 SDC integration matrix Q_{mj}. Entry [m][j] is the weight of node j in the quadrature approximation of the integral from node 0 to node m.
 
Vector< Vector< Real > > m_vandermonde
 Vandermonde matrix used to compute the integration weights from the node positions.
 
Vector< Realm_nodes
 Quadrature node positions in [0, 1].
 
Vector< Realm_tm
 Absolute time at each SDC node: m_tm[m] = t^n + m_nodes[m] * dt.
 
Vector< Realm_dtm
 Sub-interval widths: m_dtm[m] = m_tm[m+1] - m_tm[m].
 
std::string m_whichNodes
 Node type selector: "uniform", "lobatto", or "chebyshev".
 
- Protected Attributes inherited from Physics::CdrPlasma::CdrPlasmaStepper
std::string m_realm
 Realm where the time stepper is registered.
 
std::string m_className
 Time stepper class name.
 
phase::which_phase m_phase
 Plasma phase.
 
SourceTermComputation m_whichSourceTermComputation
 Which source term computation.
 
RefCountedPtr< MultiFluidIndexSpacem_multifluidIndexSpace
 Index space.
 
RefCountedPtr< CdrPlasmaPhysicsm_physics
 Plasma kinetics.
 
RefCountedPtr< CdrLayout< CdrSolver > > m_cdr
 CDR solvers.
 
RefCountedPtr< RtLayout< RtSolver > > m_rte
 Radiative transfer solvers.
 
RefCountedPtr< FieldSolverm_fieldSolver
 Poisson solver.
 
RefCountedPtr< SurfaceODESolver< 1 > > m_sigma
 Surface charge solver.
 
EBAMRCellData m_currentDensity
 Storage for the current.
 
EBAMRCellData m_physicsPlotVars
 Storage for physics-observables.
 
std::function< Real(const Real a_time)> m_voltage
 Applied voltage as a function of time. Used to set the Poisson solver boundary condition.
 
Real m_minDt
 Minimum allowed time step.
 
Real m_maxDt
 Maximum allowed time step.
 
Real m_cfl
 CFL number.
 
Real m_relaxTime
 Scaling factor for the dielectric relaxation time step restriction.
 
Real m_time
 Current simulation time in seconds.
 
Real m_dt
 Previous time step size.
 
Real m_dtCFL
 Computed CFL time step.
 
TimeCode m_timeCode
 Time code for step restriction.
 
int m_solverVerbosity
 Verbosity for solvers.
 
int m_fastRTE
 Solve RTE every m_fastRTE steps instead of every step. 0 or 1 means every step.
 
int m_fastPoisson
 Solve Poisson every m_fastPoisson steps instead of every step. 0 or 1 means every step.
 
int m_upwindFactor
 Upwind factor.
 
- Protected Attributes inherited from TimeStepper
int m_verbosity
 Class verbosity.
 
int m_timeStep
 Time step.
 
Real m_time
 TIme.
 
Real m_dt
 Previous time step size.
 
bool m_keepGoing
 If false, Driver will stop the time loop after the current step.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry.
 

Additional Inherited Members

- Protected Types inherited from Physics::CdrPlasma::CdrPlasmaStepper
enum class  SourceTermComputation { Interpolated , Upwind }
 Enum for switching between source term computations. 'Interpolated' interpolates the cell-centered data to cell centroids. InterpolatedStable is the same as Interpolated but with a stability fix near inflow EBs. CellAverage assumes centroid-centered data, and Upwind uses the upwind formulation in Villa et. al.
 
enum class  TimeCode {
  Advection , Diffusion , AdvectionDiffusion , Source ,
  RelaxationTime , Restricted , Hardcap , Error ,
  Physics
}
 An enum for encapsulating how time steps were restricted.
 

Detailed Description

CdrPlasmaStepper subclass that advances plasma equations using implicit-explicit spectral deferred corrections (IMEX-SDC).

This class implements a high-order IMEX time integration in which advection and reactions are treated explicitly while diffusion is treated implicitly. The method uses p+1 quadrature nodes on each time step (Gauss-Lobatto, Chebyshev, or uniform) to construct a high-order quadrature rule. Starting from an initial first-order predictor, k correction sweeps improve the solution towards the p-th order collocation solution.

Adaptive time stepping is supported via a PI step-size controller that compares the solution at adjacent correction levels. The error norm (L-infinity or L2), the species used for error control, and the safety factors are all runtime-configurable.

Scratch storage for the SDC sub-step data is managed by inner classes CdrStorage, FieldStorage, RtStorage, and SigmaStorage.

Constructor & Destructor Documentation

◆ CdrPlasmaImExSdcStepper()

CdrPlasmaImExSdcStepper::CdrPlasmaImExSdcStepper ( RefCountedPtr< CdrPlasmaPhysics > &  a_physics)

Full constructor.

Parameters
[in]a_physicsPlasma kinetics interface.

Member Function Documentation

◆ adaptiveReport()

void CdrPlasmaImExSdcStepper::adaptiveReport ( const Real  a_first_dt,
const Real  a_dt,
const Real  a_new_dt,
const int  a_corr,
const int  a_rej,
const Real  a_max_err 
)
protected

Print a diagnostic summary of the adaptive stepping outcome.

Parameters
[in]a_first_dtTime step proposed at the start of the step.
[in]a_dtTime step actually used.
[in]a_new_dtProposed time step for the next advance.
[in]a_corrNumber of corrections completed.
[in]a_rejNumber of step rejections.
[in]a_max_errMaximum relative error across all species.

◆ advance()

Real CdrPlasmaImExSdcStepper::advance ( const Real  a_dt)
overridevirtual

Advance equations by one time step using the IMEX-SDC algorithm.

Parameters
[in]a_dtRequested time step.
Returns
Actual time step used. May differ from a_dt when adaptive stepping is enabled.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ allocateInternals()

void CdrPlasmaImExSdcStepper::allocateInternals ( )
overridevirtual

Allocate internal SDC scratch storage.

Allocates phi^k, F_AR^k, F_D^k, and F^k arrays for all species at all SDC nodes, plus EB/domain state and flux arrays needed during the integration.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ computeCdrDomainFluxes() [1/2]

void CdrPlasmaImExSdcStepper::computeCdrDomainFluxes ( const Real  a_time)
protected

Compute CDR boundary fluxes on domain faces from current solver states.

Parameters
[in]a_timeCurrent simulation time.

◆ computeCdrDomainFluxes() [2/2]

void CdrPlasmaImExSdcStepper::computeCdrDomainFluxes ( const Vector< EBAMRCellData * > &  a_phis,
const Real  a_time 
)
protected

Compute CDR boundary fluxes on domain faces from explicitly supplied states.

Parameters
[in]a_phisCDR cell-centered densities.
[in]a_timeCurrent simulation time.

◆ computeCdrDomainStates()

void CdrPlasmaImExSdcStepper::computeCdrDomainStates ( const Vector< EBAMRCellData * > &  a_phis)
protected

Extrapolate explicitly supplied CDR states to domain faces.

Parameters
[in]a_phisCDR cell-centered densities.

◆ computeCdrEbStates()

void CdrPlasmaImExSdcStepper::computeCdrEbStates ( const Vector< EBAMRCellData * > &  a_phis)
protected

Extrapolate explicitly supplied CDR states to EB centroids.

Parameters
[in]a_phisCDR cell-centered densities.

◆ computeCdrFluxes() [1/2]

void CdrPlasmaImExSdcStepper::computeCdrFluxes ( const Real  a_time)
protected

Compute CDR boundary fluxes on EB faces from current solver states.

Parameters
[in]a_timeCurrent simulation time.

◆ computeCdrFluxes() [2/2]

void CdrPlasmaImExSdcStepper::computeCdrFluxes ( const Vector< EBAMRCellData * > &  a_phis,
const Real  a_time 
)
protected

Compute CDR boundary fluxes on EB faces from explicitly supplied states.

Parameters
[in]a_phisCDR cell-centered densities.
[in]a_timeCurrent simulation time.

◆ computeCdrGradients()

void CdrPlasmaImExSdcStepper::computeCdrGradients ( const Vector< EBAMRCellData * > &  a_phis)
protected

Compute cell-centered gradients of explicitly supplied CDR densities.

Parameters
[in]a_phisCDR cell-centered densities.

◆ computeCdrVelo() [1/2]

void CdrPlasmaImExSdcStepper::computeCdrVelo ( const Real  a_time)
protected

Compute CDR drift velocities from the current field in scratch storage.

Parameters
[in]a_timeCurrent simulation time.

◆ computeCdrVelo() [2/2]

void CdrPlasmaImExSdcStepper::computeCdrVelo ( const Vector< EBAMRCellData * > &  a_phis,
const Real  a_time 
)
protected

Compute CDR drift velocities from explicitly supplied densities.

Parameters
[in]a_phisCDR cell-centered densities.
[in]a_timeCurrent simulation time.

◆ computeDt()

Real CdrPlasmaImExSdcStepper::computeDt ( )
overrideprotectedvirtual

Compute the next time step based on CFL and adaptive-stepping constraints.

Returns
Proposed time step.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ computeNewDt()

void CdrPlasmaImExSdcStepper::computeNewDt ( bool a_accept_step,
const Real  a_dt,
const int  a_num_corrections 
)
protected

Evaluate the PI step-size controller and decide whether to accept or reject the step.

Parameters
[out]a_accept_stepSet to true if the step is accepted.
[in]a_dtTime step used in this advance.
[in]a_num_correctionsNumber of corrections that were completed.

◆ computeReactionNetwork()

void CdrPlasmaImExSdcStepper::computeReactionNetwork ( const int  a_m,
const Real  a_time,
const Real  a_dt 
)
protected

Evaluate the reaction network source terms at SDC node m and store the result.

Parameters
[in]a_mSDC node index.
[in]a_timeCurrent simulation time.
[in]a_dtTime step (passed to CdrPlasmaPhysics::advanceReactionNetwork).

◆ deallocateInternals()

void CdrPlasmaImExSdcStepper::deallocateInternals ( )
overridevirtual

Deallocate all internal SDC scratch storage.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ getCdrErrors()

Vector< EBAMRCellData * > CdrPlasmaImExSdcStepper::getCdrErrors ( )
protected

Return AMR pointers to the CDR error fields for all species.

Returns
Vector of pointers to CdrStorage::m_error for each CDR species.

◆ getCdrSolversPhiK()

Vector< EBAMRCellData * > CdrPlasmaImExSdcStepper::getCdrSolversPhiK ( const int  a_m)
protected

Return the CDR phi^k values at SDC node m.

Parameters
[in]a_mSDC node index in [0, p].
Returns
Vector of AMR data pointers, one per CDR species.

◆ getCdrStorage()

RefCountedPtr< CdrStorage > & CdrPlasmaImExSdcStepper::getCdrStorage ( const CdrIterator< CdrSolver > &  a_solverIt)
protected

Return the SDC scratch storage associated with a given CDR solver.

Parameters
[in]a_solverItCDR solver iterator pointing to the desired solver.
Returns
Reference to the corresponding CdrStorage entry in m_cdrScratch.

◆ getMaxError()

Real Physics::CdrPlasma::CdrPlasmaImExSdcStepper::getMaxError ( )
protected

Return the maximum CDR error norm across all species.

Returns
Maximum of m_cdrError.

◆ getMaxNodeDistance()

Real CdrPlasmaImExSdcStepper::getMaxNodeDistance ( )
protected

Return the largest sub-interval width in the current SDC discretization.

Returns
Maximum of m_dtm.

◆ getRtStorage()

RefCountedPtr< RtStorage > & CdrPlasmaImExSdcStepper::getRtStorage ( const RtIterator< RtSolver > &  a_solverIt)
protected

Return the SDC scratch storage associated with a given RTE solver.

Parameters
[in]a_solverItRTE solver iterator pointing to the desired solver.
Returns
Reference to the corresponding RtStorage entry in m_rteScratch.

◆ getSigmaSolverK()

EBAMRIVData & CdrPlasmaImExSdcStepper::getSigmaSolverK ( const int  a_m)
protected

Return the surface charge sigma^k at SDC node m.

Parameters
[in]a_mSDC node index in [0, p].
Returns
Reference to the AMR EB data at node m.

◆ integrate()

void CdrPlasmaImExSdcStepper::integrate ( const Real  a_dt,
const Real  a_time,
const bool  a_lagged_terms 
)
protected

Perform one complete SDC sweep over all subintervals.

Parameters
[in]a_dtTime step.
[in]a_timeStart of the time step.
[in]a_lagged_termsIf true, use stored lagged operator values (correction sweep). If false, compute fresh values (predictor sweep).

◆ integrateAdvection()

void CdrPlasmaImExSdcStepper::integrateAdvection ( const Real  a_dt,
const int  a_m,
const bool  a_lagged_terms 
)
protected

Advance CDR species from node m to m+1 using explicit advection only (no diffusion).

Parameters
[in]a_dtFull time step size.
[in]a_mCurrent SDC node index.
[in]a_lagged_termsIf true, include lagged correction terms.

◆ integrateAdvectionReaction()

void CdrPlasmaImExSdcStepper::integrateAdvectionReaction ( const Real  a_dt,
const int  a_m,
const bool  a_lagged_terms 
)
protected

Advance CDR species from node m to m+1 using explicit advection+reaction and implicit diffusion.

Parameters
[in]a_dtFull time step size (used to compute sub-interval widths from m_dtm).
[in]a_mCurrent SDC node index.
[in]a_lagged_termsIf true, include the lagged correction terms from the previous sweep.

◆ integrateDiffusion()

void CdrPlasmaImExSdcStepper::integrateDiffusion ( const Real  a_dt,
const int  a_m,
const bool  a_lagged_terms 
)
protected

Advance CDR species from node m to m+1 using implicit diffusion only.

Parameters
[in]a_dtFull time step size.
[in]a_mCurrent SDC node index.
[in]a_lagged_termsIf true, include lagged correction terms.

◆ integrateRtTransient()

void CdrPlasmaImExSdcStepper::integrateRtTransient ( const Real  a_dt)
protected

Advance RTE solvers transiently over a_dt.

Parameters
[in]a_dtTime step.

◆ parseOptions()

void CdrPlasmaImExSdcStepper::parseOptions ( )
overridevirtual

Parse all startup options from ParmParse.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ parseRuntimeOptions()

void CdrPlasmaImExSdcStepper::parseRuntimeOptions ( )
overridevirtual

Parse runtime-adjustable options from ParmParse.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ quad() [1/2]

void CdrPlasmaImExSdcStepper::quad ( EBAMRCellData a_quad,
const Vector< EBAMRCellData > &  a_integrand,
const int  a_m 
)
protected

Compute the quadrature sum of a_integrand from node 0 to node a_m.

Parameters
[out]a_quadQuadrature result (cell-centered).
[in]a_integrandIntegrand at each SDC node.
[in]a_mUpper integration limit (node index).

◆ quad() [2/2]

void CdrPlasmaImExSdcStepper::quad ( EBAMRIVData a_quad,
const Vector< EBAMRIVData > &  a_integrand,
const int  a_m 
)
protected

Compute the quadrature sum of a_integrand from node 0 to node a_m (EB-centered version).

Parameters
[out]a_quadQuadrature result (EB-centered).
[in]a_integrandIntegrand at each SDC node.
[in]a_mUpper integration limit (node index).

◆ reconcileIntegrands()

void CdrPlasmaImExSdcStepper::reconcileIntegrands ( )
protected

Compute the combined operator F = F_AR + F_D at all SDC nodes.

Called after each correction sweep to prepare the integrands for the next quadrature step.

◆ regridInternals()

void CdrPlasmaImExSdcStepper::regridInternals ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
overridevirtual

Regrid hook for internal storage. No operations are performed.

Parameters
[in]a_lminCoarsest level that changed.
[in]a_oldFinestLevelFinest level before the regrid.
[in]a_newFinestLevelFinest level after the regrid.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ setupChebyshevNodes()

void CdrPlasmaImExSdcStepper::setupChebyshevNodes ( const int  a_p)
protected

Build p+1 Chebyshev nodes on [0, 1].

Parameters
[in]a_pNumber of subintervals.

◆ setupLobattoNodes()

void CdrPlasmaImExSdcStepper::setupLobattoNodes ( const int  a_p)
protected

Build p+1 Gauss-Lobatto nodes on [0, 1].

Parameters
[in]a_pNumber of subintervals.

◆ setupQmj()

void CdrPlasmaImExSdcStepper::setupQmj ( const int  a_p)
protected

Compute the SDC integration matrix Q_{mj} from the current node positions.

Parameters
[in]a_pNumber of subintervals.

◆ setupQuadratureNodes()

void CdrPlasmaImExSdcStepper::setupQuadratureNodes ( const int  a_p)
protected

Build quadrature nodes of type m_whichNodes with p subintervals.

Parameters
[in]a_pNumber of subintervals (p+1 nodes).

◆ setupSubintervals()

void CdrPlasmaImExSdcStepper::setupSubintervals ( const Real  a_time,
const Real  a_dt 
)
protected

Map the unit-interval node positions to [a_time, a_time + a_dt] and compute sub-interval widths.

Parameters
[in]a_timeStart of the time step.
[in]a_dtTime step size.

◆ setupUniformNodes()

void CdrPlasmaImExSdcStepper::setupUniformNodes ( const int  a_p)
protected

Build p+1 uniformly spaced nodes on [0, 1].

Parameters
[in]a_pNumber of subintervals.

◆ updateField()

void CdrPlasmaImExSdcStepper::updateField ( const Vector< EBAMRCellData * > &  a_densities,
const EBAMRIVData a_sigma 
)
protected

Solve the Poisson equation from explicitly supplied densities and surface charge.

Parameters
[in]a_densitiesCDR species densities to use as space charge source.
[in]a_sigmaSurface charge density.

◆ writeStepProfile()

void CdrPlasmaImExSdcStepper::writeStepProfile ( const Real  a_dt,
const Real  a_error,
const int  a_substeps,
const int  a_corrections,
const int  a_rejections 
)
protected

Write per-step SDC performance data to a profile file.

Parameters
[in]a_dtTime step used.
[in]a_errorMaximum relative error.
[in]a_substepsNumber of sub-intervals (m_p).
[in]a_correctionsNumber of correction sweeps completed.
[in]a_rejectionsNumber of step rejections.

Member Data Documentation

◆ m_errorIdx

int Physics::CdrPlasma::CdrPlasmaImExSdcStepper::m_errorIdx
protected

CDR species index used to drive the adaptive step-size controller.

If negative, all species are used and the maximum error is taken.


The documentation for this class was generated from the following files: