Redistribution of mass from cut cells to their neighbouring cells, as in Chombo's flux redistribution.
More...
|
|
| EBMassRedistribution () noexcept |
| | Weak constructor. Need to call define afterwards.
|
|
| EBMassRedistribution (const EBMassRedistribution &a_other)=delete |
| | Copy constructor is not allowed.
|
| | EBMassRedistribution (const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgCoarsened, const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgRefined, const EBLevelGrid &a_eblgFine, const int a_refToCoar, const int a_refToFine, const int a_redistRadius) noexcept |
| | Full constructor. Calls the define function and puts object in usable state.
|
|
virtual | ~EBMassRedistribution () noexcept |
| | Destructor (does nothing).
|
| virtual void | define (const EBLevelGrid &a_eblgCoar, const EBLevelGrid &a_eblgCoarsened, const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgRefined, const EBLevelGrid &a_eblgFine, const int a_refToCoar, const int a_refToFine, const int a_redistRadius) noexcept |
| | Define function. Puts object in usable state.
|
| virtual void | redistributeCoar (LevelData< EBCellFAB > &a_phiCoar, const LevelData< BaseIVFAB< Real > > &a_deltaM, const Real &a_scaleCoar, const Interval &a_variables) const noexcept |
| | Redistribute the input quantity to the coarse level.
|
| virtual void | redistributeLevel (LevelData< EBCellFAB > &a_phi, const LevelData< BaseIVFAB< Real > > &a_deltaM, const Real &a_scale, const Interval &a_variables) const noexcept |
| | Redistribute the input quantity to this level.
|
| virtual void | redistributeFine (LevelData< EBCellFAB > &a_phiFine, const LevelData< BaseIVFAB< Real > > &a_deltaM, const Real &a_scaleFine, const Interval &a_variables) const noexcept |
| | Redistribute the input quantity to the fine level.
|
|
|
bool | m_isDefined |
| | Is defined or not.
|
|
bool | m_hasCoar |
| | Has coarse level or not.
|
|
bool | m_hasFine |
| | Has fine level or not.
|
|
int | m_refToCoar |
| | Refinement factor between this level and the coarse level.
|
|
int | m_refToFine |
| | Refinement factor between this level and the fine level.
|
|
int | m_redistRadius |
| | Radius of the redistribution neighbourhood, in cells.
|
|
EBLevelGrid | m_eblgCoar |
| | Grids on coarser level.
|
|
EBLevelGrid | m_eblgCoarsened |
| | Grids on this level that are a refinement of the coarser level.
|
|
EBLevelGrid | m_eblg |
| | Grids on this level.
|
|
EBLevelGrid | m_eblgRefined |
| | Grids on this level that are a coarsening of the fine level.
|
|
EBLevelGrid | m_eblgFine |
| | Fine grids.
|
|
Copier | m_coarCopier |
| | Copier for copying from the coarsening of this level to the coarse level.
|
|
Copier | m_levelCopier |
| | Copier for adding data from this level to this level (yes, really).
|
|
Copier | m_fineCopier |
| | Copier for copying from the refinement of this level to the fine level.
|
| LayoutData< BaseIVFAB< VoFStencil > > | m_redistStencilsCoar |
| | Stencils for redistribution into valid grid cells on the coarse level.
|
| LayoutData< BaseIVFAB< VoFStencil > > | m_redistStencilsLevel |
| | Stencils for redistribution into valid grid cells on this level.
|
| LayoutData< BaseIVFAB< VoFStencil > > | m_redistStencilsFine |
| | Stencils for redistribution into valid grid cells on the fine level.
|
|
LayoutData< VoFIterator > | m_vofit |
| | Iterator for going through all cells on this level that we redistribute from.
|
|
LevelData< EBCellFAB > | m_coarBuffer |
| | Buffer for the mass redistributed to the coarser level, on the coarsening of the grids of this level, with the redistribution radius as ghost cells. Zeroed and filled by every call to redistributeCoar.
|
|
LevelData< EBCellFAB > | m_levelBuffer |
| | Buffer for the mass redistributed on this level, with the redistribution radius as ghost cells. Zeroed and filled by every call to redistributeLevel.
|
|
LevelData< EBCellFAB > | m_fineBuffer |
| | Buffer for the mass redistributed to the finer level, on the refinement of the grids of this level, with the refinement ratio times the redistribution radius as ghost cells. Zeroed and filled by every call to redistributeFine.
|
Redistribution of mass from cut cells to their neighbouring cells, as in Chombo's flux redistribution.
This uses the same algorithm as the core Chombo code, but includes much faster define functions and smaller memory footprint. Because this class is used in a non-subcycling context, it has way fewer bells and whistles. The neighbourhoods only contain cells inside the domain, so no mass leaves through the domain boundary.
The underlying stencils for in this class can be understood as follows: Assume that we have some quantity deltaM_i that we want to redistribute from cell i to nearby cells. We fetch all cells that are within the redistribution radius around this cell. If one of these cells lie on other side of the refinement boundary, we coarsen it and fetch the corresponding coarse-grid cell. Likewise, if a neighborhood cell lies underneath the fine grid, we refine it and redistribute to the fine grid cells. In each cut-cell we thus compute the total volume of the surrounding neighborhood as
totalVolume = sum_(level_cells) kappa_j + 1/NrefToFine^D * sum_(fine_cells) kappa_j + Nref*ToCoar^D * sum(coar_cells) kappa_j.
Every cell in the neighborhood of cell i gets a weight 1/totalVolume. Note that proper division by the grid resolution is not made here; the user will have to ensure proper scaling of his/her variables when calling the actual redistribution functions. The scaling factors depend on what is actually being redistributed, and the user will need to work this out on paper.
The code has only been verified and validated for a redistribution radius of 1, which is what chombo-discharge uses. Larger radii are accepted but untested; with radius 2, mass is known to be lost across a refinement ratio of 4.