12 #ifndef CD_EBAMRParticleMesh_H
13 #define CD_EBAMRParticleMesh_H
16 #include <RefCountedPtr.H>
18 #include <EBLevelGrid.H>
27 #include <CD_NamespaceHeader.H>
65 const Vector<int>& a_refRat,
66 const Vector<Real>& a_dx,
67 const RealVect& a_probLo,
68 const IntVect& a_ghost,
69 const int a_maxParticleWidth,
70 const int a_finestLevel);
88 define(
const Vector<RefCountedPtr<EBLevelGrid>>& a_eblgs,
89 const Vector<int>& a_refRat,
90 const Vector<Real>& a_dx,
91 const RealVect& a_probLo,
92 const IntVect& a_ghost,
93 const int a_maxParticleWidth,
94 const int a_finestLevel);
115 template <
class P, const Real& (P::*particleScalarField)() const>
121 const bool a_forceIrregNGP =
false);
133 template <
class P, Real (P::*particleScalarField)() const>
139 const bool a_forceIrregNGP =
false);
159 template <
class P, const RealVect& (P::*particleVectorField)() const>
165 const bool a_forceIrregNGP =
false);
176 template <
class P, RealVect (P::*particleVectorField)() const>
182 const bool a_forceIrregNGP =
false);
200 template <
class P, Real& (P::*particleScalarField)()>
205 const bool a_forceIrregNGP =
false)
const;
224 template <
class P, RealVect& (P::*particleVectorField)()>
229 const bool a_forceIrregNGP =
false)
const;
235 Vector<RefCountedPtr<EBCoarseFineParticleMesh>>&
342 template <
class P, const Real& (P::*particleScalarField)() const>
347 const bool a_forceIrregNGP =
false);
357 template <
class P, Real (P::*particleScalarField)() const>
362 const bool a_forceIrregNGP =
false);
374 template <
class P, const Real& (P::*particleScalarField)() const>
379 const bool a_forceIrregNGP =
false);
390 template <
class P, Real (P::*particleScalarField)() const>
395 const bool a_forceIrregNGP =
false);
407 template <
class P, const Real& (P::*particleScalarField)() const>
412 const bool a_forceIrregNGP =
false);
422 template <
class P, Real (P::*particleScalarField)() const>
427 const bool a_forceIrregNGP =
false);
438 template <
class P, const RealVect& (P::*particleScalarField)() const>
443 const bool a_forceIrregNGP =
false);
454 template <
class P, RealVect (P::*particleScalarField)() const>
459 const bool a_forceIrregNGP =
false);
471 template <
class P, const RealVect& (P::*particleScalarField)() const>
476 const bool a_forceIrregNGP =
false);
488 template <
class P, RealVect (P::*particleScalarField)() const>
493 const bool a_forceIrregNGP =
false);
505 template <
class P, const RealVect& (P::*particleScalarField)() const>
510 const bool a_forceIrregNGP =
false);
522 template <
class P, RealVect (P::*particleScalarField)() const>
527 const bool a_forceIrregNGP =
false);
530 #include <CD_NamespaceFooter.H>
Declaration of deposition algorithms in an AMR context.
CoarseFineDeposition
Coarse-fine deposition types (see CD_EBAMRParticleMesh for how these are handled).
Definition: CD_CoarseFineDeposition.H:26
Declaration of deposition types.
DepositionType
Deposition types.
Definition: CD_DepositionType.H:23
Class for holding data across EBAMR hierarchies.
Implementation of CD_EBAMRParticleMesh.H.
Declaration of a class for handling particle deposition arithmetics near refinement boundaries.
Declaration of a class for handling particle-mesh interpolation and deposition.
Declaration of a class for holding particles on an AMR hierarchy.
Class for handling particle-mesh operations with AMR.
Definition: CD_EBAMRParticleMesh.H:47
int m_maxParticleWidth
Maximum particle width that will ever be used.
Definition: CD_EBAMRParticleMesh.H:267
IntVect m_ghost
Number of ghost cells.
Definition: CD_EBAMRParticleMesh.H:262
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > & getEBCoarseFineParticleMesh() const
Get buffers for handling deposition over refinement boundaries.
virtual ~EBAMRParticleMesh()
Destructor (does nothing)
Definition: CD_EBAMRParticleMesh.cpp:39
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > m_coarseFinePM
Buffers for handling arithmetic for mass moving from coarse to fine level and vice versa.
Definition: CD_EBAMRParticleMesh.H:305
Vector< Real > m_dx
Grid resolutions.
Definition: CD_EBAMRParticleMesh.H:287
void depositHaloNGP(EBAMRCellData &a_meshData, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const bool a_forceIrregNGP=false)
Just like the deposit function, but forced to use the "HaloNGP" algorithm for handling refinement bou...
Definition: CD_EBAMRParticleMeshImplem.H:508
void define(const Vector< RefCountedPtr< EBLevelGrid >> &a_eblgs, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect &a_probLo, const IntVect &a_ghost, const int a_maxParticleWidth, const int a_finestLevel)
Define function.
Definition: CD_EBAMRParticleMesh.cpp:45
void defineEBParticleMesh()
Define EBParticleMesh objects.
Definition: CD_EBAMRParticleMesh.cpp:117
int m_finestLevel
Finest AMR level.
Definition: CD_EBAMRParticleMesh.H:272
RealVect m_probLo
Lower-left corner of physical domain.
Definition: CD_EBAMRParticleMesh.H:257
void interpolate(ParticleContainer< P > &a_particles, const EBAMRCellData &a_meshVectorField, const DepositionType a_interpType, const bool a_forceIrregNGP=false) const
Interpolate a scalar field onto the particle position.
Definition: CD_EBAMRParticleMeshImplem.H:612
bool m_isDefined
Is defined or not.
Definition: CD_EBAMRParticleMesh.H:252
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > m_ebParticleMesh
Regular particle-mesh object on each grid level.
Definition: CD_EBAMRParticleMesh.H:292
Vector< RefCountedPtr< EBLevelGrid > > m_eblgs
Grids on each level.
Definition: CD_EBAMRParticleMesh.H:277
Vector< Copier > m_levelCopiers
Copier for moving data from valid+ghost to valid on each AMR level.
Definition: CD_EBAMRParticleMesh.H:311
EBAMRParticleMesh()
Default constructor. Leaves object in undefined state and thus requires the user to call define.
Definition: CD_EBAMRParticleMesh.cpp:19
void deposit(EBAMRCellData &a_meshData, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const bool a_forceIrregNGP=false)
Class for deposition of particles of a type P to the mesh. This does scalar quantities.
Definition: CD_EBAMRParticleMeshImplem.H:29
void depositInterp(EBAMRCellData &a_meshData, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const bool a_forceIrregNGP=false)
Just like the deposit function, but forced to use the "PVR" algorithm for handling refinement boundar...
Definition: CD_EBAMRParticleMeshImplem.H:176
const EBParticleMesh & getEBParticleMesh(const int a_lvl, const DataIndex &a_dit) const
Get EBParticleMesh deposition/interpolation object for specified grid patch.
Definition: CD_EBAMRParticleMesh.cpp:187
void depositHalo(EBAMRCellData &a_meshData, const ParticleContainer< P > &a_particles, const DepositionType a_depositionType, const bool a_forceIrregNGP=false)
Just like the deposit function, but forced to use the "Halo" algorithm for handling refinement bounda...
Definition: CD_EBAMRParticleMeshImplem.H:289
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > m_ebParticleMeshFiCo
Special particle-mesh objects for depositing on the coarsened fine grid.
Definition: CD_EBAMRParticleMesh.H:299
void defineCoarseFineMotion()
Define coarse-fine data motion operators.
Definition: CD_EBAMRParticleMesh.cpp:96
void defineLevelMotion()
Define level copiers.
Definition: CD_EBAMRParticleMesh.cpp:71
Vector< int > m_refRat
Refinement ratios between levels.
Definition: CD_EBAMRParticleMesh.H:282
A class for depositing and interpolating particles. Contains various useful routines for interpolatio...
Definition: CD_EBParticleMesh.H:34
Templated class for holding particles on an AMR hierarchy with particle remapping.
Definition: CD_ParticleContainer.H:50