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

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 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
const EBLevelGrid & getEblgFiCo () const
 Get the refined version of the coarse eblevelgrid.
 

Protected Member Functions

void defineVoFIterators () noexcept
 Define the vof iterators.
 

Protected Attributes

bool m_isDefined
 Is defined or not.
 
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. More...
 
Copier m_copierCoFiToCoarIncludeGhosts
 Copier for copying data from the coarsened fine level to the coarse level. More...
 
Copier m_copierFiCoToFineNoGhosts
 Copier for copying data from the refined coarse level to the fine level. More...
 
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. More...
 
LayoutData< VoFIterator > m_vofIterCoar
 VoFIterator for coarse cells, including ghost cells.
 
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.
 

Detailed Description

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 call three functions:

  1. addFineGhostsToCoarse which adds the contribution of the fine level's particles to the coarse level. This will add the part of the particle clouds that hang over the refinement boundary to the coarse level. Likewise, the user can get a buffer (getFiCoBuffer) for getting a temporary data holder on which he can use special deposition procedures.
  2. addFiCoDataToFine where the user will have deposited coarse-level particles on a fine-grid buffer, and he/she wants to add the result back to the fine grid.
  3. addInvalidCoarseToFine where the coarse-grid deposition clouds are interpolated to the fine grid. This is the case when e.g. the coarse-grid clouds deposit underneath the fine level but the mass should end up on the fine level.

Constructor & Destructor Documentation

◆ EBCoarseFineParticleMesh()

EBCoarseFineParticleMesh::EBCoarseFineParticleMesh ( const EBLevelGrid &  a_eblgCoar,
const EBLevelGrid &  a_eblgFine,
const int  a_refRat,
const IntVect  a_ghost 
)
noexcept

Full constructor. Calls define.

Parameters
[in]a_eblgCoarCoarse grids
[in]a_eblgFineFine grids
[in]a_refRatRefinement factory between levels
[in]a_ghostNumber of ghost cells in mesh data holders.

Member Function Documentation

◆ addFiCoDataToFine()

void EBCoarseFineParticleMesh::addFiCoDataToFine ( LevelData< EBCellFAB > &  a_fineData,
const LevelData< EBCellFAB > &  a_fiCoData 
) const
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. However, note that a_fiCo data should only contain the mass from the so-called "halo" particles.

Parameters
[in,out]a_fineDataFine mesh data
[in]a_fiCoDataRefined coarse data buffer. Users will have deposited the mesh data onto this

◆ addFineGhostsToCoarse()

void EBCoarseFineParticleMesh::addFineGhostsToCoarse ( LevelData< EBCellFAB > &  a_coarData,
const LevelData< EBCellFAB > &  a_fineData 
) const
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.

Parameters
[in,out]a_coarDataCoarse mesh data.
[in]a_fineDataFine mesh data.

◆ addInvalidCoarseToFine()

void EBCoarseFineParticleMesh::addInvalidCoarseToFine ( LevelData< EBCellFAB > &  a_fineData,
const LevelData< EBCellFAB > &  a_coarData 
) const
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.

Parameters
[in,out]a_fineDataFine-level data.
[in]a_coarDataCoarse-level data.

◆ define()

void EBCoarseFineParticleMesh::define ( const EBLevelGrid &  a_eblgCoar,
const EBLevelGrid &  a_eblgFine,
const int  a_refRat,
const IntVect  a_ghost 
)
virtualnoexcept

Define function.

Parameters
[in]a_eblgCoarCoarse grids
[in]a_eblgFineFine grids
[in]a_refRatRefinement factory between levels
[in]a_ghostNumber of ghost cells in mesh data holders.

Member Data Documentation

◆ m_copierCoFiToCoarIncludeGhosts

Copier EBCoarseFineParticleMesh::m_copierCoFiToCoarIncludeGhosts
protected

Copier for copying data from the coarsened fine level to the coarse level.

Note
This copier moves from valid+ghost in the source to valid+ghost in the destination.

◆ m_copierFiCoToFineIncludeGhosts

Copier EBCoarseFineParticleMesh::m_copierFiCoToFineIncludeGhosts
protected

Copier for copying data from the refined coarse level to the fine level.

Note
This copier moves from valid+ghost in the source to valid+ghost in the destination.

◆ m_copierFiCoToFineNoGhosts

Copier EBCoarseFineParticleMesh::m_copierFiCoToFineNoGhosts
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).

◆ m_vofIterCoFiGhosts

LayoutData<VoFIterator> EBCoarseFineParticleMesh::m_vofIterCoFiGhosts
mutableprotected

VoFIterator for coarse grid cells that are coarsenings of fine-grid ghost irregular cells.

Essentially a coarsening of m_vofIterFineGhosts.


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