12 #ifndef CD_ItoLayout_H
13 #define CD_ItoLayout_H
17 #include <CD_NamespaceHeader.H>
41 ItoLayout(
const Vector<RefCountedPtr<ItoSpecies>>& a_species);
51 virtual phase::which_phase
63 virtual const std::string
78 define(
const Vector<RefCountedPtr<ItoSpecies>>& a_species);
113 preRegrid(
const int a_lbase,
const int a_finestLevel);
164 regrid(
const int a_lmin,
const int a_oldFinestLevel,
const int a_newFinestLevel);
177 setAmr(
const RefCountedPtr<AmrMesh>& a_amr);
191 setPhase(phase::which_phase a_phase);
208 setTime(
const int a_step,
const Real a_time,
const Real a_dt);
283 virtual Vector<RefCountedPtr<T>>&
290 virtual Vector<RefCountedPtr<ItoSpecies>>&
297 virtual Vector<EBAMRCellData*>
304 virtual Vector<EBAMRCellData*>
311 virtual Vector<EBAMRCellData*>
318 virtual Vector<EBAMRCellData*>
325 virtual Vector<ParticleContainer<ItoParticle>*>
366 template <
class T,
class S>
385 RefCountedPtr<ItoLayout<T>>
386 newLayout(
const Vector<RefCountedPtr<ItoSpecies>>& a_species)
const;
389 #include <CD_NamespaceFooter.H>
Implementation of CD_ItoLayout.H.
Declaration of solver class for Ito diffusion.
Factory class for making ItoLayout.
Definition: CD_ItoLayout.H:368
~ItoFactory()
Destructor (does nothing).
Definition: CD_ItoLayoutImplem.H:412
ItoFactory()
Constructor.
Definition: CD_ItoLayoutImplem.H:408
RefCountedPtr< ItoLayout< T > > newLayout(const Vector< RefCountedPtr< ItoSpecies >> &a_species) const
Factory method which creates a new layout from a set of species. This can do automated casting betwee...
Definition: CD_ItoLayoutImplem.H:417
"Iterator" class for going through solvers in an ItoLayout.
Definition: CD_ItoIterator.H:24
Class for holding a set of ItoSolvers.
Definition: CD_ItoLayout.H:30
virtual Real computeAdvectiveDt()
Compute the classical advection time step for all solvers. This returns dt = dx/max(v) where max(v) t...
Definition: CD_ItoLayoutImplem.H:286
virtual void allocate()
Allocate internals for all solvers.
Definition: CD_ItoLayoutImplem.H:86
virtual void parseRuntimeOptions()
Utility function – parse runtime options for all solvers.
Definition: CD_ItoLayoutImplem.H:77
virtual Vector< EBAMRCellData * > getDiffusionFunctions()
Get all diffusion coefficients.
Definition: CD_ItoLayoutImplem.H:366
virtual Real computeDt()
Compute smallest possible time step.
Definition: CD_ItoLayoutImplem.H:272
virtual void addSolver(RefCountedPtr< T > &a_solver)
Add solver to the list of solvers.
Definition: CD_ItoLayoutImplem.H:95
virtual Vector< EBAMRCellData * > getMobilityFunctions()
Get all mobility mesh functions.
Definition: CD_ItoLayoutImplem.H:378
virtual void makeSuperparticles(const ItoSolver::WhichContainer a_whichContainer, const int a_ppc)
Rearrange the input container particle into new superparticles – this is done for all solvers.
Definition: CD_ItoLayoutImplem.H:210
virtual void setRealm(const std::string a_realm)
Set the realm where the solvers are defined.
Definition: CD_ItoLayoutImplem.H:50
virtual ItoIterator< T > iterator()
Return a fresh iterator. The iterator is a simple random access object that can iterate through the s...
Definition: CD_ItoLayoutImplem.H:36
virtual void setVerbosity(const int a_verbosity)
Set verbosity for each solver.
Definition: CD_ItoLayoutImplem.H:174
phase::which_phase m_phase
Phase where solvers live.
Definition: CD_ItoLayout.H:352
virtual void initialData()
Fill all solvers with initial data.
Definition: CD_ItoLayoutImplem.H:120
virtual void organizeParticlesByCell(const ItoSolver::WhichContainer a_whichContainer)
Sort ItoSolver particles by cell – this is done for all solvers.
Definition: CD_ItoLayoutImplem.H:192
virtual void interpolateVelocities()
Interpolate velocities.
Definition: CD_ItoLayoutImplem.H:102
virtual Real computeDiffusiveDt()
Compute the classical diffusive time step dt = dx*dx/(2*D) where D is the diffusion coefficient (not ...
Definition: CD_ItoLayoutImplem.H:314
virtual void regrid(const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel)
Regrid method – calls the regrid method for each solver.
Definition: CD_ItoLayoutImplem.H:129
virtual Vector< RefCountedPtr< ItoSpecies > > & getSpecies()
Get species.
Definition: CD_ItoLayoutImplem.H:335
virtual void parseOptions()
Utility function – parse options for all solvers.
Definition: CD_ItoLayoutImplem.H:68
Vector< RefCountedPtr< ItoSpecies > > m_species
ItoSolver species.
Definition: CD_ItoLayout.H:342
virtual Real computeHopDt(const Real a_maxCellsToMove)
Compute the largest dt which restricts all particles to move less than a_maxCellsToMove.
Definition: CD_ItoLayoutImplem.H:300
virtual void organizeParticlesByPatch(const ItoSolver::WhichContainer a_whichContainer)
Sort ItoSolver particles by patch – this is done for all solvers.
Definition: CD_ItoLayoutImplem.H:201
ItoLayout()=delete
Disallowed weak construction.
Vector< RefCountedPtr< T > > m_solvers
ItoSolver solvers.
Definition: CD_ItoLayout.H:337
virtual Vector< EBAMRCellData * > getVelocityFunctions()
Get all velocity functions.
Definition: CD_ItoLayoutImplem.H:342
virtual Vector< ParticleContainer< ItoParticle > * > getParticles(const ItoSolver::WhichContainer a_whichContainer)
Get particle containers of a particular container type.
Definition: CD_ItoLayoutImplem.H:390
virtual phase::which_phase getPhase() const
Return phase where the solvers are defined.
Definition: CD_ItoLayoutImplem.H:402
std::string m_realm
Realm where all the solvers are registered.
Definition: CD_ItoLayout.H:332
virtual void setTime(const int a_step, const Real a_time, const Real a_dt)
Set time for each solver.
Definition: CD_ItoLayoutImplem.H:183
int m_verbosity
Verbosity level.
Definition: CD_ItoLayout.H:347
virtual ~ItoLayout()
Destructor (does nothing).
Definition: CD_ItoLayoutImplem.H:31
virtual void setComputationalGeometry(const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
Set the computational geometry. This sets the computational geometry for each solver.
Definition: CD_ItoLayoutImplem.H:156
virtual void remap()
Remap function – calls remap(ItoSolver::WhichContainer::bulk) for each solver.
Definition: CD_ItoLayoutImplem.H:244
virtual void depositParticles()
All solvers deposit their particles.
Definition: CD_ItoLayoutImplem.H:228
bool m_isDefined
Layout is defined or not.
Definition: CD_ItoLayout.H:357
virtual const std::string getRealm() const
Get the realm name where the solvers are defined.
Definition: CD_ItoLayoutImplem.H:43
virtual void preRegrid(const int a_lbase, const int a_finestLevel)
Utility function which caches states before regrid step.
Definition: CD_ItoLayoutImplem.H:111
virtual void define(const Vector< RefCountedPtr< ItoSpecies >> &a_species)
Define function.
Definition: CD_ItoLayoutImplem.H:61
virtual Vector< RefCountedPtr< T > > & getSolvers()
Get solvers all solvers.
Definition: CD_ItoLayoutImplem.H:328
virtual size_t getNumParticles(const ItoSolver::WhichContainer a_ptype, const bool a_localOnly)
Get total number of particles.
Definition: CD_ItoLayoutImplem.H:260
virtual void setAmr(const RefCountedPtr< AmrMesh > &a_amr)
Set AmrMesh object for each solver.
Definition: CD_ItoLayoutImplem.H:147
virtual void registerOperators()
Register operators. Calls registerOperators for each solver.
Definition: CD_ItoLayoutImplem.H:138
virtual Vector< EBAMRCellData * > getDensities()
Get all densities.
Definition: CD_ItoLayoutImplem.H:354
virtual void setPhase(phase::which_phase a_phase)
Set phase for each solver.
Definition: CD_ItoLayoutImplem.H:165
WhichContainer
Enum class for distinguishing various types of particle containers.
Definition: CD_ItoSolver.H:49