|
|
|
| EBAMRParticleMesh () |
| | Default constructor. Leaves the object undefined; call define().
|
| |
|
| ~EBAMRParticleMesh ()=default |
| | Destructor.
|
| |
|
| EBAMRParticleMesh (const EBAMRParticleMesh &)=delete |
| | Copy construction is deleted (shared RefCountedPtr state).
|
| |
| EBAMRParticleMesh & | operator= (const EBAMRParticleMesh &)=delete |
| | Copy assignment is deleted.
|
| |
| void | define (const Vector< RefCountedPtr< EBLevelGrid > > &a_eblgs, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect &a_probLo, const int a_ghost, const int a_finestLevel) |
| | Define the per-level leaves, coarse-fine mesh operators, and halo/transition masks.
|
| |
|
| template<auto... Members, typename P , typename Traits > |
| void | interpolate (ParticleContainer< P, Traits > &a_particles, const EBAMRCellData &a_meshData, const DepositionType a_interpType, const bool a_forceIrregNGP) const |
| | Interpolate a mesh field onto one or more payload columns, across all levels.
|
| |
| template<typename P , typename Traits > |
| void | interpolateWeight (ParticleContainer< P, Traits > &a_particles, const EBAMRCellData &a_meshData, const DepositionType a_interpType, const bool a_forceIrregNGP) const |
| | Interpolate a mesh field onto the container-owned weight column, across all levels.
|
| |
|
| template<typename P , typename Traits > |
| void | depositWeight (EBAMRCellData &a_meshData, const ParticleContainer< P, Traits > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const IrregularDeposition a_irregularDeposition) |
| | Deposit the container-owned weight onto the AMR mesh.
|
| |
| template<typename P , typename Traits , typename CellGather > |
| void | depositGathered (EBAMRCellData &a_meshData, const ParticleContainer< P, Traits > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const IrregularDeposition a_irregularDeposition, CellGather a_cellGather) |
| | Deposit a custom per-particle scalar (computed by a_cellGather) onto the AMR mesh.
|
| |
| template<auto... Members, typename P , typename Traits > |
| void | deposit (EBAMRCellData &a_meshData, const ParticleContainer< P, Traits > &a_particles, const DepositionType a_depositionType, const CoarseFineDeposition a_coarseFineDeposition, const IrregularDeposition a_irregularDeposition) |
| | Deposit one or more payload columns onto the AMR mesh.
|
| |
|
|
void | errorUnsupported () const |
| | Abort on an unrecognized coarse-fine deposition strategy.
|
| |
|
void | defineEBParticleMesh () |
| | Build the per-level per-patch EBParticleMesh leaves (valid grids + refined-coarse grids).
|
| |
|
void | defineLevelMotion () |
| | Build the per-level valid+ghost -> valid Copiers.
|
| |
|
void | defineCoarseFineMotion () |
| | Build the per-level coarse-fine mesh operators (null on level 0).
|
| |
| template<typename Container , typename PatchDeposit > |
| void | depositInterpCore (EBAMRCellData &a_meshData, const Container &a_particles, const int a_numComp, PatchDeposit a_patchDeposit) const |
| | The CoarseFineDeposition::Interp deposition algorithm, parameterized by the per-patch deposit.
|
| |
| void | defineOuterHaloMasks () |
| | Build the per-width outer-halo masks: per level, the coarse cells just outside the fine patch.
|
| |
| template<int NCOMP, typename Container , typename PatchDeposit > |
| void | depositHaloCore (EBAMRCellData &a_meshData, const Container &a_particles, PatchDeposit a_patchDeposit) const |
| | The CoarseFineDeposition::Halo deposition algorithm.
|
| |
| template<int NCOMP, typename Container , typename PatchDeposit , typename PatchDepositNGP > |
| void | depositHaloNGPCore (EBAMRCellData &a_meshData, const Container &a_particles, PatchDeposit a_patch, PatchDepositNGP a_patchNGP) const |
| | The CoarseFineDeposition::HaloNGP deposition algorithm.
|
| |
| int | getTransitionMaskWidth (const DepositionType a_depositionType, const int a_refRat) const |
| | Transition-mask width for a kernel: CIC -> refRat/2, TSC -> refRat (NGP is handled upstream).
|
| |
| void | defineTransitionMasks () |
| | Build the per-width transition masks: the fine-side transition band, on the refined-coarse grid.
|
| |
| template<typename Container > |
| void | transferMaskParticlesTransition (Container &a_particles, const DepositionType a_depositionType) const |
| | Move the coarse-side transition particles into the container mask holder (using the FiCo mask).
|
| |
| template<int NCOMP, typename Container , typename PatchDeposit > |
| void | depositTransitionCore (EBAMRCellData &a_meshData, const Container &a_particles, const DepositionType a_depositionType, PatchDeposit a_patch) const |
| | The CoarseFineDeposition::Transition deposition algorithm.
|
| |
|
|
Vector< RefCountedPtr< EBLevelGrid > > | m_eblgs |
| | Per-level EB level grids.
|
| |
|
Vector< int > | m_refRat |
| | Per-level refinement ratios.
|
| |
|
Vector< Real > | m_dx |
| | Per-level grid spacing (isotropic).
|
| |
|
RealVect | m_probLo |
| | Lower-left corner of the physical domain.
|
| |
|
int | m_ghost |
| | Number of ghost cells in the mesh data holders.
|
| |
|
int | m_finestLevel |
| | Finest AMR level index.
|
| |
|
bool | m_isDefined |
| | Whether define() has been called.
|
| |
|
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > | m_ebParticleMesh |
| | Per-level per-patch deposition/interpolation leaves.
|
| |
|
Vector< Copier > | m_levelCopiers |
| | Per-level valid+ghost -> valid Copiers (fold ghost-deposited mass into the owner patch).
|
| |
|
Vector< RefCountedPtr< EBCoarseFineParticleMesh > > | m_coarseFinePM |
| | Per-level coarse-fine mesh operators (null on level 0).
|
| |
|
Vector< RefCountedPtr< LayoutData< EBParticleMesh > > > | m_ebParticleMeshFiCo |
| | Per-level per-patch leaves on the refined-coarse (FiCo) grid (null on level 0).
|
| |
|
std::map< int, Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > > | m_outerHaloMasks |
| | Outer-halo masks keyed by halo width: per-level coarse cells just outside the fine patch.
|
| |
|
std::map< int, Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > > | m_transitionMasks |
| | Transition masks keyed by width: per-level fine-side transition band, on the refined-coarse grid.
|
| |
AMR driver that deposits/interpolates ParticleContainer particles across the hierarchy.
EBAMRParticleMesh deposits the particles of a ParticleContainer onto AMR mesh data and interpolates mesh data back onto particle columns, by driving the per-patch EBParticleMesh leaf on every box of every level. define() builds the per-level leaves (on the valid grids and the refined-coarse grids), the level valid+ghost -> valid Copiers, the EBCoarseFineParticleMesh operators, and the halo/transition masks; it must be called before any deposit or interpolate.
Interpolation
interpolate() and interpolateWeight() are purely per-level/per-patch: the mesh is assumed to be valid+ghosted by the caller, so no coarse-fine coupling is needed.
Deposition
deposit(), depositWeight(), and depositGathered() conserve mass across refinement boundaries, and select how the coarse-fine overlap is handled through CoarseFineDeposition:
- Interp – move the over-boundary mass between levels with the coarse-fine mesh operators.
- Halo – re-deposit the coarse-side halo particles on the refined-coarse grid (via the container's mask holder and the FiCo buffer) and add them to the fine level.
- HaloNGP – deposit the near-boundary halo particles with NGP so their clouds do not spread across the boundary (no refined-coarse buffer is needed).
- Transition – deposit the coarse-side transition particles on the refined-coarse grid at the fine-grid width, distributing the result to both levels. Halo, HaloNGP, and Transition require at least one ghost cell.
Cut cells, and what this class does NOT do
The deposition routines take an IrregularDeposition, but this class only implements the part of it that the leaf kernels can answer: NGP in a cut cell, yes or no. Everything else is the CALLER's responsibility.
- Native, NGP – handled here. These are the two kernel behaviours.
- Mirror – NOT handled here. It is a second pass that reflects each band particle across the embedded boundary and deposits the image, so it needs an image container, a scratch field and a collective remap, none of which this class owns. See
ItoSolver::mirrorPass.
- Redistribute, RedistributeBlended – NOT handled here. They act on the field AFTER the deposit. See
ItoSolver::redistributeAMR and McPhoto::depositHybridDivergence.
The consequence is worth stating plainly, because it is silent: passing Mirror or Redistribute to a deposition routine here and then omitting the caller's half produces Native behaviour, with no error and no diagnostic. The run completes and the output is bit-for-bit what Native would have given. A caller that selects one of those values owns the rest of its meaning.
This split is deliberate but not ideal – the enum is named in one place and interpreted in three, so there is no single source of truth for what a selector means. Centralizing the mirror and the redistribution here is the natural end state; it needs ParticleContainer::define's minimum block size, level tiles, valid cells and realm name, which this class is not currently given.