chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F > Class Template Reference

Implementation of ItoKMCGodunovStepper that also evaluates the background field at every regrid/time step. More...

#include <CD_ItoKMCBackgroundEvaluator.H>

Inheritance diagram for Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F >:
Inheritance graph
[legend]
Collaboration diagram for Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F >:
Collaboration graph
[legend]

Public Member Functions

 ItoKMCBackgroundEvaluator (RefCountedPtr< ItoKMCPhysics > &a_physics) noexcept
 Constructor.
 
virtual void postInitialize () noexcept override final
 Post-initialization operations. Computes the background field.
 
virtual void postRegrid () noexcept override final
 Post-regrid operations. Computes the background field.
 
virtual void postCheckpointSetup () noexcept override final
 Post-checkpoint operations. Computes the background field.
 
virtual void printStepReport () noexcept override final
 Print a new step report. This is the old one plus the maximum field change.
 
virtual Real advance (const Real a_dt) override
 Overriden advance method.
 
virtual Real computeDt () override
 Compute a time step used for the advance method.
 
- Public Member Functions inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >
 ItoKMCGodunovStepper ()=delete
 Disallowed default constructor. Use the full constructor.
 
 ItoKMCGodunovStepper (RefCountedPtr< ItoKMCPhysics > &a_physics, bool a_parseOptions=true)
 Full constructor.
 
virtual ~ItoKMCGodunovStepper ()
 Destructor. Does nothing.
 
virtual void allocate () noexcept override
 Allocate storage required for advancing the equations.
 
virtual void parseOptions () noexcept override
 Parse options.
 
virtual void parseRuntimeOptions () noexcept override
 Parse run-time options.
 
virtual void preRegrid (const int a_lmin, const int a_oldFinestLevel) noexcept override
 Perform pre-regrid operations.
 
virtual void registerOperators () noexcept override
 Register operators used for the simulation.
 
virtual void regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) noexcept override
 Regrid methods – puts all data on the new mesh.
 
virtual void postPlot () noexcept override
 Perform post-plot operations.
 
- Public Member Functions inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >
 ItoKMCStepper () noexcept
 Default constructor. Sets default options.
 
 ItoKMCStepper (RefCountedPtr< ItoKMCPhysics > &a_physics) noexcept
 Full constructor. Calls the other constructor.
 
virtual ~ItoKMCStepper () noexcept
 Destructor.
 
virtual void setupSolvers () noexcept override
 Set up solvers.
 
virtual void initialData () noexcept override
 Fill solvers with initial data.
 
virtual int getNumberOfPlotVariables () const noexcept override
 Get number of plot variables for the output file.
 
virtual Vector< std::stringgetPlotVariableNames () const noexcept 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 noexcept override
 Write plot data to output holder.
 
virtual Vector< long intgetCheckpointLoads (const std::string a_realm, const int a_level) const override
 Get computational loads to be checkpointed.
 
virtual void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) noexcept override
 Synchronize solver times for all the solvers.
 
virtual void registerRealms () noexcept override
 Register realms used for the simulation.
 
virtual void prePlot () noexcept override
 Perform pre-plot operations.
 
virtual 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 will be called during regrids for the input realm.
 
virtual 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.
 
virtual void setVoltage (const std::function< Real(const Real a_time)> &a_voltage) noexcept
 Set voltage used for the simulation.
 
virtual Real getTime () const noexcept
 Get current simulation time.
 
virtual void computeElectricField (EBAMRCellData &a_electricField, const phase::which_phase a_phase) const noexcept
 Recompute the electric field onto the specified data holder.
 
- Public Member Functions inherited from TimeStepper
 TimeStepper ()
 Default constructor (does nothing)
 
virtual ~TimeStepper ()
 Default destructor (does nothing)
 
void setAmr (const RefCountedPtr< AmrMesh > &a_amr)
 Set AmrMesh.
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry.
 
virtual bool needToRegrid ()
 Fuction which can have Driver do regrids at arbitrary points in the simulation.
 
bool keepGoing () const
 Query whether the time stepper wants to continue stepping.
 

Protected Member Functions

virtual void computeBackgroundField () noexcept
 Computes the background field. I.e., it allocates and fills m_backgroundField.
 
virtual std::pair< Real, RealevaluateSpaceChargeEffects () noexcept
 Evaluate the maximum change in the background field.
 
virtual Real integrateElectrodeSurfaceCharge () const noexcept
 Compute total charge on electrode.
 
virtual Real integrateOhmicCharge () const noexcept
 Compute the total ohmic current through the electrode.
 
virtual std::pair< Real, RealintegrateOpticalExcitations () const noexcept
 Integrate the sum of the optical excitations.
 
- Protected Member Functions inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >
virtual void allocateInternals () noexcept override
 Allocate "internal" storage.
 
virtual void parseAlgorithm () noexcept
 Parse advancement algorithm.
 
virtual void parseFiltering () noexcept
 Parse filter settings.
 
virtual void parseCheckpointParticles () noexcept
 Parse checkpoint-restart functionality.
 
virtual void parseSecondaryEmissionSpecification () noexcept
 Parse when secondary particles are emitted.
 
virtual void setOldPositions () noexcept
 Set the starting positions for the ItoSolver particles.
 
virtual void barrier () const noexcept
 Set an MPI barrier if using debug mode.
 
virtual void remapPointParticles (Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles, const SpeciesSubset a_subset) noexcept
 Remap the input point particles.
 
virtual void depositPointParticles (const Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles, const SpeciesSubset a_subset) noexcept
 Deposit the input point particles on the mesh.
 
virtual void clearPointParticles (const Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles, const SpeciesSubset a_subset) noexcept
 Clear the input particle data holders.
 
virtual void computeConductivities (const Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles) noexcept
 Compute all conductivities (cell, face, and EB) from the input point particles.
 
virtual void computeCellConductivity (EBAMRCellData &a_conductivityCell, const Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles) noexcept
 Compute the cell-centered conductivity.
 
virtual void computeFaceConductivity () noexcept
 Compute the cell-centered conductivity.
 
virtual void computeSemiImplicitRho () noexcept
 Set up the space charge density for the regrid operation.
 
virtual void setupSemiImplicitPoisson (const Real a_dt) noexcept
 Set up the semi-implicit Poisson solver.
 
virtual bool solvePoisson () noexcept override
 Solve the electrostatic problem.
 
virtual void removeCoveredPointParticles (Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_particles, const EBRepresentation a_representation, const Real a_tolerance) const noexcept
 Remove covered particles.
 
virtual void copyConductivityParticles (Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_conductivityParticles) noexcept
 Copy particles from the ItoSolver into PointParticles whose weight are ItoParticle::m_weight * ItoParticle::m_mobility.
 
virtual void advanceEulerMaruyama (const Real a_dt) noexcept
 Advance the particles using the Euler-Maruyama scheme.
 
virtual void diffuseParticlesEulerMaruyama (Vector< RefCountedPtr< ParticleContainer< PointParticle > > > &a_rhoDaggerParticles, const Real a_dt) noexcept
 Perform the diffusive Ito advance in the Euler-Maruyama step.
 
virtual void computeDiffusionTermCDR (EBAMRCellData &m_semiImplicitRhoCDR, const Real a_dt) noexcept
 Compute the diffusion term for the CDR equations as well as the resulting CDR-contributions to the space charge density.
 
virtual void stepEulerMaruyamaParticles (const Real a_dt) noexcept
 Step the particles according to the regular Euler-Maruyama scheme.
 
virtual void stepEulerMaruyamaCDR (const Real a_dt) noexcept
 Step the CDR equations according to the regular Euler-Maruyama scheme.
 
virtual void plotParticles () const noexcept
 Utility function for plotting the ItoSolver particles. These are written in a particles folder.
 
- Protected Member Functions inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >
virtual void setupIto () noexcept
 Set up the Ito particle solvers.
 
virtual void setupCdr () noexcept
 Set up the CDR solvers.
 
virtual void setupRadiativeTransfer () noexcept
 Set up the radiative transfer solver.
 
virtual void setupPoisson () noexcept
 Set up the electrostatic field solver.
 
virtual void setupSigma () noexcept
 Set up the surface charge solver.
 
virtual void intersectParticles (const SpeciesSubset a_speciesSubset, const bool a_delete, const std::function< void(ItoParticle &)> a_nonDeletionModifier=[](ItoParticle &) -> void { return;}) noexcept
 Intersect a subset of the particles with the domain and embedded boundary.
 
virtual void intersectParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_containerBulk, const ItoSolver::WhichContainer a_containerEB, const ItoSolver::WhichContainer a_containerDomain, const bool a_delete, const std::function< void(ItoParticle &)> a_nonDeletionModifier=[](ItoParticle &) -> void { return;}) noexcept
 Intersect a subset of the particles with the domain and embedded boundary.
 
virtual void removeCoveredParticles (const SpeciesSubset a_which, const EBRepresentation a_representation, const Real a_tolerance) noexcept
 Remove covered particles (i.e., particles inside the EB)
 
virtual void removeCoveredParticles (const SpeciesSubset a_which, const ItoSolver::WhichContainer a_container, const EBRepresentation a_representation, const Real a_tolerance) noexcept
 Remove covered particles (i.e., particles inside the EB)
 
virtual void transferCoveredParticles (const SpeciesSubset a_speciesSubset, const EBRepresentation a_representation, const Real a_tolerance) noexcept
 Transfer covered particles (i.e., particles inside the EB) from the ItoSolver bulk container to EB container.
 
virtual void transferCoveredParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_containerFrom, const ItoSolver::WhichContainer a_containerTo, const EBRepresentation a_representation, const Real a_tolerance) noexcept
 Transfer covered particles (i.e., particles inside the EB) from the ItoSolver bulk container to EB container.
 
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.
 
virtual void writeNumberOfParticlesPerPatch (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const noexcept
 Write number of particles per patch to output holder.
 
virtual void getMaxMinRelativeItoDensity (Real &a_maxDensity, Real &a_minDensity, std::string &a_maxSolver, std::string &a_minSolver) const noexcept
 Get maximum density of the Ito species (only for charged species)
 
virtual void getMaxMinRelativeCDRDensity (Real &a_maxDensity, Real &a_minDensity, std::string &a_maxSolver, std::string &a_minSolver) const noexcept
 Get maximum density of the CDR species (only for charged species)
 
virtual void getParticleStatistics (Real &a_avgParticles, Real &a_sigma, Real &a_minParticles, Real &a_maxParticles, int &a_minRank, int &a_maxRank)
 Compute some particle statistics.
 
virtual void loadBalanceParticleRealm (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) noexcept
 Routine called by loadBalanceBoxes and used for particle-based load balancing.
 
virtual void loadBalanceFluidRealm (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) noexcept
 Routine called by loadBalanceBoxes and used for particle-based load balancing.
 
virtual Vector< RefCountedPtr< ItoSolver > > getLoadBalanceSolvers () const noexcept
 Get the solvers used for load balancing.
 
virtual void fillNeutralDensity () noexcept
 Compute the neutral density on the mesh.
 
virtual Real computeMaxReducedElectricField (const phase::which_phase a_phase) const noexcept
 Compute the maximum electric field (norm)
 
virtual void computeSpaceChargeDensity () noexcept
 Compute the space charge. Calls the other version.
 
virtual void computeSpaceChargeDensity (MFAMRCellData &a_rho, const Vector< EBAMRCellData * > &a_itoDensities, const Vector< EBAMRCellData * > &a_cdrDensities) noexcept
 Compute the space charge density.
 
virtual void computeConductivityCell (EBAMRCellData &a_conductivity) noexcept
 Compute the cell-centered conductiivty.
 
virtual void computeConductivityCell (EBAMRCellData &a_conductivity, const Vector< ParticleContainer< ItoParticle > * > &a_particles) noexcept
 Compute the cell-centered conductiivty.
 
virtual void computeDensityGradients () noexcept
 Compute grad(phi) and phi for both CDR and Ito species and put the result on the fluid realm.
 
virtual void computeCurrentDensity (EBAMRCellData &a_J) noexcept
 Compute the current density.
 
virtual Real computeRelaxationTime () noexcept
 Compute the dielectric relaxation time.
 
virtual void depositParticles (const SpeciesSubset a_speciesSubset) noexcept
 Deposit a subset of the ItoSolver particles on the mesh.
 
virtual void depositParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_container) noexcept
 Deposit a subset of the ItoSolver particles on the mesh.
 
virtual void remapParticles (const SpeciesSubset a_speciesSubset) noexcept
 Remap a subset of ItoSolver particles.
 
virtual void remapParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_container) noexcept
 Remap a subset of ItoSolver particles.
 
virtual void computeDriftVelocities () noexcept
 Compute ItoSolver velocities.
 
virtual void setItoVelocityFunctions () noexcept
 Set the Ito velocity functions. This is sgn(charge) * E.
 
virtual void setCdrVelocityFunctions () noexcept
 Set the Cdr velocities to be sgn(charge) * E.
 
virtual void multiplyCdrVelocitiesByMobilities () noexcept
 Multiply CDR solver velocities by mobilities.
 
virtual void computeMobilities () noexcept
 Compute mesh-based mobilities for LFA coupling.
 
virtual void computeMobilities (Vector< EBAMRCellData * > &a_itoMobilities, Vector< EBAMRCellData > &a_cdrMobilities, const EBAMRCellData &a_electricField, const Real a_time) noexcept
 Compute mesh-based mobilities for LFA coupling.
 
virtual void computeMobilities (Vector< LevelData< EBCellFAB > * > &a_itoMobilities, Vector< LevelData< EBCellFAB > * > &a_cdrMobilities, const LevelData< EBCellFAB > &a_E, const int a_level, const Real a_time) noexcept
 Level-routine when computing mesh-based mobilities for LFA coupling.
 
virtual void computeMobilities (Vector< EBCellFAB * > &a_itoMobilities, Vector< EBCellFAB * > &a_cdrMobilities, const EBCellFAB &a_electricField, const int a_level, const DataIndex a_din, const Box a_cellBox, const Real a_time) noexcept
 Patch-routine when computing mesh-based mobilities for LFA coupling.
 
virtual void computeDiffusionCoefficients () noexcept
 Compute mesh-based diffusion coefficients for LFA coupling.
 
virtual void computeDiffusionCoefficients (Vector< EBAMRCellData * > &a_itoDiffusionCoefficients, Vector< EBAMRCellData * > &a_cdrDiffusionCoefficients, const EBAMRCellData &a_electricField, const Real a_time) noexcept
 Compute mesh-based diffusion coefficients for LFA coupling.
 
virtual void computeDiffusionCoefficients (Vector< LevelData< EBCellFAB > * > &a_itoDiffusionCoefficients, Vector< LevelData< EBCellFAB > * > &a_cdrDiffusionCoefficients, const LevelData< EBCellFAB > &a_electricField, const int a_level, const Real a_time) noexcept
 Level-routine when computing mesh-based mobilities for LFA coupling.
 
virtual void computeDiffusionCoefficients (Vector< EBCellFAB * > &a_itoDiffusionCoefficients, Vector< EBCellFAB * > &a_cdrDiffusionCoefficients, const EBCellFAB &a_E, const int a_level, const DataIndex a_din, const Box a_box, const Real a_time) noexcept
 Patch-routine when computing mesh-based diffusion coefficients in the LFA coupling.
 
virtual void averageDiffusionCoefficientsCellToFace () noexcept
 Average cell-centered diffusion coefficient to faces.
 
virtual void getPhysicalParticlesPerCell (EBAMRCellData &a_ppc) const noexcept
 Get the physical number of particles per cell.
 
virtual void computeReactiveItoParticlesPerCell (EBAMRCellData &a_ppc) noexcept
 Compute the number of reactive particles per cell.
 
virtual void computeReactiveItoParticlesPerCell (LevelData< EBCellFAB > &a_ppc, const int a_level) noexcept
 Compute the number of reactive particles per cell.
 
virtual void computeReactiveItoParticlesPerCell (EBCellFAB &a_ppc, const int a_level, const DataIndex a_din, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the number of reactive particles per cell.
 
virtual void computeReactiveCdrParticlesPerCell (EBAMRCellData &a_ppc) noexcept
 Compute the number of reactive particles per cell for the CDR solvers.
 
virtual void computeReactiveCdrParticlesPerCell (LevelData< EBCellFAB > &a_ppc, const int a_level) noexcept
 Compute the number of reactive particles per cell for the CDR solvers.
 
virtual void computeReactiveCdrParticlesPerCell (EBCellFAB &a_ppc, const int a_level, const DataIndex a_din, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the number of reactive particles per cell for the CDR solvers.
 
virtual void computeReactiveMeanEnergiesPerCell (EBAMRCellData &a_meanEnergies) noexcept
 Compute the mean particle energy in all grid cells.
 
virtual void computeReactiveMeanEnergiesPerCell (LevelData< EBCellFAB > &a_meanEnergies, const int a_level) noexcept
 Compute the mean particle energy in all grid cells. Level version.
 
virtual void computeReactiveMeanEnergiesPerCell (EBCellFAB &a_meanEnergies, const int a_level, const DataIndex a_din, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the mean particle energy in all grid cells. Patch version.
 
virtual void advanceReactionNetwork (const Real a_dt) noexcept
 Chemistry advance over time a_dt.
 
virtual void advanceReactionNetwork (const EBAMRCellData &a_E, const Real a_dt) noexcept
 Chemistry advance over time a_dt. AMR version.
 
void advanceReactionNetwork (LevelData< EBCellFAB > &a_particlesPerCell, LevelData< EBCellFAB > &a_newPhotonsPerCell, const LevelData< EBCellFAB > &a_electricField, const int a_level, const Real a_dt) const noexcept
 Chemistry advance over time a_dt. Level version.
 
void advanceReactionNetwork (EBCellFAB &a_particlesPerCell, EBCellFAB &a_newPhotonsPerCell, const EBCellFAB &a_electricField, const int a_level, const DataIndex a_din, const Box a_box, const Real a_dx, const Real a_dt) const noexcept
 Chemistry advance over time a_dt. Patch version.
 
void reconcileParticles (const EBAMRCellData &a_newParticlesPerCell, const EBAMRCellData &a_oldParticlesPerCell, const EBAMRCellData &a_newPhotonsPerCell, const EBAMRCellData &a_electricField) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.
 
void reconcileParticles (const LevelData< EBCellFAB > &a_newParticlesPerCell, const LevelData< EBCellFAB > &a_oldParticlesPerCell, const LevelData< EBCellFAB > &a_newPhotonsPerCell, const LevelData< EBCellFAB > &a_electricField, const int a_level) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.
 
void reconcileParticles (const EBCellFAB &a_newParticlesPerCell, const EBCellFAB &a_oldParticlesPerCell, const EBCellFAB &a_newPhotonsPerCell, const EBCellFAB &a_electricField, const int a_level, const DataIndex a_din, const Box a_box, const Real a_dx) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.
 
virtual void reconcilePhotoionization () noexcept
 Reconcile the results from photoionization reactions.
 
virtual void reconcileCdrDensities (const EBAMRCellData &a_newParticlesPerCell, const EBAMRCellData &a_oldParticlesPerCell, const Real a_dt) noexcept
 Reconcile the CDR densities after the reaction network.
 
virtual void reconcileCdrDensities (const LevelData< EBCellFAB > &a_newParticlesPerCell, const LevelData< EBCellFAB > &a_oldParticlesPerCell, const int a_level, const Real a_dt) noexcept
 Reconcile the CDR densities after the reaction network.
 
virtual void reconcileCdrDensities (const EBCellFAB &a_newParticlesPerCell, const EBCellFAB &a_oldParticlesPerCell, const int a_level, const DataIndex a_din, const Box a_box, const Real a_dx, const Real a_dt) noexcept
 Reconcile the CDR densities after the reaction network.
 
virtual void coarsenCDRSolvers () noexcept
 Coarsen data for CDR solvers.
 
virtual void fillSecondaryEmissionEB (const Real a_dt) noexcept
 Resolve particle injection at EBs.
 
virtual void fillSecondaryEmissionEB (Vector< ParticleContainer< ItoParticle > > &a_secondaryParticles, Vector< EBAMRIVData > &a_cdrFluxes, Vector< ParticleContainer< Photon > > &a_secondaryPhotons, Vector< ParticleContainer< ItoParticle > * > &a_primaryParticles, Vector< EBAMRIVData > &a_cdrFluxesExtrap, Vector< ParticleContainer< Photon > * > &a_primaryPhotons, const EBAMRCellData &a_electricField, const Real a_dt) noexcept
 Compute secondary emission at the EB.
 
virtual void resolveSecondaryEmissionEB (const Real a_dt) noexcept
 Resolve secondary emission at the EB.
 
virtual void resolveSecondaryEmissionEB (Vector< ParticleContainer< ItoParticle > * > &a_secondaryParticles, Vector< ParticleContainer< ItoParticle > * > &a_primaryParticles, Vector< EBAMRIVData * > &a_cdrFluxes, EBAMRIVData &a_surfaceChargeDensity, const Real a_dt) noexcept
 Resolve secondary emission at the EB.
 
virtual void computePhysicsDt () noexcept
 Compute a physics-based maximum time step.
 
virtual void computeDummyPhysicsDt () noexcept
 Special routine which performs a dummy KMC advance over a zero time step.
 
virtual Real computeTotalCharge () const noexcept
 Compute total charge.
 
virtual Real computeQplus () const noexcept
 Compute positive charge.
 
virtual Real computeQminu () const noexcept
 Compute negative charge.
 
virtual Real computeQsurf () const noexcept
 Compute surface charge.
 
virtual void advancePhotons (const Real a_dt) noexcept
 Photon advancement routine.
 
virtual void sortPhotonsByCell (const McPhoto::WhichContainer a_which) noexcept
 Sort photons by cells.
 
virtual void sortPhotonsByPatch (const McPhoto::WhichContainer a_which) noexcept
 Sort photons by patch.
 
virtual void postCheckpointPoisson () noexcept
 Do some post-checkpoint operations for the electrostatic part.
 
virtual void computeEdotJSource (const Real a_dt) noexcept
 Compute the energy source term for the various plasma species.
 
virtual void initialSigma () noexcept
 Fill surface charge solver with initial data taken from the physics interface.
 
virtual void parseVerbosity () noexcept
 Parse chattiness.
 
virtual void parseExitOnFailure () noexcept
 Parse exit on failure.
 
virtual void parseRedistributeCDR () noexcept
 Parse CDR mass redistribution when assigning reactive products.
 
virtual void parseSuperParticles () noexcept
 Parse the desired number of particles per cell.
 
virtual void parseDualGrid () noexcept
 Parse dual or single realm calculations.
 
virtual void parseLoadBalance () noexcept
 Parse load balancing.
 
virtual void parseTimeStepRestrictions () noexcept
 Parse time step restrictions.
 
virtual void parseParametersEB () noexcept
 Parse parameters related to how we treat particle-EB interaction.
 
virtual void parsePlotVariables () noexcept
 Parse plot variables.
 
virtual void computePhysicsPlotVariables (EBAMRCellData &a_physicsPlotVars) noexcept
 Compute physics plot variables.
 

Protected Attributes

Real m_maxFieldExitCrit
 Exit criterion for maximum field – if the background field changes by this much the simulation is terminated.
 
Real m_relFieldExitCrit
 Exit criterion for relative field – if the relative change in the background field in any cell changes by this much the simulation is terminated.
 
Real m_maxInitialTimeStep
 Initial time step size. Introduced to limit the initial particles from moving to far in the initial timestep.
 
Real m_maxFieldChange
 Change in max field.
 
Real m_relFieldChange
 Change in relative field.
 
Real m_electrodeCharge
 Total charge on the electrode, given by \int(eps*E dA)
 
Real m_ohmicCharge
 Total charge that left through the electrode in the last time step.
 
Real m_sumOpticalPhi
 Integrated optical emissions (phi)
 
Real m_sumOpticalSrc
 Integrated optical emissions (source term)
 
std::string m_opticalSolver
 Name of the optical solver.
 
MFAMRCellData m_backgroundField
 For storing the background field.
 
- Protected Attributes inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >
bool m_writeCheckpointParticles
 If true, then the particles are checkpointed so we can regrid on checkpoint-restart.
 
bool m_readCheckpointParticles
 If true, then the HDF5 checkpoint file contained particles that we can read.
 
bool m_canRegridOnRestart
 If true, then the class supports regrid-on-restart.
 
bool m_extendConductivityEB
 For achieving a slightly smoother gradient in the conductivity near the EB.
 
bool m_emitSecondaryParticlesBeforeReactions
 If true, particles will be emitted before the reactive step.
 
WhichAlgorithm m_algorithm
 Which advancement algorithm to use.
 
Timer m_timer
 Timer used for run-time logging of routines.
 
int m_rhoFilterNum
 Number of filterings when computing the semi-implicit space charge density.
 
int m_rhoFilterMaxStride
 Stride when filtering the space charge density.
 
Real m_rhoFilterAlpha
 Factor for strided filter. Alpha=0.5 yields a bilinear filter.
 
int m_condFilterNum
 Number of filterings of the conductivity.
 
int m_condFilterMaxStride
 Stride when filtering the conductivity.
 
Real m_condFilterAlpha
 Factor for strided filter. Alpha=0.5 yields a bilinear filter.
 
Real m_maxFieldAbort
 Limit for maximum field abort.
 
Vector< RefCountedPtr< ParticleContainer< PointParticle > > > m_conductivityParticles
 Storage for simplified particles that gave us sigma^k.
 
Vector< RefCountedPtr< ParticleContainer< PointParticle > > > m_irregularParticles
 Storage for particles that fell inside the EB but should still contribute to the conductivity.
 
Vector< RefCountedPtr< ParticleContainer< PointParticle > > > m_rhoDaggerParticles
 Storage for particles that gave rho^dagger.
 
EBAMRCellData m_semiImplicitRhoCDR
 Storage for CDR densities used during the semi-implicit solve.
 
EBAMRCellData m_semiImplicitConductivityCDR
 Storage for conductivity term due to mobile CDR species.
 
EBAMRCellData m_scratchSemiImplicitRhoCDR
 Scratch storage for CDR contribution to space charge density.
 
EBAMRCellData m_scratchSemiImplicitConductivityCDR
 Scratch storage for CDR contribution to conductivity.
 
Vector< EBAMRCellDatam_cdrDivD
 Storage for the finite-volume approximation of div(D*grad(phi)) for the CDR equations.
 
- Protected Attributes inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >
BoxSorting m_boxSort
 Box sorting method when using dual-grid with particle load balancing.
 
TimeCode m_timeCode
 Time code for understanding how the time step was restricted.
 
std::string m_fluidRealm
 Realm used for the fluid part (i.e., electrostatic) part of the simulation.
 
std::string m_particleRealm
 Realm used for the particle part of the simulation.
 
std::string m_name
 Time stepper name.
 
phase::which_phase m_plasmaPhase
 Phase where we solve for the plasma.
 
RefCountedPtr< ItoKMCPhysicsm_physics
 Implementation of ItoKMCPhysics.
 
RefCountedPtr< ItoLayout< ItoSolver > > m_ito
 Ito solvers.
 
RefCountedPtr< CdrLayout< CdrSolver > > m_cdr
 CDR solvers.
 
RefCountedPtr< RtLayout< McPhoto > > m_rte
 Radiative transfer solvers.
 
RefCountedPtr< FieldSolverm_fieldSolver
 Field solver.
 
RefCountedPtr< SurfaceODESolver< 1 > > m_sigmaSolver
 Surface charge solver.
 
Vector< ParticleContainer< ItoParticle > > m_secondaryParticles
 List of secondary particles injected through the EB.
 
Vector< ParticleContainer< Photon > > m_secondaryPhotons
 List of secondary photons injected through the EB.
 
Vector< EBAMRIVDatam_cdrFluxes
 CDR fluxes for CDR BCs.
 
Vector< EBAMRIVDatam_cdrFluxesExtrap
 Extrapolated CDR fluxes.
 
std::function< Real(const Real a_time)> m_voltage
 Voltage curve on the electrodes used in the simulation.
 
bool m_abortOnFailure
 Flag for abandoning simulation of Poisson solver fails.
 
bool m_redistributeCDR
 Flag for abandoning simulation of Poisson solver fails.
 
bool m_dualGrid
 Using dual grid or not.
 
bool m_profile
 Profile kernels or not.
 
bool m_regridSuperparticles
 Do or do not superparticle merging/splitting on regrids.
 
bool m_loadBalanceParticles
 Load balance particle realm or not.
 
bool m_loadBalanceFluid
 Load balance fluid realm or not.
 
bool m_plotConductivity
 Plot conductivity or not.
 
bool m_plotCurrentDensity
 Plot conductivity or not.
 
bool m_plotParticlesPerPatch
 Plot number of particles per patch or not.
 
Vector< intm_particlesPerCell
 Target number of particles per cell when squishing ItoParticle's into superparticles.
 
int m_mergeInterval
 How often to merge superparticles.
 
Real m_maxReducedField
 Storage for the maximum field strength that was computed.
 
Real m_prevDt
 Previous time step.
 
Real m_maxGrowthDt
 Maximum permissible time step growth.
 
Real m_maxShrinkDt
 Maximum permissible time step shrinkage.
 
Real m_loadPerCell
 The "background" load per cell when using particle load balancing.
 
Real m_toleranceEB
 Accepted tolerance (relative to dx) for EB intersection.
 
Real m_minParticleAdvectionCFL
 Minimum CFL-like time step for particle advection.
 
Real m_maxParticleAdvectionCFL
 Maximum CFL-like time step for particle advection.
 
Real m_minParticleDiffusionCFL
 Minium CFL-like time step for particle diffusion.
 
Real m_maxParticleDiffusionCFL
 Maximum CFL-like time step for particle diffusion.
 
Real m_minParticleAdvectionDiffusionCFL
 Maximum CFL-like time step for particle advection-diffusion.
 
Real m_maxParticleAdvectionDiffusionCFL
 Maximum CFL-like time step for particle advection-diffusion.
 
Real m_fluidAdvectionDiffusionCFL
 CFL-like time step for fluid advection-diffusion.
 
Real m_relaxTimeFactor
 Factor proportional to the dielectric relaxation time dtRelax = eps0/sigma.
 
Real m_minDt
 Minimum permitted time step.
 
Real m_maxDt
 Maximum permitted time step.
 
Real m_particleAdvectionDt
 The particle advective time step.
 
Real m_particleDiffusionDt
 The particle diffusive time step.
 
Real m_particleAdvectionDiffusionDt
 The advection-diffusion time step.
 
Real m_fluidAdvectionDiffusionDt
 The advection-diffusion time step for the CDR equations.
 
Real m_relaxationTime
 The relaxation time eps0/sigma.
 
Real m_physicsDt
 The physics-based time step.
 
Real m_physicsDtFactor
 Relative factor for controlling.
 
Vector< EBAMRCellDatam_loadBalancePPC
 For holding the number of computational particles per cell when load balancing.
 
Vector< EBAMRCellDatam_cdrMobilities
 For holding the mobilities for the CDR species.
 
Vector< EBAMRCellDatam_fluidGradPhiCDR
 For holding the gradient of all CDR species densities.
 
Vector< EBAMRCellDatam_fluidGradPhiIto
 For holding the gradient of all Ito species densities.
 
Vector< EBAMRCellDatam_fluidPhiIto
 For holding the Ito species densities on the fluid realm.
 
Vector< ParticleContainer< PointParticle > > m_cdrPhotoiProducts
 Photoionization products to be put in the CDR equations.
 
Vector< intm_loadBalanceIndices
 Solver indices used when load-balancing the particle solvers.
 
EBAMRCellData m_currentDensity
 Storage for current density.
 
EBAMRCellData m_physicsPlotVariables
 Storage for physics plot variables.
 
EBAMRCellData m_neutralDensity
 Storage for the neutral density.
 
EBAMRCellData m_conductivityCell
 Cell-centered conductivity.
 
EBAMRFluxData m_conductivityFace
 Face-centered conductivity.
 
EBAMRIVData m_conductivityEB
 EB-centered conductivity.
 
EBAMRCellData m_particleItoPPC
 For holding the number of physical particles per cell for all Ito species.
 
EBAMRCellData m_particleYPC
 For holding the number of generated photons per cell.
 
EBAMRCellData m_particleEPS
 For holding the mean particle energy.
 
EBAMRCellData m_particleOldItoPPC
 For holding the previous number of particles per cell for all species.
 
EBAMRCellData m_fluidCdrPPC
 For holding the number of physical particles per cell for all CDR species.
 
EBAMRCellData m_fluidOldCdrPPC
 For holding the previous number of physical particles per cell for all CDR species.
 
EBAMRCellData m_fluidPPC
 For holding the number of particles per cell for all species.
 
EBAMRCellData m_fluidYPC
 For holding the number of generated photons per cell.
 
EBAMRCellData m_electricFieldFluid
 Storage for holding the plasma phase electric field on the fluid realm.
 
EBAMRCellData m_electricFieldParticle
 Storage for holding the plasma phase electric field on the particle realm.
 
EBAMRCellData m_kmcDt
 Storage for the non-critical time step computed by ItoKMCPhysics.
 
Vector< EBAMRCellDatam_energySources
 Storage for holding the energy sources for each species.
 
EBAMRCellData m_EdotJ
 Storage for holdnig E*J on the fluid realm. 1 component.
 
EBAMRCellData m_fluidScratch1
 Scratch storage on the fluid realm having 1 component.
 
EBAMRCellData m_fluidScratchD
 Scratch storage on the fluid realm with SpaceDim components.
 
EBAMRCellData m_particleScratch1
 Scratch storage on the particle realm with 1 component.
 
EBAMRCellData m_particleScratchD
 Scratch storage on the particle realm with SpaceDim components.
 
EBAMRIVData m_fluidScratchEB
 Scratch storage for EB-only data on the fluid realm. One component.
 
EBAMRIVData m_particleScratchEB
 Scratch storage for EB-only data on the particle realm. One component.
 
- 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::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >
enum class  WhichAlgorithm { EulerMaruyama }
 Simple enum for distinguishing between algorithms.
 
- Protected Types inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >
enum class  TimeCode {
  AdvectionIto , DiffusionIto , AdvectionDiffusionIto , AdvectionDiffusionCDR ,
  RelaxationTime , Hardcap , Physics
}
 An enum for encapsulating how time steps were restricted.
 

Detailed Description

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverGMG>
class Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F >

Implementation of ItoKMCGodunovStepper that also evaluates the background field at every regrid/time step.

Constructor & Destructor Documentation

◆ ItoKMCBackgroundEvaluator()

template<typename I , typename C , typename R , typename F >
ItoKMCBackgroundEvaluator::ItoKMCBackgroundEvaluator ( RefCountedPtr< ItoKMCPhysics > &  a_physics)
noexcept

Constructor.

Parameters
[in]a_physicsPhysics kernel that will be used.

Member Function Documentation

◆ advance()

template<typename I , typename C , typename R , typename F >
Real ItoKMCBackgroundEvaluator::advance ( const Real  a_dt)
overridevirtual

Overriden advance method.

Parameters
[in]a_dtTime step

Reimplemented from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >.

◆ computeDt()

template<typename I , typename C , typename R , typename F >
Real ItoKMCBackgroundEvaluator::computeDt ( )
overridevirtual

Compute a time step used for the advance method.

Note
This function returns a zero value if space charge effects have set in, which lets Driver put plot files in the crash folder.

Reimplemented from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >.

◆ evaluateSpaceChargeEffects()

template<typename I , typename C , typename R , typename F >
std::pair< Real, Real > ItoKMCBackgroundEvaluator::evaluateSpaceChargeEffects ( )
protectedvirtualnoexcept

Evaluate the maximum change in the background field.

Returns
Returns a pair: relative change, maximum change

◆ integrateElectrodeSurfaceCharge()

template<typename I , typename C , typename R , typename F >
Real ItoKMCBackgroundEvaluator::integrateElectrodeSurfaceCharge ( ) const
protectedvirtualnoexcept

Compute total charge on electrode.

This returns \int(eps * E)*dA

◆ integrateOhmicCharge()

template<typename I , typename C , typename R , typename F >
Real ItoKMCBackgroundEvaluator::integrateOhmicCharge ( ) const
protectedvirtualnoexcept

Compute the total ohmic current through the electrode.

This returns the total charge that left the electrode in the last time step.

◆ integrateOpticalExcitations()

template<typename I , typename C , typename R , typename F >
std::pair< Real, Real > ItoKMCBackgroundEvaluator::integrateOpticalExcitations ( ) const
protectedvirtualnoexcept

Integrate the sum of the optical excitations.

This returns the sum of the emissions, and the sum of the excitations.

◆ postCheckpointSetup()

template<typename I , typename C , typename R , typename F >
void ItoKMCBackgroundEvaluator::postCheckpointSetup ( )
finaloverridevirtualnoexcept

Post-checkpoint operations. Computes the background field.

Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.

◆ postInitialize()

template<typename I , typename C , typename R , typename F >
void ItoKMCBackgroundEvaluator::postInitialize ( )
finaloverridevirtualnoexcept

Post-initialization operations. Computes the background field.

Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.

◆ postRegrid()

template<typename I , typename C , typename R , typename F >
void ItoKMCBackgroundEvaluator::postRegrid ( )
finaloverridevirtualnoexcept

Post-regrid operations. Computes the background field.

Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.

◆ printStepReport()

template<typename I , typename C , typename R , typename F >
void ItoKMCBackgroundEvaluator::printStepReport ( )
finaloverridevirtualnoexcept

Print a new step report. This is the old one plus the maximum field change.

Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.

Member Data Documentation

◆ m_backgroundField

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverGMG>
MFAMRCellData Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F >::m_backgroundField
protected

For storing the background field.

This field is space- and surface-charge free and is filled by computeBackgroundField

◆ m_maxInitialTimeStep

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverGMG>
Real Physics::ItoKMC::ItoKMCBackgroundEvaluator< I, C, R, F >::m_maxInitialTimeStep
protected

Initial time step size. Introduced to limit the initial particles from moving to far in the initial timestep.

Default constructed to 0.0, which indicates normal operation.


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