12 #ifndef CD_FieldStepper_H
13 #define CD_FieldStepper_H
19 #include <CD_NamespaceHeader.H>
22 namespace Electrostatics {
85 writeCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
const override;
95 readCheckpointData(HDF5Handle& a_handle,
const int a_lvl)
override;
128 const std::string a_outputRealm,
129 const int a_level)
const override;
147 advance(
const Real a_dt)
override;
182 preRegrid(
const int a_lbase,
const int a_finestLevel)
override;
206 Vector<Vector<Box>>& a_boxes,
207 const std::string a_realm,
208 const Vector<DisjointBoxLayout>& a_grids,
210 const int a_finestLevel)
override;
219 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel)
override;
233 setRho(
const std::function<Real(
const RealVect& a_pos)>& a_rho,
const phase::which_phase a_phase) noexcept;
240 setSigma(
const std::function<Real(
const RealVect& a_pos)>& a_sigma) noexcept;
271 std::function<Real(
const RealVect& a_pos)>
m_rhoGas;
292 #include <CD_NamespaceFooter.H>
BoxSorting
Enum for sorting boxes.
Definition: CD_BoxSorting.H:21
Contains declaration of a base electrostatics solver class.
Implementation of CD_FieldStepper.H.
Declaration of a cut-cell ODE solver.
Declaration of main (abstract) time stepper class.
Implementation of TimeStepper for solving electrostatic problems. The template parameter is the Field...
Definition: CD_FieldStepper.H:36
void loadBalanceBoxes(Vector< Vector< int >> &a_procs, Vector< Vector< Box >> &a_boxes, const std::string a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel) override
Load balance grid boxes for a specified realm.
Definition: CD_FieldStepperImplem.H:399
std::string m_realm
Realm where the solver lives.
Definition: CD_FieldStepper.H:266
void setRho(const std::function< Real(const RealVect &a_pos)> &a_rho, const phase::which_phase a_phase) noexcept
Set space charge.
Definition: CD_FieldStepperImplem.H:441
void writePlotData(LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const override
Write plot data to file.
Definition: CD_FieldStepperImplem.H:310
Real computeDt() override
Compute time step.
Definition: CD_FieldStepper.H:136
void preRegrid(const int a_lbase, const int a_finestLevel) override
Perform pre-regrid operations.
Definition: CD_FieldStepperImplem.H:346
Vector< std::string > getPlotVariableNames() const override
Get plot variable names.
Definition: CD_FieldStepperImplem.H:293
void initialData() override
Set initial data – this sets the space and surface charges.
Definition: CD_FieldStepperImplem.H:178
void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
Regrid method – regrids the potential distribution in FieldSolver (but does not solve the Poisson equ...
Definition: CD_FieldStepperImplem.H:359
std::function< Real(const RealVect &a_pos)> m_rhoDielectric
Space charge inside dielectric.
Definition: CD_FieldStepper.H:276
void setSigma(const std::function< Real(const RealVect &a_pos)> &a_sigma) noexcept
Set surface charge.
Definition: CD_FieldStepperImplem.H:459
void solvePoisson()
Internal routine for solving the Poisson equation.
Definition: CD_FieldStepperImplem.H:188
void postCheckpointSetup() override
Post-initialize operations to be performed – does nothing.
Definition: CD_FieldStepper.H:102
void postInitialize() override
Post-initialization routine. This solves the Poisson equation.
Definition: CD_FieldStepperImplem.H:213
int getNumberOfPlotVariables() const override
Get number of plot variables.
Definition: CD_FieldStepperImplem.H:276
void registerRealms() override
Register simulation realms to be used for this simulation module.
Definition: CD_FieldStepperImplem.H:141
std::function< Real(const RealVect &a_pos)> m_rhoGas
Space charge inside gas phase.
Definition: CD_FieldStepper.H:271
void allocate() override
Allocation method – allocates memory and internal data for solvers.
Definition: CD_FieldStepperImplem.H:153
bool m_loadBalance
If true, the simulation will be introspectively load balanced.
Definition: CD_FieldStepper.H:246
void registerOperators() override
Register operators for this simulation module.
Definition: CD_FieldStepperImplem.H:128
std::function< Real(const RealVect &a_pos)> m_surfaceChargeDensity
Surface charge distribution.
Definition: CD_FieldStepper.H:281
void synchronizeSolverTimes(const int a_step, const Real a_time, const Real a_dt) override
Synchronzie solver times and time steps.
Definition: CD_FieldStepperImplem.H:330
virtual ~FieldStepper()
Destructor (does nothing)
Definition: CD_FieldStepperImplem.H:87
void postRegrid() override
Perform post-regrid operations – this will resolve the Poisson equation.
Definition: CD_FieldStepperImplem.H:375
void printStepReport() override
Print step report – this does nothing.
Definition: CD_FieldStepper.H:162
MFAMRCellData & getPotential()
Get the potential.
Definition: CD_FieldStepperImplem.H:166
FieldStepper()
Constructor – parses some input options.
Definition: CD_FieldStepperImplem.H:31
RefCountedPtr< SurfaceODESolver< 1 > > m_sigma
Reference to the surface charge solver.
Definition: CD_FieldStepper.H:261
BoxSorting m_boxSort
If using load balancing, this specifies how boxes will be sorted (in space) before load balancing.
Definition: CD_FieldStepper.H:251
RefCountedPtr< FieldSolver > m_fieldSolver
Reference to the FieldSolver.
Definition: CD_FieldStepper.H:256
bool loadBalanceThisRealm(const std::string a_realm) const override
Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines...
Definition: CD_FieldStepperImplem.H:387
Real advance(const Real a_dt) override
Perform a single time step with step a_dt.
Definition: CD_FieldStepperImplem.H:236
void setupSolvers() override
Solver setup routine. This instantiates the FieldSolver and parses input options.
Definition: CD_FieldStepperImplem.H:94
Base class for advancing equations.
Definition: CD_TimeStepper.H:30
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15