chombo-discharge
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Physics::ItoKMC::ItoKMCStepper< I, C, R, F > Class Template Referenceabstract

Base time stepper class that advances the Ito-KMC-Poisson system of equations. If you want a different underlying solver, change the template arguments. More...

#include <CD_ItoKMCStepper.H>

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

Public Member Functions

 ItoKMCStepper () noexcept
 Default constructor. Sets default options.
 
 ItoKMCStepper (RefCountedPtr< ItoKMCPhysics > &a_physics) noexcept
 Full constructor. Calls the other constructor. More...
 
virtual ~ItoKMCStepper () noexcept
 Destructor.
 
virtual void parseOptions () noexcept
 Parse options.
 
virtual void parseRuntimeOptions () noexcept override
 Parse runtime configurable options.
 
virtual void allocate () noexcept override
 Allocate storage for solvers.
 
virtual void setupSolvers () noexcept override
 Set up solvers.
 
virtual void initialData () noexcept override
 Fill solvers with initial data.
 
virtual void postCheckpointSetup () noexcept override
 Perform post-checkpoint operations. More...
 
virtual void postInitialize () noexcept override
 Post-initialization operations. Default does nothing.
 
virtual int getNumberOfPlotVariables () const noexcept override
 Get number of plot variables for the output file.
 
virtual Vector< std::string > getPlotVariableNames () 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. More...
 
virtual Vector< long int > getCheckpointLoads (const std::string a_realm, const int a_level) const override
 Get computational loads to be checkpointed. More...
 
virtual Real advance (const Real a_dt) override=0
 Advancement method. Needs to be implemented by subclasses. More...
 
virtual Real computeDt () override
 Compute a time step used for the advance method.
 
virtual void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) noexcept override
 Synchronize solver times for all the solvers. More...
 
virtual void printStepReport () noexcept override
 Print a step report. Used by Driver for user monitoring of simulation.
 
virtual void registerRealms () noexcept override
 Register realms used for the simulation.
 
virtual void registerOperators () noexcept override
 Register operators used for the simulation.
 
virtual void prePlot () noexcept override
 Perform pre-plot operations.
 
virtual void postPlot () noexcept override
 Perform post-plot operations.
 
virtual void preRegrid (const int a_lmin, const int a_oldFinestLevel) noexcept override
 Perform pre-regrid operations - storing relevant data from the old grids. More...
 
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. More...
 
virtual void postRegrid () noexcept override
 Perform post-regrid 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. More...
 
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. More...
 
virtual void setVoltage (const std::function< Real(const Real a_time)> &a_voltage) noexcept
 Set voltage used for the simulation. More...
 
virtual Real getTime () const noexcept
 Get current simulation time. More...
 
virtual void computeElectricField (EBAMRCellData &a_electricField, const phase::which_phase a_phase) const noexcept
 Recompute the electric field onto the specified data holder. More...
 
- 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. More...
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry. More...
 
virtual bool needToRegrid ()
 Fuction which can have Driver do regrids at arbitrary points in the simulation. More...
 

Protected Types

enum class  TimeCode {
  AdvectionIto , DiffusionIto , AdvectionDiffusionIto , AdvectionDiffusionCDR ,
  RelaxationTime , Hardcap , Physics
}
 An enum for encapsulating how time steps were restricted.
 

Protected Member Functions

virtual void allocateInternals () noexcept
 Allocate "internal" storage.
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void getMaxMinItoDensity (Real &a_maxDensity, Real &a_minDensity, std::string &a_maxSolver, std::string &a_minSolver) const noexcept
 Get maximum density of the Ito species. More...
 
virtual void getMaxMinCDRDensity (Real &a_maxDensity, Real &a_minDensity, std::string &a_maxSolver, std::string &a_minSolver) const noexcept
 Get maximum density of the CDr species. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual Vector< RefCountedPtr< ItoSolver > > getLoadBalanceSolvers () const noexcept
 Get the solvers used for load balancing. More...
 
virtual Real computeMaxElectricField (const phase::which_phase a_phase) const noexcept
 Compute the maximum electric field (norm) More...
 
virtual void computeSpaceChargeDensity () noexcept
 Compute the space charge. Calls the other version. More...
 
virtual void computeSpaceChargeDensity (MFAMRCellData &a_rho, const Vector< EBAMRCellData * > &a_itoDensities, const Vector< EBAMRCellData * > &a_cdrDensities) noexcept
 Compute the space charge density. More...
 
virtual void computeConductivityCell (EBAMRCellData &a_conductivity) noexcept
 Compute the cell-centered conductiivty. More...
 
virtual void computeConductivityCell (EBAMRCellData &a_conductivity, const Vector< ParticleContainer< ItoParticle > * > &a_particles) noexcept
 Compute the cell-centered conductiivty. More...
 
virtual void computeDensityGradients () noexcept
 Compute grad(phi) and phi for both CDR and Ito species and put the result on the fluid realm. More...
 
virtual void computeCurrentDensity (EBAMRCellData &a_J) noexcept
 Compute the current density. More...
 
virtual Real computeRelaxationTime () noexcept
 Compute the dielectric relaxation time.
 
virtual bool solvePoisson () noexcept
 Solve the electrostatic problem. More...
 
virtual void depositParticles (const SpeciesSubset a_speciesSubset) noexcept
 Deposit a subset of the ItoSolver particles on the mesh. More...
 
virtual void depositParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_container) noexcept
 Deposit a subset of the ItoSolver particles on the mesh. More...
 
virtual void remapParticles (const SpeciesSubset a_speciesSubset) noexcept
 Remap a subset of ItoSolver particles. More...
 
virtual void remapParticles (const SpeciesSubset a_speciesSubset, const ItoSolver::WhichContainer a_container) noexcept
 Remap a subset of ItoSolver particles. More...
 
virtual void computeDriftVelocities () noexcept
 Compute ItoSolver velocities. More...
 
virtual void setItoVelocityFunctions () noexcept
 Set the Ito velocity functions. This is sgn(charge) * E. More...
 
virtual void setCdrVelocityFunctions () noexcept
 Set the Cdr velocities to be sgn(charge) * E. More...
 
virtual void multiplyCdrVelocitiesByMobilities () noexcept
 Multiply CDR solver velocities by mobilities.
 
virtual void computeMobilities () noexcept
 Compute mesh-based mobilities for LFA coupling. More...
 
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. More...
 
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. More...
 
virtual void computeMobilities (Vector< EBCellFAB * > &a_itoMobilities, Vector< EBCellFAB * > &a_cdrMobilities, const EBCellFAB &a_electricField, const int a_level, const DataIndex a_dit, const Box a_cellBox, const Real a_time) noexcept
 Patch-routine when computing mesh-based mobilities for LFA coupling. More...
 
virtual void computeDiffusionCoefficients () noexcept
 Compute mesh-based diffusion coefficients for LFA coupling. More...
 
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. More...
 
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. More...
 
virtual void computeDiffusionCoefficients (Vector< EBCellFAB * > &a_itoDiffusionCoefficients, Vector< EBCellFAB * > &a_cdrDiffusionCoefficients, const EBCellFAB &a_E, const int a_level, const DataIndex a_dit, const Box a_box, const Real a_time) noexcept
 Patch-routine when computing mesh-based diffusion coefficients in the LFA coupling. More...
 
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. More...
 
virtual void computeReactiveItoParticlesPerCell (EBAMRCellData &a_ppc) noexcept
 Compute the number of reactive particles per cell. More...
 
virtual void computeReactiveItoParticlesPerCell (LevelData< EBCellFAB > &a_ppc, const int a_level) noexcept
 Compute the number of reactive particles per cell. More...
 
virtual void computeReactiveItoParticlesPerCell (EBCellFAB &a_ppc, const int a_level, const DataIndex a_dit, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the number of reactive particles per cell. More...
 
virtual void computeReactiveCdrParticlesPerCell (EBAMRCellData &a_ppc) noexcept
 Compute the number of reactive particles per cell for the CDR solvers. More...
 
virtual void computeReactiveCdrParticlesPerCell (LevelData< EBCellFAB > &a_ppc, const int a_level) noexcept
 Compute the number of reactive particles per cell for the CDR solvers. More...
 
virtual void computeReactiveCdrParticlesPerCell (EBCellFAB &a_ppc, const int a_level, const DataIndex a_dit, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the number of reactive particles per cell for the CDR solvers. More...
 
virtual void computeReactiveMeanEnergiesPerCell (EBAMRCellData &a_meanEnergies) noexcept
 Compute the mean particle energy in all grid cells. More...
 
virtual void computeReactiveMeanEnergiesPerCell (LevelData< EBCellFAB > &a_meanEnergies, const int a_level) noexcept
 Compute the mean particle energy in all grid cells. Level version. More...
 
virtual void computeReactiveMeanEnergiesPerCell (EBCellFAB &a_meanEnergies, const int a_level, const DataIndex a_dit, const Box a_box, const EBISBox &a_ebisbox) noexcept
 Compute the mean particle energy in all grid cells. Patch version. More...
 
virtual void advanceReactionNetwork (const Real a_dt) noexcept
 Chemistry advance over time a_dt. More...
 
virtual void advanceReactionNetwork (const EBAMRCellData &a_E, const Real a_dt) noexcept
 Chemistry advance over time a_dt. AMR version. More...
 
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. More...
 
void advanceReactionNetwork (EBCellFAB &a_particlesPerCell, EBCellFAB &a_newPhotonsPerCell, const EBCellFAB &a_electricField, const int a_level, const DataIndex a_dit, const Box a_box, const Real a_dx, const Real a_dt) const noexcept
 Chemistry advance over time a_dt. Patch version. More...
 
void reconcileParticles (const EBAMRCellData &a_newParticlesPerCell, const EBAMRCellData &a_oldParticlesPerCell, const EBAMRCellData &a_newPhotonsPerCell) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation. More...
 
void reconcileParticles (const LevelData< EBCellFAB > &a_newParticlesPerCell, const LevelData< EBCellFAB > &a_oldParticlesPerCell, const LevelData< EBCellFAB > &a_newPhotonsPerCell, const int a_level) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation. More...
 
void reconcileParticles (const EBCellFAB &a_newParticlesPerCell, const EBCellFAB &a_oldParticlesPerCell, const EBCellFAB &a_newPhotonsPerCell, const int a_level, const DataIndex a_dit, const Box a_box, const Real a_dx) const noexcept
 Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation. More...
 
virtual void reconcilePhotoionization () noexcept
 Reconcile the results from photoionization reactions. More...
 
virtual void reconcileCdrDensities (const EBAMRCellData &a_newParticlesPerCell, const EBAMRCellData &a_oldParticlesPerCell, const Real a_dt) noexcept
 Reconcile the CDR densities after the reaction network. More...
 
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. More...
 
virtual void reconcileCdrDensities (const EBCellFAB &a_newParticlesPerCell, const EBCellFAB &a_oldParticlesPerCell, const int a_level, const DataIndex a_dit, const Box a_box, const Real a_dx, const Real a_dt) noexcept
 Reconcile the CDR densities after the reaction network. More...
 
virtual void coarsenCDRSolvers () noexcept
 Coarsen data for CDR solvers.
 
virtual void fillSecondaryEmissionEB (const Real a_dt) noexcept
 Resolve particle injection at EBs. More...
 
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. More...
 
virtual void resolveSecondaryEmissionEB (const Real a_dt) noexcept
 Resolve secondary emission at the EB. More...
 
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. More...
 
virtual Real computePhysicsDt () noexcept
 Compute a maximum time step from the physics interface. More...
 
virtual Real computePhysicsDt (const EBAMRCellData &a_electricField) noexcept
 Compute a maximum time step from the physics interface. More...
 
virtual Real computePhysicsDt (const LevelData< EBCellFAB > &a_electricField, const LevelData< EBCellFAB > &a_particlesPerCell, const int a_level) noexcept
 Compute a maximum time step from the physics interface. More...
 
virtual Real computePhysicsDt (const EBCellFAB &a_electricField, const EBCellFAB &a_particlesPercCell, const int a_level, const DataIndex a_dit, const Box a_box) noexcept
 Compute a maximum time step from the physics interface. More...
 
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. More...
 
virtual void sortPhotonsByCell (const McPhoto::WhichContainer a_which) noexcept
 Sort photons by cells. More...
 
virtual void sortPhotonsByPatch (const McPhoto::WhichContainer a_which) noexcept
 Sort photons by patch. More...
 
virtual void postCheckpointPoisson () noexcept
 Do some post-checkpoint operations for the electrostatic part. More...
 
virtual void computeEdotJSource (const Real a_dt) noexcept
 Compute the energy source term for the various plasma species. More...
 
virtual void initialSigma () noexcept
 Fill surface charge solver with initial data taken from the physics interface.
 
virtual void parseVerbosity () noexcept
 Parse chattiness. More...
 
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. More...
 
virtual void parseDualGrid () noexcept
 Parse dual or single realm calculations. More...
 
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. More...
 

Protected Attributes

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. More...
 
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. More...
 
RefCountedPtr< ItoKMCPhysicsm_physics
 Implementation of ItoKMCPhysics. More...
 
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. More...
 
Vector< ParticleContainer< Photon > > m_secondaryPhotons
 List of secondary photons injected through the EB. More...
 
Vector< EBAMRIVDatam_cdrFluxes
 CDR fluxes for CDR BCs. More...
 
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< int > m_particlesPerCell
 Target number of particles per cell when squishing ItoParticle's into superparticles.
 
int m_mergeInterval
 How often to merge superparticles. More...
 
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. More...
 
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. More...
 
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.
 
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. More...
 
Vector< EBAMRCellDatam_fluidGradPhiCDR
 For holding the gradient of all CDR species densities. More...
 
Vector< EBAMRCellDatam_fluidGradPhiIto
 For holding the gradient of all Ito species densities. More...
 
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. More...
 
Vector< int > m_loadBalanceIndices
 Solver indices used when load-balancing the particle solvers.
 
EBAMRCellData m_currentDensity
 Storage for current density. More...
 
EBAMRCellData m_physicsPlotVariables
 Storage for physics plot variables.
 
EBAMRCellData m_conductivityCell
 Cell-centered conductivity. More...
 
EBAMRFluxData m_conductivityFace
 Face-centered conductivity. More...
 
EBAMRIVData m_conductivityEB
 EB-centered conductivity. More...
 
EBAMRCellData m_particleItoPPC
 For holding the number of physical particles per cell for all Ito species. More...
 
EBAMRCellData m_particleYPC
 For holding the number of generated photons per cell. More...
 
EBAMRCellData m_particleEPS
 For holding the mean particle energy. More...
 
EBAMRCellData m_particleOldItoPPC
 For holding the previous number of particles per cell for all species. More...
 
EBAMRCellData m_fluidCdrPPC
 For holding the number of physical particles per cell for all CDR species. More...
 
EBAMRCellData m_fluidOldCdrPPC
 For holding the previous number of physical particles per cell for all CDR species. More...
 
EBAMRCellData m_fluidPPC
 For holding the number of particles per cell for all species. More...
 
EBAMRCellData m_fluidYPC
 For holding the number of generated photons per cell. More...
 
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.
 
Vector< EBAMRCellDatam_energySources
 Storage for holding the energy sources for each species. More...
 
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.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry.
 

Detailed Description

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

Base time stepper class that advances the Ito-KMC-Poisson system of equations. If you want a different underlying solver, change the template arguments.

Constructor & Destructor Documentation

◆ ItoKMCStepper()

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

Full constructor. Calls the other constructor.

Parameters
[in]a_physicsImplementation of the Ito plasma physics model.

Member Function Documentation

◆ advance()

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
virtual Real Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::advance ( const Real  a_dt)
overridepure virtual

Advancement method. Needs to be implemented by subclasses.

Parameters
[in]a_dtTime step to be used for advancement
Returns
Returns the time step that was used.

Implements TimeStepper.

Implemented in Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >.

◆ advancePhotons()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::advancePhotons ( const Real  a_dt)
protectedvirtualnoexcept

Photon advancement routine.

Parameters
[in]a_dtTime step

◆ advanceReactionNetwork() [1/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::advanceReactionNetwork ( const EBAMRCellData a_E,
const Real  a_dt 
)
protectedvirtualnoexcept

Chemistry advance over time a_dt. AMR version.

Parameters
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_dtTime step
Note
This will call the level versions AND reconcileParticles. The kernel will only run over valid grid cells (not covered by a finer grid.

◆ advanceReactionNetwork() [2/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::advanceReactionNetwork ( const Real  a_dt)
protectedvirtualnoexcept

Chemistry advance over time a_dt.

Parameters
[in]a_dtTime step
Note
This will call the other version. The kernel will only run over valid grid cells (not covered by a finer grid.

◆ advanceReactionNetwork() [3/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::advanceReactionNetwork ( EBCellFAB &  a_particlesPerCell,
EBCellFAB &  a_newPhotonsPerCell,
const EBCellFAB &  a_electricField,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const Real  a_dx,
const Real  a_dt 
) const
inlineprotectednoexcept

Chemistry advance over time a_dt. Patch version.

Parameters
[in,out]a_particlesPerCellNumber of particles per cell for each plasma species
[in,out]a_newPhotonsPerCellNumber of physical photons to be generated for each photon species
[in]a_electricFieldElectric field.
[in]a_levelGrid level
[in]a_ditGrid index.
[in]a_boxGrid box
[in]a_dxGrid resolution.
[in]a_dtTime increment
Note
This should be called through the AMR signature. All data should be defined on the fluid realm. The kernel will only run over valid grid cells (not covered by a finer grid.

◆ advanceReactionNetwork() [4/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::advanceReactionNetwork ( LevelData< EBCellFAB > &  a_particlesPerCell,
LevelData< EBCellFAB > &  a_newPhotonsPerCell,
const LevelData< EBCellFAB > &  a_electricField,
const int  a_level,
const Real  a_dt 
) const
inlineprotectednoexcept

Chemistry advance over time a_dt. Level version.

Parameters
[in,out]a_particlesPerCellNumber of particles per cell for each plasma species
[in,out]a_newPhotonsPerCellNumber of physical photons to be generated for each photon species
[in]a_electricFieldElectric field.
[in]a_levelGrid level
[in]a_dtTime increment
Note
This should be called through the AMR signature. All data should be defined on the fluid realm. The kernel will only run over valid grid cells (not covered by a finer grid.

◆ computeConductivityCell() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeConductivityCell ( EBAMRCellData a_conductivity)
protectedvirtualnoexcept

Compute the cell-centered conductiivty.

Parameters
[out]a_conductivityCell-centered conductivity
Note
User should have updated the mobilities before calling this routine.

◆ computeConductivityCell() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeConductivityCell ( EBAMRCellData a_conductivity,
const Vector< ParticleContainer< ItoParticle > * > &  a_particles 
)
protectedvirtualnoexcept

Compute the cell-centered conductiivty.

Parameters
[out]a_conductivityCell-centered conductivity
[in]a_particlesIto particles.
Note
User should have updated the mobilities before calling this routine.

◆ computeCurrentDensity()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeCurrentDensity ( EBAMRCellData a_J)
protectedvirtualnoexcept

Compute the current density.

Note
This calls computeConductivityCell and uses m_electricFieldFluid. Make sure they're updated.

◆ computeDensityGradients()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDensityGradients
protectedvirtualnoexcept

Compute grad(phi) and phi for both CDR and Ito species and put the result on the fluid realm.

This will compute the gradients using the results in the solvers. The user should make sure he/she deposits the Ito particles before calling this routine. The results are put in m_fluidGradPhiCDR and and m_fluidGradPhiito

◆ computeDiffusionCoefficients() [1/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDiffusionCoefficients
protectedvirtualnoexcept

Compute mesh-based diffusion coefficients for LFA coupling.

Note
Calls the other version with diffusion coefficients taken from the solvers.

◆ computeDiffusionCoefficients() [2/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDiffusionCoefficients ( Vector< EBAMRCellData * > &  a_itoDiffusionCoefficients,
Vector< EBAMRCellData * > &  a_cdrDiffusionCoefficients,
const EBAMRCellData a_electricField,
const Real  a_time 
)
protectedvirtualnoexcept

Compute mesh-based diffusion coefficients for LFA coupling.

Parameters
[out]a_itoDiffusionCoefficientsMesh-based diffusion coefficients for Ito solvers. Must be defined on the particle realm.
[out]a_cdrDiffusionCoefficientsMesh-based diffusion coefficients for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_timeTime

◆ computeDiffusionCoefficients() [3/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDiffusionCoefficients ( Vector< EBCellFAB * > &  a_itoDiffusionCoefficients,
Vector< EBCellFAB * > &  a_cdrDiffusionCoefficients,
const EBCellFAB &  a_E,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const Real  a_time 
)
protectedvirtualnoexcept

Patch-routine when computing mesh-based diffusion coefficients in the LFA coupling.

Parameters
[out]a_itoDiffusionCoefficientsMesh-based diffusion coefficients for Ito solvers. Must be defined on the fluid realm.
[out]a_cdrDiffusionCoefficientsMesh-based diffusion coefficients for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_levelGrid level
[in]a_timeTime
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_cellBoxComputation box
[in]a_timeTime

◆ computeDiffusionCoefficients() [4/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDiffusionCoefficients ( Vector< LevelData< EBCellFAB > * > &  a_itoDiffusionCoefficients,
Vector< LevelData< EBCellFAB > * > &  a_cdrDiffusionCoefficients,
const LevelData< EBCellFAB > &  a_electricField,
const int  a_level,
const Real  a_time 
)
protectedvirtualnoexcept

Level-routine when computing mesh-based mobilities for LFA coupling.

Parameters
[out]a_itoDiffusionCoefficientsMesh-based diffusion coefficients for Ito solvers. Must be defined on the fluid realm.
[out]a_cdrDiffusionCoefficientsMesh-based diffusion coefficients for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_levelGrid level
[in]a_timeTime

◆ computeDriftVelocities()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeDriftVelocities
protectedvirtualnoexcept

Compute ItoSolver velocities.

This will compute the mobilities and then interpolate mu*E to particle positions.

◆ computeEdotJSource()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeEdotJSource ( const Real  a_dt)
protectedvirtualnoexcept

Compute the energy source term for the various plasma species.

Parameters
[in]a_dtTime step during which the particles move.
Note
This fills m_EdotJ

◆ computeElectricField()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeElectricField ( EBAMRCellData a_electricField,
const phase::which_phase  a_phase 
) const
virtualnoexcept

Recompute the electric field onto the specified data holder.

Parameters
[out]a_electricFieldElectric field on cell centroid (defined on the fluid realm).
[in]a_phasePhase where we compute the electric field.

◆ computeMaxElectricField()

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::computeMaxElectricField ( const phase::which_phase  a_phase) const
protectedvirtualnoexcept

Compute the maximum electric field (norm)

Parameters
[in]a_phasePhase where we compute the field.

◆ computeMobilities() [1/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeMobilities
protectedvirtualnoexcept

Compute mesh-based mobilities for LFA coupling.

This updates the mobilities in the Ito particle solvers AND m_cdrMobilities (not owned by solvers)

Note
Calls the other version with mesh mobilities taken from ItoSolver solvers.

◆ computeMobilities() [2/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeMobilities ( Vector< EBAMRCellData * > &  a_itoMobilities,
Vector< EBAMRCellData > &  a_cdrMobilities,
const EBAMRCellData a_electricField,
const Real  a_time 
)
protectedvirtualnoexcept

Compute mesh-based mobilities for LFA coupling.

Parameters
[out]a_itoMobilitiesMesh-based mobilities for Ito solvers. Must be defined on the particle realm.
[out]a_cdrMobilitiesMesh-based mobilities for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_timeTime

◆ computeMobilities() [3/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeMobilities ( Vector< EBCellFAB * > &  a_itoMobilities,
Vector< EBCellFAB * > &  a_cdrMobilities,
const EBCellFAB &  a_electricField,
const int  a_level,
const DataIndex  a_dit,
const Box  a_cellBox,
const Real  a_time 
)
protectedvirtualnoexcept

Patch-routine when computing mesh-based mobilities for LFA coupling.

Parameters
[out]a_itoMobilitiesMesh-based mobilities for Ito solvers. Must be defined on the particle realm.
[out]a_cdrMobilitiesMesh-based mobilities for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_cellBoxComputation box
[in]a_timeTime

◆ computeMobilities() [4/4]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeMobilities ( Vector< LevelData< EBCellFAB > * > &  a_itoMobilities,
Vector< LevelData< EBCellFAB > * > &  a_cdrMobilities,
const LevelData< EBCellFAB > &  a_E,
const int  a_level,
const Real  a_time 
)
protectedvirtualnoexcept

Level-routine when computing mesh-based mobilities for LFA coupling.

Parameters
[out]a_itoMobilitiesMesh-based mobilities for Ito solvers. Must be defined on the particle realm.
[out]a_cdrMobilitiesMesh-based mobilities for CDR solvers. Must be defined on the fluid realm.
[in]a_electricFieldElectric field. Must be defined on the fluid realm.
[in]a_levelGrid level
[in]a_timeTime

◆ computePhysicsDt() [1/4]

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::computePhysicsDt
protectedvirtualnoexcept

Compute a maximum time step from the physics interface.

Note
Calls the other version with m_electricFieldParticle and the ItoSolver densities. The kernels are only called on the valid region.

◆ computePhysicsDt() [2/4]

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::computePhysicsDt ( const EBAMRCellData a_electricField)
protectedvirtualnoexcept

Compute a maximum time step from the physics interface.

Parameters
[in]a_electricFieldElectric field.
[in]a_densitiesItoSolver mesh densities.
Note
Input data must be defined on the fluid realms. Kernels are only called on the valid region.

◆ computePhysicsDt() [3/4]

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::computePhysicsDt ( const EBCellFAB &  a_electricField,
const EBCellFAB &  a_particlesPercCell,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box 
)
protectedvirtualnoexcept

Compute a maximum time step from the physics interface.

Parameters
[in]a_electricFieldElectric field.
[in]a_particlesPerCellNumber of particles per grid cell
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
Note
Input data must be defined on the fluid realms. Kernels are only called on the valid region.

◆ computePhysicsDt() [4/4]

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::computePhysicsDt ( const LevelData< EBCellFAB > &  a_electricField,
const LevelData< EBCellFAB > &  a_particlesPerCell,
const int  a_level 
)
protectedvirtualnoexcept

Compute a maximum time step from the physics interface.

Parameters
[in]a_electricFieldElectric field.
[in]a_particlesPerCellNumber of particles per grid cell
[in]a_levelGrid level
Note
Input data must be defined on the fluid realms. Kernels are only called on the valid region.

◆ computePhysicsPlotVariables()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computePhysicsPlotVariables ( EBAMRCellData a_physicsPlotVars)
protectedvirtualnoexcept

Compute physics plot variables.

Parameters
[out]a_physicsPlotVarsPlot variables from physics implementation

◆ computeReactiveCdrParticlesPerCell() [1/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveCdrParticlesPerCell ( EBAMRCellData a_ppc)
protectedvirtualnoexcept

Compute the number of reactive particles per cell for the CDR solvers.

This truncates the number of particles in the cell.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all CDR species
Note
a_ppc Must be defined over the fluid realm and have the same number of components as the number of CDR species involved in the simulation.

◆ computeReactiveCdrParticlesPerCell() [2/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveCdrParticlesPerCell ( EBCellFAB &  a_ppc,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const EBISBox &  a_ebisbox 
)
protectedvirtualnoexcept

Compute the number of reactive particles per cell for the CDR solvers.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all CDR species
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
[in]a_ebisboxEB grid box
Note
a_ppc Must be defined over the fluid realm and have the same number of components as the number of CDR species involved in the simulation.

◆ computeReactiveCdrParticlesPerCell() [3/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveCdrParticlesPerCell ( LevelData< EBCellFAB > &  a_ppc,
const int  a_level 
)
protectedvirtualnoexcept

Compute the number of reactive particles per cell for the CDR solvers.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all CDR species
[in]a_levelGrid level
Note
a_ppc Must be defined over the fluid realm and have the same number of components as the number of CDR species involved in the simulation.

◆ computeReactiveItoParticlesPerCell() [1/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveItoParticlesPerCell ( EBAMRCellData a_ppc)
protectedvirtualnoexcept

Compute the number of reactive particles per cell.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all species
Note
a_ppc Must be defined over the particle realm and have the same number of components as the number of plasma species involved in the simulation.

◆ computeReactiveItoParticlesPerCell() [2/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveItoParticlesPerCell ( EBCellFAB &  a_ppc,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const EBISBox &  a_ebisbox 
)
protectedvirtualnoexcept

Compute the number of reactive particles per cell.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all species
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
[in]a_ebisboxEB grid box
Note
a_ppc Must be defined over the particle realm and have the same number of components as the number of plasma species involved in the simulation.

◆ computeReactiveItoParticlesPerCell() [3/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveItoParticlesPerCell ( LevelData< EBCellFAB > &  a_ppc,
const int  a_level 
)
protectedvirtualnoexcept

Compute the number of reactive particles per cell.

Parameters
[out]a_ppcNumber of physical particles per grid cell for all species
[in]a_levelGrid level
Note
a_ppc Must be defined over the particle realm and have the same number of components as the number of plasma species involved in the simulation.

◆ computeReactiveMeanEnergiesPerCell() [1/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveMeanEnergiesPerCell ( EBAMRCellData a_meanEnergies)
protectedvirtualnoexcept

Compute the mean particle energy in all grid cells.

Parameters
[out]a_meanEnergiesMean particle energies = sum(w * E)/sum(w) for all species.
Note
a_meanEnergies must be defined over the particle realm and have the same number of components as the number of palsma species involved in the simulation.

◆ computeReactiveMeanEnergiesPerCell() [2/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveMeanEnergiesPerCell ( EBCellFAB &  a_meanEnergies,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const EBISBox &  a_ebisbox 
)
protectedvirtualnoexcept

Compute the mean particle energy in all grid cells. Patch version.

Parameters
[out]a_meanEnergiesNumber of physical particles per grid cell for all species
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
[in]a_ebisboxEB grid box
Note
a_meanEnergies must be defined over the particle realm and have the same number of components as the number of palsma species involved in the simulation.

◆ computeReactiveMeanEnergiesPerCell() [3/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeReactiveMeanEnergiesPerCell ( LevelData< EBCellFAB > &  a_meanEnergies,
const int  a_level 
)
protectedvirtualnoexcept

Compute the mean particle energy in all grid cells. Level version.

Parameters
[out]a_meanEnergiesMean particle energies = sum(w * E)/sum(w) for all species.
[in]a_levelGrid level
Note
a_meanEnergies must be defined over the particle realm and have the same number of components as the number of palsma species involved in the simulation.

◆ computeSpaceChargeDensity() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeSpaceChargeDensity
protectedvirtualnoexcept

Compute the space charge. Calls the other version.

Note
This runs through the ItoSolver and CdrSolver densities – user should remember to update these before calling this routine.

◆ computeSpaceChargeDensity() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::computeSpaceChargeDensity ( MFAMRCellData a_rho,
const Vector< EBAMRCellData * > &  a_itoDensities,
const Vector< EBAMRCellData * > &  a_cdrDensities 
)
protectedvirtualnoexcept

Compute the space charge density.

Parameters
[out]a_rhoSpace charge density
[in]a_itoDensitiesList of Ito solver species densities
[in]a_cdrDensitiesList of Cdr solver species densities

◆ depositParticles() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::depositParticles ( const SpeciesSubset  a_speciesSubset)
protectedvirtualnoexcept

Deposit a subset of the ItoSolver particles on the mesh.

Note
Calls the other version with ItoSolver::WhichContainer::Bulk

◆ depositParticles() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::depositParticles ( const SpeciesSubset  a_speciesSubset,
const ItoSolver::WhichContainer  a_container 
)
protectedvirtualnoexcept

Deposit a subset of the ItoSolver particles on the mesh.

Parameters
[in]a_speciesSubsetSubset of species to deposit
[in]a_containerWhich container in ItoSolver to deposit.

◆ fillSecondaryEmissionEB() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::fillSecondaryEmissionEB ( const Real  a_dt)
protectedvirtualnoexcept

Resolve particle injection at EBs.

Parameters
[in]a_dtTime step.
Note
Calls the other version.

◆ fillSecondaryEmissionEB() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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 
)
protectedvirtualnoexcept

Compute secondary emission at the EB.

This routine fills the input data holders using physics framework. It does NOT fill solvers.

Parameters
[out]a_secondaryParticlesSecondary emitted (gained) particles at the EB
[out]a_cdrFluxesCDR fluxes for BCs.
[out]a_secondaryPhotonsSecondary emitted photons at the EB
[in]a_primaryParticlesPrimary (lost) particles at the EB
[in]a_cdrFluxesExtrapExtrapolated CDR fluxes at the EB
[in]a_primaryPhotonsPrimary (lost) photons at the EB
[in]a_electricFieldElectric field at the EB.
[in]a_dtTime step.

◆ getCheckpointLoads()

template<typename I , typename C , typename R , typename F >
Vector< long int > ItoKMCStepper::getCheckpointLoads ( const std::string  a_realm,
const int  a_level 
) const
overridevirtual

Get computational loads to be checkpointed.

This is used by Driver both for setting up load-balanced restarts AND for plotting the computational loads to a file. This routine is disjoint from loadBalanceBoxes because this routine is not part of a regrid. This means that we are not operating with temporarily load balanced grids, and all operators etc. are already in place.

Parameters
[in]a_realmRealm
[in]a_levelGrid level
Returns
Returns computational loads for each box on grid level a_level.

Reimplemented from TimeStepper.

◆ getLoadBalanceSolvers()

template<typename I , typename C , typename R , typename F >
Vector< RefCountedPtr< ItoSolver > > ItoKMCStepper::getLoadBalanceSolvers
protectedvirtualnoexcept

Get the solvers used for load balancing.

This depends on m_loadBalanceIndex – if it's < 0 we use ALL plasma species for load balancing.

◆ getMaxMinCDRDensity()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::getMaxMinCDRDensity ( Real &  a_maxDensity,
Real &  a_minDensity,
std::string &  a_maxSolver,
std::string &  a_minSolver 
) const
protectedvirtualnoexcept

Get maximum density of the CDr species.

Parameters
[in,out]a_maxDensityMaximum mesh density
[in,out]a_minDensityMinium mesh density
[in,out]a_maxSolverSolver with highest density
[in,out]a_minSolverSolver with lowest density

◆ getMaxMinItoDensity()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::getMaxMinItoDensity ( Real &  a_maxDensity,
Real &  a_minDensity,
std::string &  a_maxSolver,
std::string &  a_minSolver 
) const
protectedvirtualnoexcept

Get maximum density of the Ito species.

Parameters
[in,out]a_maxDensityMaximum mesh density
[in,out]a_minDensityMinium mesh density
[in,out]a_maxSolverSolver with highest density
[in,out]a_minSolverSolver with lowest density

◆ getParticleStatistics()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::getParticleStatistics ( Real &  a_avgParticles,
Real &  a_sigma,
Real &  a_minParticles,
Real &  a_maxParticles,
int &  a_minRank,
int &  a_maxRank 
)
protectedvirtual

Compute some particle statistics.

Parameters
[out]a_avgParticlesAverage numer of particles
[out]a_sigmaParticle standard deviation (across MPI ranks)
[out]a_minParticlesMinimum number of particles
[out]a_maxParticlesMaximum number of particles
[out]a_minRankMPI rank with lowest number of particles
[out]a_maxRankMPI rank with highest number of particles

◆ getPhysicalParticlesPerCell()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::getPhysicalParticlesPerCell ( EBAMRCellData a_ppc) const
protectedvirtualnoexcept

Get the physical number of particles per cell.

Parameters
[out]a_ppcNumber of physical particles per cell. Must be defined over the fluid realm.

◆ getTime()

template<typename I , typename C , typename R , typename F >
Real ItoKMCStepper::getTime
virtualnoexcept

Get current simulation time.

Returns
m_time

◆ intersectParticles() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::intersectParticles ( const SpeciesSubset  a_speciesSubset,
const bool  a_delete,
const std::function< void(ItoParticle &)>  a_nonDeletionModifier = [](ItoParticle&) -> void { return; } 
)
protectedvirtualnoexcept

Intersect a subset of the particles with the domain and embedded boundary.

This calls the other version, intersecting the Ito bulk particles with the EB and placing the collided particles in the appropriate particle containers (ItoSolver::WhichContainer::EB, for example).

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_intersectionAlgRepresentation of the EB – basically an algorithmic selection.
[in]a_deleteDelete original particles. If this is left to false, the particles are copied into the other containers.
[in]a_nonDeletionModifierOptional input argument for letting the user manipulate particles that were intersected but not deleted

◆ intersectParticles() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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; } 
)
protectedvirtualnoexcept

Intersect a subset of the particles with the domain and embedded boundary.

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_containerBulkItoSolver container for "bulk" particles, i.e. particles that will be intersected.
[in]a_containerEBItoSolver container for EB particles.
[in]a_containerDomainItoSolver container for domain particles.
[in]a_intersectionAlgEB intersection algorithm
[in]a_deleteDelete original particles. If this is left to false, the particles are copied into the other containers.
[in]a_nonDeletionModifierOptional input argument for letting the user manipulate particles that were intersected but not deleted

◆ loadBalanceBoxes()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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 
)
overridevirtual

Load balance grid boxes for a specified realm.

Parameters
[out]a_procsMPI ranks owning the various grid boxes.
[out]a_boxesGrid boxes on every level (obtain them with a_grids[lvl].boxArray())
[in]a_realmRealm identifier
[in]a_gridsOriginal grids
[in]a_lminCoarsest grid level that changed
[in]a_finestLevelNew finest grid level

This is only called by Driver if TimeStepper::loadBalanceThisRealm(a_realm) returned true. The default implementation uses volume-based loads for the grid patches. If the user wants to load balance boxes on a realm, this routine must be overwritten and he should compute loads for the various patches in a_grids and call LoadBalancing::makeBalance on each level. It is up to the user/programmer to decide if load balancing should be done independently on each level, or if loads per MPI rank are accumulated across levels.

Reimplemented from TimeStepper.

◆ loadBalanceFluidRealm()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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 
)
protectedvirtualnoexcept

Routine called by loadBalanceBoxes and used for particle-based load balancing.

Parameters
[out]a_procsMPI ranks owning the various grid boxes.
[out]a_boxesGrid boxes on every level (obtain them with a_grids[lvl].boxArray())
[in]a_realmRealm identifier
[in]a_gridsOriginal grids
[in]a_lminCoarsest grid level to load balance.
[in]a_finestLevelFinest grid level

◆ loadBalanceParticleRealm()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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 
)
protectedvirtualnoexcept

Routine called by loadBalanceBoxes and used for particle-based load balancing.

Parameters
[out]a_procsMPI ranks owning the various grid boxes.
[out]a_boxesGrid boxes on every level (obtain them with a_grids[lvl].boxArray())
[in]a_realmRealm identifier
[in]a_gridsOriginal grids
[in]a_lminCoarsest grid level to load balance.
[in]a_finestLevelFinest grid level

◆ loadBalanceThisRealm()

template<typename I , typename C , typename R , typename F >
bool ItoKMCStepper::loadBalanceThisRealm ( const std::string  a_realm) const
overridevirtual

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.

Parameters
[in]a_realmRealm name

Reimplemented from TimeStepper.

◆ parseDualGrid()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::parseDualGrid
protectedvirtualnoexcept

Parse dual or single realm calculations.

Sets m_particleRealm = "ParticleRealm" if 'dual_grid' is true.

◆ parseSuperParticles()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::parseSuperParticles
protectedvirtualnoexcept

Parse the desired number of particles per cell.

Sets m_particlesPerCell from input script.

◆ parseVerbosity()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::parseVerbosity
protectedvirtualnoexcept

Parse chattiness.

Sets m_verbosity from input script.

◆ postCheckpointPoisson()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::postCheckpointPoisson
protectedvirtualnoexcept

Do some post-checkpoint operations for the electrostatic part.

This computes the electric field from the checkpointed potential and populates m_electricFieldFluid and m_electricFieldParticle.

◆ postCheckpointSetup()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::postCheckpointSetup
overridevirtualnoexcept

Perform post-checkpoint operations.

This allocates the internal storage, recomputes the electric field and recomputes the velocity and diffusion coefficients.

Implements TimeStepper.

◆ preRegrid()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::preRegrid ( const int  a_lmin,
const int  a_oldFinestLevel 
)
overridevirtualnoexcept

Perform pre-regrid operations - storing relevant data from the old grids.

Parameters
[in]a_lminThe coarsest level that changes
[in]a_oldFinestLevelThe finest level before the regrid.

Implements TimeStepper.

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

◆ reconcileCdrDensities() [1/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileCdrDensities ( const EBAMRCellData a_newParticlesPerCell,
const EBAMRCellData a_oldParticlesPerCell,
const Real  a_dt 
)
protectedvirtualnoexcept

Reconcile the CDR densities after the reaction network.

This adds the a_newPPC - a_oldPPC to the densities and sets the source term to (a_newPPC - a_oldPPC)/(vol * dt)

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_dtTime step

◆ reconcileCdrDensities() [2/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileCdrDensities ( const EBCellFAB &  a_newParticlesPerCell,
const EBCellFAB &  a_oldParticlesPerCell,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const Real  a_dx,
const Real  a_dt 
)
protectedvirtualnoexcept

Reconcile the CDR densities after the reaction network.

This adds the a_newPPC - a_oldPPC to the densities and sets the source term to (a_newPPC - a_oldPPC)/(vol * dt)

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
[in]a_dxGrid resolution.
[in]a_dtTime step

◆ reconcileCdrDensities() [3/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileCdrDensities ( const LevelData< EBCellFAB > &  a_newParticlesPerCell,
const LevelData< EBCellFAB > &  a_oldParticlesPerCell,
const int  a_level,
const Real  a_dt 
)
protectedvirtualnoexcept

Reconcile the CDR densities after the reaction network.

This adds the a_newPPC - a_oldPPC to the densities and sets the source term to (a_newPPC - a_oldPPC)/(vol * dt)

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_levelGrid level
[in]a_dtTime step

◆ reconcileParticles() [1/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileParticles ( const EBAMRCellData a_newParticlesPerCell,
const EBAMRCellData a_oldParticlesPerCell,
const EBAMRCellData a_newPhotonsPerCell 
) const
inlineprotectednoexcept

Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_newPhotonsPerCellNewly generated photons per cell after the chemistry avance.
Note
All data should be defined on the particle realm since this is where the particle reconciliation takes place.

◆ reconcileParticles() [2/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileParticles ( const EBCellFAB &  a_newParticlesPerCell,
const EBCellFAB &  a_oldParticlesPerCell,
const EBCellFAB &  a_newPhotonsPerCell,
const int  a_level,
const DataIndex  a_dit,
const Box  a_box,
const Real  a_dx 
) const
inlineprotectednoexcept

Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_newPhotonsPerCellNewly generated photons per cell after the chemistry avance.
[in]a_levelGrid level
[in]a_ditGrid index
[in]a_boxGrid box
[in]a_dxGrid resolution.
Note
All data should be defined on the particle realm since this is where the particle reconciliation takes place.

◆ reconcileParticles() [3/3]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcileParticles ( const LevelData< EBCellFAB > &  a_newParticlesPerCell,
const LevelData< EBCellFAB > &  a_oldParticlesPerCell,
const LevelData< EBCellFAB > &  a_newPhotonsPerCell,
const int  a_level 
) const
inlineprotectednoexcept

Reconcile particles. At the bottom, this will call the physics interface for particle reconciliation.

Parameters
[in]a_newParticlesPerCellParticles per cell after the chemistry advance.
[in]a_oldParticlesPerCellParticles per cell before the chemistry advance.
[in]a_newPhotonsPerCellNewly generated photons per cell after the chemistry avance.
[in]a_levelGrid level
Note
All data should be defined on the particle realm since this is where the particle reconciliation takes place.

◆ reconcilePhotoionization()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::reconcilePhotoionization
protectedvirtualnoexcept

Reconcile the results from photoionization reactions.

Note
This adds particles directly into the ItoSolver particle data holders and into m_cdrPhotoiProducts.
This is not used (yet) – it does a per-patch call to m_physics, which means that its done outside of the cell-sorted requirement of advanceReactionNetwork.

◆ regrid()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::regrid ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
overridevirtualnoexcept

Regrid methods – puts all data on the new mesh.

Parameters
[in]a_lminThe coarsest level that changed.
[in]a_oldFinestLevelThe finest level before the regrid.
[in]a_newFinestLevelThe finest level after the regrid.

Implements TimeStepper.

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

◆ remapParticles() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::remapParticles ( const SpeciesSubset  a_speciesSubset)
protectedvirtualnoexcept

Remap a subset of ItoSolver particles.

Parameters
[in]a_speciesSubsetSubset of species to remap
Note
Calls the other version with ItoSolver::WhichContainer::Bulk

◆ remapParticles() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::remapParticles ( const SpeciesSubset  a_speciesSubset,
const ItoSolver::WhichContainer  a_container 
)
protectedvirtualnoexcept

Remap a subset of ItoSolver particles.

Parameters
[in]a_speciesSubsetSubset of species to remap
[in]a_containerWhich container in ItoSolver to remap.

◆ removeCoveredParticles() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::removeCoveredParticles ( const SpeciesSubset  a_which,
const EBRepresentation  a_representation,
const Real  a_tolerance 
)
protectedvirtualnoexcept

Remove covered particles (i.e., particles inside the EB)

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_representationRepresentation of the EB.
[in]a_toleranceTolerance for removal. Removes up to distance a_tolerance from the EB.
Note
a_representation is basically an algorithmic selection that propagates into ItoSolver

◆ removeCoveredParticles() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::removeCoveredParticles ( const SpeciesSubset  a_which,
const ItoSolver::WhichContainer  a_container,
const EBRepresentation  a_representation,
const Real  a_tolerance 
)
protectedvirtualnoexcept

Remove covered particles (i.e., particles inside the EB)

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_containerWhich of the containers in ItoSolver to remove from.
[in]a_representationRepresentation of the EB.
[in]a_toleranceTolerance for removal. Removes up to distance a_tolerance from the EB.
Note
a_representation is basically an algorithmic selection that propagates into ItoSolver

◆ resolveSecondaryEmissionEB() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::resolveSecondaryEmissionEB ( const Real  a_dt)
protectedvirtualnoexcept

Resolve secondary emission at the EB.

Parameters
[in]a_dtTime step.
Note
Calls the other version.

◆ resolveSecondaryEmissionEB() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::resolveSecondaryEmissionEB ( Vector< ParticleContainer< ItoParticle > * > &  a_secondaryParticles,
Vector< ParticleContainer< ItoParticle > * > &  a_primaryParticles,
Vector< EBAMRIVData * > &  a_cdrFluxes,
EBAMRIVData a_surfaceChargeDensity,
const Real  a_dt 
)
protectedvirtualnoexcept

Resolve secondary emission at the EB.

This does three things: 1) It deposits the primary and second particles on the mesh and update the surface charge density. 2) It removes the primary particles and adds the secondary particles to the Ito solvers. 3) It adds the CDR fluxes to the CDR solvers, and updates the surface charge density.

Parameters
[out]a_secondaryParticlesSecondary emitted (gained) particles at the EB.
[out]a_cdrFluxesCDR fluxes for BCs.
[in]a_primaryParticlesPrimary (lost) particles at the EB.
[in]a_surfaceChargeDensitySurface charge density.
[in]a_dtTime step.

◆ setCdrVelocityFunctions()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::setCdrVelocityFunctions
protectedvirtualnoexcept

Set the Cdr velocities to be sgn(charge) * E.

To set the final drift velocity, mobilities should be computed and multiplied in with the drift velocities.

◆ setItoVelocityFunctions()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::setItoVelocityFunctions
protectedvirtualnoexcept

Set the Ito velocity functions. This is sgn(charge) * E.

Note
This should be set before ItoSolver computes velocities.

◆ setVoltage()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::setVoltage ( const std::function< Real(const Real a_time)> &  a_voltage)
virtualnoexcept

Set voltage used for the simulation.

Parameters
[in]a_voltageVoltage
Note
This should be done BEFORE calling setupSolvers.

◆ solvePoisson()

template<typename I , typename C , typename R , typename F >
bool ItoKMCStepper::solvePoisson
protectedvirtualnoexcept

Solve the electrostatic problem.

This calls the other version with all lhs/rhs taken from the field solver. Space charge density is computed in this routine.

Returns
Returns true if the solver converged.

◆ sortPhotonsByCell()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::sortPhotonsByCell ( const McPhoto::WhichContainer  a_which)
protectedvirtualnoexcept

Sort photons by cells.

Parameters
[in]a_whichWhich container to sort by cell

◆ sortPhotonsByPatch()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::sortPhotonsByPatch ( const McPhoto::WhichContainer  a_which)
protectedvirtualnoexcept

Sort photons by patch.

Parameters
[in]a_whichWhich container to sort by patch

◆ synchronizeSolverTimes()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::synchronizeSolverTimes ( const int  a_step,
const Real  a_time,
const Real  a_dt 
)
overridevirtualnoexcept

Synchronize solver times for all the solvers.

Parameters
[in]a_stepTime step
[in]a_timeSimulation time
[in]a_dtLast time step used.

Implements TimeStepper.

◆ transferCoveredParticles() [1/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::transferCoveredParticles ( const SpeciesSubset  a_speciesSubset,
const EBRepresentation  a_representation,
const Real  a_tolerance 
)
protectedvirtualnoexcept

Transfer covered particles (i.e., particles inside the EB) from the ItoSolver bulk container to EB container.

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_representationRepresentation of the EB.
[in]a_toleranceTolerance for transfer. Transfers up to distance a_tolerance from the EB.
Note
a_representation is basically an algorithmic selection that propagates into ItoSolver

◆ transferCoveredParticles() [2/2]

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::transferCoveredParticles ( const SpeciesSubset  a_speciesSubset,
const ItoSolver::WhichContainer  a_containerFrom,
const ItoSolver::WhichContainer  a_containerTo,
const EBRepresentation  a_representation,
const Real  a_tolerance 
)
protectedvirtualnoexcept

Transfer covered particles (i.e., particles inside the EB) from the ItoSolver bulk container to EB container.

Parameters
[in]a_speciesSubsetSubset of particles to intersect. Can be charged, mobile, diffusive, etc.
[in]a_containerFromParticle container (in ItoSolver) to transfer from
[in]a_containerToParticle container (in ItoSolver) to transfer to
[in]a_representationRepresentation of the EB.
[in]a_toleranceTolerance for transfer. Transfers up to distance a_tolerance from the EB.
Note
a_representation is basically an algorithmic selection that propagates into ItoSolver

◆ writeData()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::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
protectedvirtualnoexcept

Write data to output. Convenience function.

Parameters
[in,out]a_outputOutput data holder.
[in,out]a_icompStarting component where this solver begins writing the output.
[in]a_dataData to write.
[in]a_outputRealmRealm where a_output belogns
[in]a_levelGrid level
[in]a_interpToCentroidsIf true, a_data will be interpolated to cell centroids before writing to a_output.
[in]a_interpGhostIf true, interpolate ghost cells

◆ writeNumberOfParticlesPerPatch()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::writeNumberOfParticlesPerPatch ( LevelData< EBCellFAB > &  a_output,
int &  a_icomp,
const std::string  a_outputRealm,
const int  a_level 
) const
protectedvirtualnoexcept

Write number of particles per patch to output holder.

Parameters
[in,out]a_outputOutput data holder.
[in,out]a_icompStarting component in a_output to begin at.
[in]a_outputRealmRealm where a_output belogns
[in]a_levelGrid level

◆ writePlotData()

template<typename I , typename C , typename R , typename F >
void ItoKMCStepper::writePlotData ( LevelData< EBCellFAB > &  a_output,
int &  a_icomp,
const std::string  a_outputRealm,
const int  a_level 
) const
overridevirtualnoexcept

Write plot data to output holder.

Parameters
[in,out]a_outputOutput data holder.
[in,out]a_icompStarting component in a_output to begin at.
[in]a_outputRealmRealm where a_output belongs
[in]a_levelGrid level

Implements TimeStepper.

Member Data Documentation

◆ m_cdrFluxes

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<EBAMRIVData> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_cdrFluxes
protected

CDR fluxes for CDR BCs.

There's a version of this inside the solvers, but we need this one because the EB coupling takes place on the particle realm.

◆ m_cdrMobilities

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<EBAMRCellData> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_cdrMobilities
protected

For holding the mobilities for the CDR species.

Note
Defined on the fluid realm.

◆ m_cdrPhotoiProducts

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<ParticleContainer<PointParticle> > Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_cdrPhotoiProducts
mutableprotected

Photoionization products to be put in the CDR equations.

Note
This is agglomerated with Ito particle photoionization functionality, and is therefore defined on the particle realm.

◆ m_conductivityCell

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_conductivityCell
protected

Cell-centered conductivity.

Note
Defined on the fluid realm with 1 component

◆ m_conductivityEB

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRIVData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_conductivityEB
protected

EB-centered conductivity.

Note
Defined on the fluid realm with 1 component

◆ m_conductivityFace

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRFluxData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_conductivityFace
protected

Face-centered conductivity.

Note
Defined on the fluid realm with 1 component

◆ m_currentDensity

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_currentDensity
protected

Storage for current density.

Note
Defined over the fluid realm with SpaceDim components.

◆ m_energySources

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<EBAMRCellData> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_energySources
protected

Storage for holding the energy sources for each species.

Note
Defined on the particle realm but about to get deprecated when we switch to the new reaction algorithm.

◆ m_fluidCdrPPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidCdrPPC
protected

For holding the number of physical particles per cell for all CDR species.

Note
Defined on the fluid realm with components = number of CDr species

◆ m_fluidGradPhiCDR

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<EBAMRCellData> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidGradPhiCDR
protected

For holding the gradient of all CDR species densities.

Note
Defined on the fluid realm

◆ m_fluidGradPhiIto

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<EBAMRCellData> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidGradPhiIto
protected

For holding the gradient of all Ito species densities.

Note
Defined on the fluid realm

◆ m_fluidOldCdrPPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidOldCdrPPC
protected

For holding the previous number of physical particles per cell for all CDR species.

Note
Defined on the fluid realm with components = number of CDR species

◆ m_fluidPPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidPPC
protected

For holding the number of particles per cell for all species.

Note
Defined on the fluid realm with components = number of plasma species

◆ m_fluidRealm

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
std::string Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidRealm
protected

Realm used for the fluid part (i.e., electrostatic) part of the simulation.

Note
This is hardcoded to Realm::Primal

◆ m_fluidYPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_fluidYPC
protected

For holding the number of generated photons per cell.

Note
Defined on the fluid realm with components = number of photon species

◆ m_loadPerCell

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Real Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_loadPerCell
protected

The "background" load per cell when using particle load balancing.

Note
This is used when computing the loads per patch on the particle realm such that the total load is m_loadPerCell * numGridPoints + numParticles.

◆ m_mergeInterval

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
int Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_mergeInterval
protected

How often to merge superparticles.

If <= 1 we merge every time step.

◆ m_particleEPS

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_particleEPS
protected

For holding the mean particle energy.

Note
Defined on the particle realm with components = number of plasma species

◆ m_particleItoPPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_particleItoPPC
protected

For holding the number of physical particles per cell for all Ito species.

Note
Defined on the particle realm with components = number of Ito species

◆ m_particleOldItoPPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_particleOldItoPPC
protected

For holding the previous number of particles per cell for all species.

Note
Defined on the particle realm with components = number of plasma species

◆ m_particleYPC

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
EBAMRCellData Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_particleYPC
protected

For holding the number of generated photons per cell.

Note
Defined on the particle realm with components = number of photon species

◆ m_physics

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
RefCountedPtr<ItoKMCPhysics> Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_physics
protected

Implementation of ItoKMCPhysics.

All solver coupling occurs through the implementation of this class

◆ m_plasmaPhase

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
phase::which_phase Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_plasmaPhase
protected

Phase where we solve for the plasma.

Note
This is hardcoded to phase::gas

◆ m_relaxTimeFactor

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Real Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_relaxTimeFactor
protected

Factor proportional to the dielectric relaxation time dtRelax = eps0/sigma.

Used for restricting dt < m_relaxTimeFactor * eps0/sigma

◆ m_secondaryParticles

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<ParticleContainer<ItoParticle> > Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_secondaryParticles
protected

List of secondary particles injected through the EB.

This is used when injecting secondary particles through the EB.

Note
Stored on the particle realm

◆ m_secondaryPhotons

template<typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverMultigrid>
Vector<ParticleContainer<Photon> > Physics::ItoKMC::ItoKMCStepper< I, C, R, F >::m_secondaryPhotons
protected

List of secondary photons injected through the EB.

This is used when injecting secondary photons through the EB.

Note
Stored on the particle realm

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