13#ifndef CD_EBCOARSEFINEPARTICLEMESH_H
14#define CD_EBCOARSEFINEPARTICLEMESH_H
17#include <DisjointBoxLayout.H>
18#include <EBLevelGrid.H>
20#include <ProblemDomain.H>
24#include <CD_NamespaceHeader.H>
66 const EBLevelGrid& a_eblgFine,
68 const IntVect a_ghost) noexcept;
83 define(const EBLevelGrid& a_eblgCoar,
84 const EBLevelGrid& a_eblgFine,
86 const IntVect a_ghost) noexcept;
98 addFineGhostsToCoarse(LevelData<EBCellFAB>& a_coarData, const LevelData<EBCellFAB>& a_fineData) const noexcept;
109 addFiCoDataToFine(LevelData<EBCellFAB>& a_fineData, const LevelData<EBCellFAB>& a_fiCoData) const noexcept;
120 addInvalidCoarseToFine(LevelData<EBCellFAB>& a_fineData, const LevelData<EBCellFAB>& a_coarData) const noexcept;
138 const LevelData<EBCellFAB>& a_fiCoData,
153 LevelData<EBCellFAB>&
305 arithmeticAverageAndAdd(EBCellFAB& a_coarData, const EBCellFAB& a_fineData, const DataIndex& a_din) const noexcept;
308#include <CD_NamespaceFooter.H>
Average
Various averaging methods.
Definition CD_Average.H:25
Declaration of conservative coarsening utility.
A class for handling particle deposition clouds that hang over refinement boundaries....
Definition CD_EBCoarseFineParticleMesh.H:42
Copier m_copierFiCoToFiCo
Copier for that moves data from valid+ghost -> valid on the refined coarse level.
Definition CD_EBCoarseFineParticleMesh.H:221
LayoutData< VoFIterator > m_vofIterCoar
VoFIterator for coarse cells.
Definition CD_EBCoarseFineParticleMesh.H:247
EBLevelGrid m_eblgFine
Fine EBLevelGrid.
Definition CD_EBCoarseFineParticleMesh.H:185
void arithmeticAverageAndAdd(EBCellFAB &a_coarData, const EBCellFAB &a_fineData, const DataIndex &a_din) const noexcept
Arithmetically average and add data from the refined coarse data to the coarse data.
Definition CD_EBCoarseFineParticleMesh.cpp:668
EBLevelGrid m_eblgFiCo
Refined coarse EBLevelGrid.
Definition CD_EBCoarseFineParticleMesh.H:190
virtual void addFineGhostsToCoarse(LevelData< EBCellFAB > &a_coarData, const LevelData< EBCellFAB > &a_fineData) const noexcept
Coarsen the fine-level ghost cells and add them to the coarse level.
Definition CD_EBCoarseFineParticleMesh.cpp:263
bool m_verbose
Verbose or not. Useful for debugging.
Definition CD_EBCoarseFineParticleMesh.H:175
LayoutData< BaseIVFAB< VoFStencil > > m_cellConservativeStencils
Stencils for conservative coarsening of volume data.
Definition CD_EBCoarseFineParticleMesh.H:259
EBLevelGrid m_eblgCoar
Coarse EBLevelGrid.
Definition CD_EBCoarseFineParticleMesh.H:180
void defineVoFIterators() noexcept
Define the vof iterators.
Definition CD_EBCoarseFineParticleMesh.cpp:105
Copier m_copierFiCoToFineNoGhosts
Copier for copying data from the refined coarse level to the fine level.
Definition CD_EBCoarseFineParticleMesh.H:214
LayoutData< VoFIterator > m_vofIterCoFiGhosts
VoFIterator for coarse grid cells that are coarsenings of fine-grid ghost irregular cells.
Definition CD_EBCoarseFineParticleMesh.H:242
virtual void addFiCoDataToFine(LevelData< EBCellFAB > &a_fineData, const LevelData< EBCellFAB > &a_fiCoData) const noexcept
Add the valid+ghost cells on the refined coarse level to the valid cells on the fine level.
Definition CD_EBCoarseFineParticleMesh.cpp:427
LayoutData< BaseIVFAB< VoFStencil > > m_cellArithmeticStencils
Stencils for arithmetic coarsening of volume data.
Definition CD_EBCoarseFineParticleMesh.H:253
LevelData< EBCellFAB > m_bufferFiCoRealVect
Buffer storage on the refined coarse level. One component only.
Definition CD_EBCoarseFineParticleMesh.H:231
void defineStencils() noexcept
Define the vof iterators.
Definition CD_EBCoarseFineParticleMesh.cpp:176
void defineBufferFiCo() noexcept
Define the buffer storages.
Definition CD_EBCoarseFineParticleMesh.cpp:248
LayoutData< VoFIterator > m_vofIterFineGhosts
VoFIterator for fine-grid irregular ghost cells.
Definition CD_EBCoarseFineParticleMesh.H:236
virtual void restrictAndAddFiCoDataToCoar(LevelData< EBCellFAB > &a_coarData, const LevelData< EBCellFAB > &a_fiCoData, const EBCoarseFineParticleMesh::Average a_average) const noexcept
Coarsen the data on the refined coarse grid to the coarse grid. The grids must be defined over the sa...
Definition CD_EBCoarseFineParticleMesh.cpp:559
static constexpr int m_nComp
Maximum number of components.
Definition CD_EBCoarseFineParticleMesh.H:165
virtual void addInvalidCoarseToFine(LevelData< EBCellFAB > &a_fineData, const LevelData< EBCellFAB > &a_coarData) const noexcept
Function which piecewise interpolates the data underneath the fine grid and adds it to the fine grid.
Definition CD_EBCoarseFineParticleMesh.cpp:447
bool m_isDefined
Is defined or not.
Definition CD_EBCoarseFineParticleMesh.H:170
LevelData< EBCellFAB > m_bufferFiCoReal
Buffer storage on the refined coarse level. One component only.
Definition CD_EBCoarseFineParticleMesh.H:226
virtual void define(const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgFine, const int a_refRat, const IntVect a_ghost) noexcept
Define function.
Definition CD_EBCoarseFineParticleMesh.cpp:52
EBLevelGrid m_eblgCoFi
Coarsening of m_eblgFine.
Definition CD_EBCoarseFineParticleMesh.H:195
EBCoarseFineParticleMesh() noexcept
Default constructor. Leaves object in undefined state and subsequently requires a call to define.
Definition CD_EBCoarseFineParticleMesh.cpp:30
IntVect m_ghost
Number of ghost cells in data holders.
Definition CD_EBCoarseFineParticleMesh.H:269
virtual void exchangeAndAddFiCoData(LevelData< EBCellFAB > &a_fiCoData) const noexcept
Function which performs an exchange+add operation on the refined coarse data.
Definition CD_EBCoarseFineParticleMesh.cpp:542
Copier m_copierCoFiToCoarIncludeGhosts
Copier for copying data from the coarsened fine level to the coarse level.
Definition CD_EBCoarseFineParticleMesh.H:207
Average
Simple enum for switch between arithmetic and conservative averaging.
Definition CD_EBCoarseFineParticleMesh.H:48
Copier m_copierFiCoToFineIncludeGhosts
Copier for copying data from the refined coarse level to the fine level.
Definition CD_EBCoarseFineParticleMesh.H:201
static constexpr int m_comp
Default component.
Definition CD_EBCoarseFineParticleMesh.H:160
int m_refRat
Refinement ratio between the two levels.
Definition CD_EBCoarseFineParticleMesh.H:264
void conservativeAverageAndAdd(EBCellFAB &a_coarData, const EBCellFAB &a_fineData, const DataIndex &a_din) const noexcept
Conservatively average and add data from the refined coarse data to the coarse data.
Definition CD_EBCoarseFineParticleMesh.cpp:610
LevelData< EBCellFAB > & getBufferFiCo() const noexcept
Get buffer storage on the refined coarse level.
const EBLevelGrid & getEblgFiCo() const
Get the refined version of the coarse eblevelgrid.
Definition CD_EBCoarseFineParticleMesh.cpp:390