chombo-discharge
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EBAMRParticleMesh Class Reference

Class for handling particle-mesh operations with AMR. More...

#include <CD_EBAMRParticleMesh.H>

Public Member Functions

 EBAMRParticleMesh ()
 Default constructor. Leaves object in undefined state and thus requires the user to call define.
 
 EBAMRParticleMesh (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)
 Full constructor. Calls the define function. More...
 
virtual ~EBAMRParticleMesh ()
 Destructor (does nothing)
 
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. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
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. More...
 
template<class P , Real(P::*)() const particleScalarField>
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. More...
 
template<class P , const RealVect &(P::*)() const particleVectorField>
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 vector quantities. More...
 
template<class P , RealVect(P::*)() const particleVectorField>
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 vector quantities. More...
 
template<class P , Real &(P::*)() particleScalarField>
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. More...
 
template<class P , RealVect &(P::*)() particleVectorField>
void interpolate (ParticleContainer< P > &a_particles, const EBAMRCellData &a_meshVectorField, const DepositionType a_interpType, const bool a_forceIrregNGP=false) const
 Interpolate a vector field onto the particle position. More...
 
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > & getEBCoarseFineParticleMesh () const
 Get buffers for handling deposition over refinement boundaries. More...
 
const EBParticleMeshgetEBParticleMesh (const int a_lvl, const DataIndex &a_dit) const
 Get EBParticleMesh deposition/interpolation object for specified grid patch. More...
 

Protected Member Functions

void defineLevelMotion ()
 Define level copiers. More...
 
void defineCoarseFineMotion ()
 Define coarse-fine data motion operators. More...
 
void defineEBParticleMesh ()
 Define EBParticleMesh objects.
 
template<class P , const Real &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , Real(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , Real(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , Real(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , const RealVect &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , RealVect(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , const RealVect &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , RealVect(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , const RealVect &(P::*)() const particleScalarField>
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 boundaries. More...
 
template<class P , RealVect(P::*)() const particleScalarField>
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 boundaries. More...
 

Protected Attributes

bool m_isDefined
 Is defined or not.
 
RealVect m_probLo
 Lower-left corner of physical domain.
 
IntVect m_ghost
 Number of ghost cells.
 
int m_maxParticleWidth
 Maximum particle width that will ever be used.
 
int m_finestLevel
 Finest AMR level.
 
Vector< RefCountedPtr< EBLevelGrid > > m_eblgs
 Grids on each level.
 
Vector< int > m_refRat
 Refinement ratios between levels.
 
Vector< Real > m_dx
 Grid resolutions.
 
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > m_ebParticleMesh
 Regular particle-mesh object on each grid level.
 
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > m_ebParticleMeshFiCo
 Special particle-mesh objects for depositing on the coarsened fine grid. More...
 
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > m_coarseFinePM
 Buffers for handling arithmetic for mass moving from coarse to fine level and vice versa. More...
 
Vector< Copier > m_levelCopiers
 Copier for moving data from valid+ghost to valid on each AMR level. More...
 

Detailed Description

Class for handling particle-mesh operations with AMR.

This class contains templated functions for depositing particles with AMR. When depositing, the user must specify the deposition type (e.g., CIC) as well as how to handle coarse-fine boundary conditions and cut-cell deposition. Because of the many degrees of freedom in depositing particles with AMR (and EB), the user must expect to preprocess his particle data before solving. There are thus two "main" ways of handling deposition near refinement boundaries.

When specifying CoarseFineDeposition::Interp, the deposition is done by first depositing the data as usual on both levels. On the fine level, there may be mass that hangs over the refinement boundaries; that mass is added to the coarse level. On the coarse level some of the particles will deposit mass into cells that are covered by a finer level; that mass is interpolated with piece-wise constant interpolation and added to the fine level.

When specyfing CoarseFineDeposition::Halo, only the handling of the coarse-side deposition is different. As with PVR, the mass from the fine-level particles that hangs over refinement boundaries is put on the coarse mesh. However, the coarse-level particles are deposited in two separate steps so that the coarse-level particles have the same physical widths on the coarse and fine levels. We first deposit ALL the coarse-level particles on the coarse level. Some of these particles (halo particles) will have clouds that overlap with the fine level. We take the set of these particles and deposit them directly onto the fine level (via buffers) with 2x or 4x the original particle width (depending on the refinement ratios between the levels). Essentially, this differs CoarseFineDeposition::Interp in the sense that the original particle width is maintained on the fine level.

Constructor & Destructor Documentation

◆ EBAMRParticleMesh()

EBAMRParticleMesh::EBAMRParticleMesh ( 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 
)

Full constructor. Calls the define function.

Parameters
[in]a_eblgsGrids
[in]a_refRatRefinement factory between levels
[in]a_dxGrid resolutions. @πaram[in] a_probLo Lower-left corner of physical domain.
[in]a_ghostGhost cells in data holders.
[in]a_maxParticleWidthMaximum particle width that will be encountered.
[in]a_finestLevelFinest grid level

Member Function Documentation

◆ define()

void EBAMRParticleMesh::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.

Parameters
[in]a_eblgsGrids
[in]a_refRatRefinement factory between levels
[in]a_dxGrid resolutions. @πaram[in] a_probLo Lower-left corner of physical domain.
[in]a_ghostGhost cells in data holders.
[in]a_maxParticleWidthMaximum particle width that will be encountered.
[in]a_finestLevelFinest grid level

◆ defineCoarseFineMotion()

void EBAMRParticleMesh::defineCoarseFineMotion ( )
protected

Define coarse-fine data motion operators.

This defines the necessary constructors for

◆ defineLevelMotion()

void EBAMRParticleMesh::defineLevelMotion ( )
protected

Define level copiers.

Note
This defines the Copiers we need to move data from valid+ghost to valid on each level.

◆ deposit() [1/4]

template<class P , RealVect(P::*)() const particleVectorField>
void EBAMRParticleMesh::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.

This routine will switch between various algorithms depending on the user input. If the user chooses to deposit with "halos" near the refinement boundaries then this function requires the "halo" particles to be filled before entering this routine. Thus, if depositing with halos (which requires kernels with 2x or 4x the particle width), the user must first call ParticleContainer::copyMaskParticles(AMRMask). If the user does not do this, he will lose mass near the refinement boundaries. Other than that, this function is just like regular particle-mesh deposition. The mesh field should have exactly one component and the quantity to be deposited is fetched from the specified template parameter 'a_particleScalarField'. This should be a pointer to a member function with signature const Real& P::function() const. E.g. if we are depositing mass through a function const Real& P::mass() const we will specifiy

deposit<P, &P::mass> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent. @πaram[in] a_particles Particle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.
Note
When using certain types of coarseFineDeposition methods – the user may need to fill the mask particles before calling this routine.

◆ deposit() [2/4]

template<class P , Real(P::*)() const particleScalarField>
void EBAMRParticleMesh::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.

Just like the version above, except that the function signature is Real P::particleScalarField() const (C++ is not too smart about these things)

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent. @πaram[in] a_particles Particle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.
Note
When using certain types of coarseFineDeposition methods – the user may need to fill the mask particles before calling this routine.

◆ deposit() [3/4]

template<class P , const RealVect &(P::*)() const particleVectorField>
void EBAMRParticleMesh::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 vector quantities.

This routine will switch between various algorithms depending on the user input. If the user chooses to deposit with "halos" near the refinement boundaries then this function requires the "halo" particles to be filled before entering this routine. Thus, if depositing with halos (which requires kernels with 2x or 4x the particle width), the user must first call ParticleContainer::copyMaskParticles(AMRMask). If the user does not do this, he will lose mass near the refinement boundaries. Other than that, this function is just like regular particle-mesh deposition. The mesh field should have exactly SpaceDim components and the quantity to be deposited is fetched from the specified template parameter 'a_particleVectorField'. This should be a pointer to a member function with signature const RealVect& P::function() const. E.g. if we are depositing current through a function const RealVect& P::current() const we will specifiy

deposit<P, &P::current> (...)

To deposit a different quantity, simply change the function pointer in the input parameter.

Parameters
[out]a_meshDataMesh data. Must have exactly SpaceDim components. @πaram[in] a_particles Particle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ deposit() [4/4]

template<class P , RealVect(P::*)() const particleVectorField>
void EBAMRParticleMesh::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 vector quantities.

Just like the version above, except that the function signature is RealVect P::particleVectorField() const

Parameters
[out]a_meshDataMesh data. Must have exactly SpaceDim components. @πaram[in] a_particles Particle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHalo() [1/4]

template<class P , RealVect(P::*)() const particleVectorField>
void EBAMRParticleMesh::depositHalo ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "Halo" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will run special deposition routines with 2x or 4x the particle width near the refinement boundaries.

Note
This routine is currently limited to NGP and CIC.
Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHalo() [2/4]

template<class P , Real(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHalo ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "Halo" algorithm for handling refinement boundaries.

Just like the above version, but with a different function signature.

Note
This routine is currently limited to NGP and CIC.
Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHalo() [3/4]

template<class P , const RealVect &(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHalo ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "Halo" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will run special deposition routines with 2x or 4x the particle width near the refinement boundaries.

Note
This routine is currently limited to NGP and CIC.
Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHalo() [4/4]

template<class P , RealVect(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHalo ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "Halo" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will run special deposition routines with 2x or 4x the particle width near the refinement boundaries.

Note
This routine is currently limited to NGP and CIC.
Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHaloNGP() [1/4]

template<class P , RealVect(P::*)() const particleVectorField>
void EBAMRParticleMesh::depositHaloNGP ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "HaloNGP" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will deposit as usual, but force the particles on the refinement boundary to be deposited with an NGP scheme. Essentially, this means that the fine grid particles will deposit mass into the coarse grid but the coarse grid particles will NOT deposit mass into the fine grid.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHaloNGP() [2/4]

template<class P , Real(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHaloNGP ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "HaloNGP" algorithm for handling refinement boundaries.

Just like the above version, but with a different function signature.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHaloNGP() [3/4]

template<class P , const RealVect &(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHaloNGP ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "HaloNGP" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will deposit as usual, but force the particles on the refinement boundary to be deposited with an NGP scheme. Essentially, this means that the fine grid particles will deposit mass into the coarse grid but the coarse grid particles will NOT deposit mass into the fine grid.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositHaloNGP() [4/4]

template<class P , RealVect(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositHaloNGP ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "HaloNGP" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user must have filled the "halo" particles for this routine to make any sense. This function will deposit as usual, but force the particles on the refinement boundary to be deposited with an NGP scheme. Essentially, this means that the fine grid particles will deposit mass into the coarse grid but the coarse grid particles will NOT deposit mass into the fine grid.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositInterp() [1/4]

template<class P , RealVect(P::*)() const particleVectorField>
void EBAMRParticleMesh::depositInterp ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "PVR" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user does NOT need to fill the "halo" particles. Rather, the mass that is deposited on the part of the coarse grid that lies underneath the fine grid (i.e., the invalid region) is interpolated to the fine level.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositInterp() [2/4]

template<class P , Real(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositInterp ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "PVR" algorithm for handling refinement boundaries.

Just like the above version, but with a different function signature.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositInterp() [3/4]

template<class P , const RealVect &(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositInterp ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "PVR" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user does NOT need to fill the "halo" particles. Rather, the mass that is deposited on the part of the coarse grid that lies underneath the fine grid (i.e., the invalid region) is interpolated to the fine level.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ depositInterp() [4/4]

template<class P , RealVect(P::*)() const particleScalarField>
void EBAMRParticleMesh::depositInterp ( EBAMRCellData a_meshData,
const ParticleContainer< P > &  a_particles,
const DepositionType  a_depositionType,
const bool  a_forceIrregNGP = false 
)
protected

Just like the deposit function, but forced to use the "PVR" algorithm for handling refinement boundaries.

See deposit() for details regarding the template arguments. When calling this routine the user does NOT need to fill the "halo" particles. Rather, the mass that is deposited on the part of the coarse grid that lies underneath the fine grid (i.e., the invalid region) is interpolated to the fine level.

Parameters
[out]a_meshDataMesh data. Must have exactly one compnent.
[in]a_particlesParticle container. Must be in "usable state" for deposition.
[in]a_depositionTypeSpecification of deposition kernel (e.g., CIC)
[in]a_forceIrregNGPForce NGP deposition in irregular cells or not.

◆ getEBCoarseFineParticleMesh()

Vector<RefCountedPtr<EBCoarseFineParticleMesh> >& EBAMRParticleMesh::getEBCoarseFineParticleMesh ( ) const

Get buffers for handling deposition over refinement boundaries.

Returns
The buffer for handling mass transfer between level lvl and level lvl+1 lives on lvl+1.

◆ getEBParticleMesh()

const EBParticleMesh & EBAMRParticleMesh::getEBParticleMesh ( const int  a_lvl,
const DataIndex &  a_dit 
) const

Get EBParticleMesh deposition/interpolation object for specified grid patch.

This routine is used for when users want to interpolate on a per-patch basis. This is useful when the user has written his interpolation functions on a per-patch basis. I fail to see any other reason where this routine is useful.

Parameters
[in]a_lvlGrid level
[in]a_ditGrid index

◆ interpolate() [1/2]

template<class P , RealVect &(P::*)() particleVectorField>
void EBAMRParticleMesh::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.

This is just like regular particle-mesh interpolation. The input field should have exactly one component and the the field will be interpolated onto the template parameter's input field. The template parameter 'particleScalarField' should be a pointer to a member function which will set the particle field. E.g. the function must have a signature Real& P::particleScalarField(). A valid expression is e.g.

interpolate<P, &P::mass> (...)

To interpolate onto a different field, replace ::mass by the other scalar field.

Parameters
[in,out]a_particlesParticles to be interpolated.
[in]a_meshScalarFieldScalar field on the mesh
[in]a_interpTypeInterpolation type.
[in]a_forceIrregNGPForce NGP interpolation in cut-cells.

◆ interpolate() [2/2]

template<class P , RealVect &(P::*)() particleVectorField>
void EBAMRParticleMesh::interpolate ( ParticleContainer< P > &  a_particles,
const EBAMRCellData a_meshVectorField,
const DepositionType  a_interpType,
const bool  a_forceIrregNGP = false 
) const

Interpolate a vector field onto the particle position.

This is just like regular particle-mesh interpolation. The input field should have exactly SpaceDim components and the the field will be interpolated onto the template parameter's input field. The template parameter 'particleVectorField' should be a pointer to a member function which will set the particle field. E.g. the function must have a signature RealVect& P::particleVectorField(). A valid expression is e.g.

interpolate<P, &P::velocity> (...)

To interpolate onto a different field, replace ::velocity by another vector field.

Parameters
[in,out]a_particlesParticles to be interpolated.
[in]a_meshScalarFieldScalar field on the mesh
[in]a_interpTypeInterpolation type.
[in]a_coarseFineDepositionSpecification of handling of coarse-fine boundaries.
[in]a_forceIrregNGPForce NGP interpolation in cut-cells.

Member Data Documentation

◆ m_coarseFinePM

Vector<RefCountedPtr<EBCoarseFineParticleMesh> > EBAMRParticleMesh::m_coarseFinePM
mutableprotected

Buffers for handling arithmetic for mass moving from coarse to fine level and vice versa.

Note
The buffer for handling mass transfer between level lvl and level lvl+1 lives on lvl+1.

◆ m_ebParticleMeshFiCo

Vector<RefCountedPtr<LayoutData<EBParticleMesh> > > EBAMRParticleMesh::m_ebParticleMeshFiCo
protected

Special particle-mesh objects for depositing on the coarsened fine grid.

These are deposition/interpolation objects defined on the refined coarse grid. They are used when we need to deposit coarse-grid particles on the fine grid.

◆ m_levelCopiers

Vector<Copier> EBAMRParticleMesh::m_levelCopiers
mutableprotected

Copier for moving data from valid+ghost to valid on each AMR level.

Note
After depositing on a level, this is used in order to add data from the ghost cells to the valid region.

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