|
chombo-discharge
|
A class for handling particle deposition clouds that hang over refinement boundaries. This class does not include any deposition functionality but provides buffers for moving mass between two levels. More...
#include <CD_EBCoarseFineParticleMesh.H>
Public Types | |
| enum | Average { Arithmetic , Conservative } |
| Simple enum for switch between arithmetic and conservative averaging. | |
Public Member Functions | |
| EBCoarseFineParticleMesh () noexcept | |
| Default constructor. Leaves object in undefined state and subsequently requires a call to define. | |
| EBCoarseFineParticleMesh (const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgFine, const int a_refRat, const IntVect a_ghost) noexcept | |
| Full constructor. Calls define. | |
| virtual | ~EBCoarseFineParticleMesh () noexcept |
| Destructor (does nothing) | |
| virtual void | define (const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgFine, const int a_refRat, const IntVect a_ghost) noexcept |
| Define function. | |
| 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. | |
| 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. | |
| 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. | |
| virtual void | exchangeAndAddFiCoData (LevelData< EBCellFAB > &a_fiCoData) const noexcept |
| Function which performs an exchange+add operation on the refined coarse data. | |
| 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 same layout. | |
| const EBLevelGrid & | getEblgFiCo () const |
| Get the refined version of the coarse eblevelgrid. | |
| template<int NCOMP> | |
| LevelData< EBCellFAB > & | getBufferFiCo () const noexcept |
| Get buffer storage on the refined coarse level. | |
| template<> | |
| LevelData< EBCellFAB > & | getBufferFiCo () const noexcept |
| template<> | |
| LevelData< EBCellFAB > & | getBufferFiCo () const noexcept |
Protected Member Functions | |
| void | defineVoFIterators () noexcept |
| Define the vof iterators. | |
| void | defineStencils () noexcept |
| Define the vof iterators. | |
| void | defineBufferFiCo () noexcept |
| Define the buffer storages. | |
| 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. | |
| 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. | |
Protected Attributes | |
| bool | m_isDefined |
| Is defined or not. | |
| bool | m_verbose |
| Verbose or not. Useful for debugging. | |
| EBLevelGrid | m_eblgCoar |
| Coarse EBLevelGrid. | |
| EBLevelGrid | m_eblgFine |
| Fine EBLevelGrid. | |
| EBLevelGrid | m_eblgFiCo |
| Refined coarse EBLevelGrid. | |
| EBLevelGrid | m_eblgCoFi |
| Coarsening of m_eblgFine. | |
| Copier | m_copierFiCoToFineIncludeGhosts |
| Copier for copying data from the refined coarse level to the fine level. | |
| Copier | m_copierCoFiToCoarIncludeGhosts |
| Copier for copying data from the coarsened fine level to the coarse level. | |
| Copier | m_copierFiCoToFineNoGhosts |
| Copier for copying data from the refined coarse level to the fine level. | |
| Copier | m_copierFiCoToFiCo |
| Copier for that moves data from valid+ghost -> valid on the refined coarse level. | |
| LevelData< EBCellFAB > | m_bufferFiCoReal |
| Buffer storage on the refined coarse level. One component only. | |
| LevelData< EBCellFAB > | m_bufferFiCoRealVect |
| Buffer storage on the refined coarse level. One component only. | |
| LayoutData< VoFIterator > | m_vofIterFineGhosts |
| VoFIterator for fine-grid irregular ghost cells. | |
| LayoutData< VoFIterator > | m_vofIterCoFiGhosts |
| VoFIterator for coarse grid cells that are coarsenings of fine-grid ghost irregular cells. | |
| LayoutData< VoFIterator > | m_vofIterCoar |
| VoFIterator for coarse cells. | |
| LayoutData< BaseIVFAB< VoFStencil > > | m_cellArithmeticStencils |
| Stencils for arithmetic coarsening of volume data. | |
| LayoutData< BaseIVFAB< VoFStencil > > | m_cellConservativeStencils |
| Stencils for conservative coarsening of volume data. | |
| int | m_refRat |
| Refinement ratio between the two levels. | |
| IntVect | m_ghost |
| Number of ghost cells in data holders. | |
Static Protected Attributes | |
| static constexpr int | m_comp = 0 |
| Default component. | |
| static constexpr int | m_nComp = 1 |
| Maximum number of components. | |
A class for handling particle deposition clouds that hang over refinement boundaries. This class does not include any deposition functionality but provides buffers for moving mass between two levels.
To use this class, the user can directly some functions:
|
noexcept |
Full constructor. Calls define.
| [in] | a_eblgCoar | Coarse grids |
| [in] | a_eblgFine | Fine grids |
| [in] | a_refRat | Refinement factory between levels |
| [in] | a_ghost | Number of ghost cells in mesh data holders. |
|
virtualnoexcept |
Add the valid+ghost cells on the refined coarse level to the valid cells on the fine level.
This routine is used when the user have deposited coarse-level particles into a_fiCoData (which is a refinement of the coarse level). This routine then adds that data to the fine level. The motion plan defines the computation region as valid+ghost -> valid, which is what we want.
| [in,out] | a_fineData | Fine mesh data |
| [in] | a_fiCoData | Refined coarse data buffer. Users will have deposited the mesh data onto this |
|
virtualnoexcept |
Coarsen the fine-level ghost cells and add them to the coarse level.
On output, the contents in the ghost cells on the refinement boundary are added from the fine level to the coarse level. This routine is used when the fine-level particles have particle clouds that deposit into the ghost cells outside the fine level, i.e. over the refinement boundary. This routine coarsens that data and adds the mass to the coarse level.
| [in,out] | a_coarData | Coarse mesh data. |
| [in] | a_fineData | Fine mesh data. |
|
virtualnoexcept |
Function which piecewise interpolates the data underneath the fine grid and adds it to the fine grid.
The data-motion plan is to use the valid+ghost cells on the coarse level and add it into the valid region on the fine level. However, the buffers' ghost regions are set to zero so this should only add non-ghosted data between the levels.
| [in,out] | a_fineData | Fine-level data. |
| [in] | a_coarData | Coarse-level data. |
|
protectednoexcept |
Arithmetically average and add data from the refined coarse data to the coarse data.
| [in,out] | a_coarData | Coarse-grid data |
| [in] | a_fineData | Fine-grid data (must be on a refined layout of the coarse grid) |
| [in] | a_din | Grid idnex |
|
protectednoexcept |
Conservatively average and add data from the refined coarse data to the coarse data.
| [in,out] | a_coarData | Coarse-grid data |
| [in] | a_fineData | Fine-grid data (must be on a refined layout of the coarse grid) |
| [in] | a_din | Grid index |
|
virtualnoexcept |
Define function.
| [in] | a_eblgCoar | Coarse grids |
| [in] | a_eblgFine | Fine grids |
| [in] | a_refRat | Refinement factory between levels |
| [in] | a_ghost | Number of ghost cells in mesh data holders. |
|
virtualnoexcept |
Coarsen the data on the refined coarse grid to the coarse grid. The grids must be defined over the same layout.
| [in,out] | a_coarData | Coarse-grid data |
| [in] | a_fineData | Data on the refined coarse grid |
| [in] | a_average | Averaging method. Either arithmetic or conservative. |
|
protected |
Stencils for arithmetic coarsening of volume data.
This is defined on the coarse grid, and indexes into the refined coarse grid.
|
protected |
Stencils for conservative coarsening of volume data.
This is defined on the coarse grid, and indexes into the refined coarse grid.
|
protected |
Copier for copying data from the coarsened fine level to the coarse level.
|
protected |
Copier for that moves data from valid+ghost -> valid on the refined coarse level.
Needed for some of the deposition methods that deposit on the refined coarse level and then later needs to synchronize their data
|
protected |
Copier for copying data from the refined coarse level to the fine level.
|
protected |
Copier for copying data from the refined coarse level to the fine level.
This copier moves from valid+ghost in the source to valid in the destination (as opposed to m_copierCOFiToCoarIncludeGhosts which adds mass into the ghost cells).
|
mutableprotected |
VoFIterator for coarse grid cells that are coarsenings of fine-grid ghost irregular cells.
Essentially a coarsening of m_vofIterFineGhosts.