|
| | EBFluxRegister ()=default |
| |
| | EBFluxRegister (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar) |
| |
| void | define (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar) |
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FArrayBox const *, 3 > &flux, const Real *dx, Real dt, const FArrayBox &volfrac, const std::array< FArrayBox const *, 3 > &areafrac, RunOn runon) |
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FArrayBox const *, 3 > &flux, const Real *dx, Real dt, const FArrayBox &volfrac, const std::array< FArrayBox const *, 3 > &areafrac, int srccomp, int destcomp, int numcomp, RunOn runon) |
| |
| void | FineAdd (const MFIter &mfi, const std::array< FArrayBox const *, 3 > &flux, const Real *dx, Real dt, const FArrayBox &volfrac, const std::array< FArrayBox const *, 3 > &areafrac, const FArrayBox &dm, RunOn runon) |
| |
| void | FineAdd (const MFIter &mfi, const std::array< FArrayBox const *, 3 > &flux, const Real *dx, Real dt, const FArrayBox &volfrac, const std::array< FArrayBox const *, 3 > &areafrac, const FArrayBox &dm, int srccomp, int destcomp, int numcomp, RunOn runon) |
| |
| void | FineAdd (const MFIter &mfi, const std::array< FArrayBox const *, 3 > &flux, const Real *dx, Real dt, const FArrayBox &volfrac, const std::array< FArrayBox const *, 3 > &areafrac, int srccomp, int destcomp, int numcomp, RunOn runon) |
| | This version does not do re-redistribution.
|
| |
| void | Reflux (MultiFab &crse_state, const amrex::MultiFab &crse_vfrac, MultiFab &fine_state, const amrex::MultiFab &fine_vfrac) |
| |
| void | Reflux (MultiFab &crse_state, const amrex::MultiFab &crse_vfrac, MultiFab &fine_state, const amrex::MultiFab &fine_vfrac, int srccomp, int destcomp, int numcomp) |
| |
| void | Reflux (MultiFab &crse_state, const amrex::MultiFab &crse_vfrac, int srccomp, int destcomp, int numcomp) |
| | This version does not do re-redistribution.
|
| |
| FArrayBox * | getCrseData (const MFIter &mfi) |
| |
| const IArrayBox * | getCrseFlag (const MFIter &mfi) const |
| |
| void | defineExtra (const BoxArray &fba, const DistributionMapping &fdm) |
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, RunOn runon) noexcept |
| | Add coarse-level fluxes for the tile indicated by mfi.
|
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept |
| | Add coarse-level fluxes with component slicing.
|
| |
| void | FineAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, RunOn runon) noexcept |
| | Add fine-level fluxes for the tile identified by mfi.
|
| |
| void | FineAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &a_flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept |
| | Add fine-level fluxes with component slicing.
|
| |
| | YAFluxRegisterT ()=default |
| | Construct an empty register; call define() before use.
|
| |
| | YAFluxRegisterT (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar) |
| | Fully construct the register for a fine level.
|
| |
| void | define (const BoxArray &fba, const BoxArray &cba, const DistributionMapping &fdm, const DistributionMapping &cdm, const Geometry &fgeom, const Geometry &cgeom, const IntVect &ref_ratio, int fine_lev, int nvar) |
| | Define the register using the same arguments as the constructor.
|
| |
| void | reset () |
| | Reset stored fluxes and flags before a coarse advance.
|
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, RunOn runon) noexcept |
| | Add coarse-level fluxes for the tile indicated by mfi.
|
| |
| void | CrseAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept |
| | Add coarse-level fluxes with component slicing.
|
| |
| void | FineAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &flux, const Real *dx, Real dt, RunOn runon) noexcept |
| | Add fine-level fluxes for the tile identified by mfi.
|
| |
| void | FineAdd (const MFIter &mfi, const std::array< FAB const *, 3 > &a_flux, const Real *dx, Real dt, int srccomp, int destcomp, int numcomp, RunOn runon) noexcept |
| | Add fine-level fluxes with component slicing.
|
| |
| void | Reflux (MF &state, int dc=0) |
| | Apply the accumulated flux divergence to the coarse MultiFab state.
|
| |
| void | Reflux (MF &state, int srccomp, int destcomp, int numcomp) |
| | Component-aware version of Reflux writing components [destcomp,destcomp+numcomp).
|
| |
| bool | CrseHasWork (const MFIter &mfi) const noexcept |
| | Return true if coarse tile mfi abuts a coarse/fine boundary.
|
| |
| bool | FineHasWork (const MFIter &mfi) const noexcept |
| | Return true if fine tile mfi has flux registers to update.
|
| |
| MF & | getFineData () |
| | Mutable access to fine-side accumulation data.
|
| |
| MF & | getCrseData () |
| | Mutable access to coarse-side accumulation data.
|
| |
| void | setCrseVolume (MF const *cvol) |
| |
| void | setDeterministic (bool flag) |
| | Enable deterministic mode for GPU operations via flag (uses deterministic reductions).
|
| |
| bool | getDeterministic () const |
| |
EBFluxRegister is used for refluxing, re-redistribution, re-refluxing, and re-re-redistribution. See Tutorials/EB/CNS for an example of using this class.
Reflux for EB is somewhat similar to non-EB. At the beginning of a coarse step, reset() is called. In MFIter for the coarse level advance, CrseAdd is called with coarse flux. There are two versions of CrseAdd, one for regular fab/tile and the other for fab/tile containing cutcells. For the cutcell version, the flux is is at centroid, not face center. The flux is not scaled. In MFIter for the fine level advance, FineAdd is called. There are also two version of FineAdd, one for regular and the other for fab/tile containing cutcells. The cutcell version also takes dm for re-redistribution explained below. After the fine level finished its time steps, Reflux is called to update the coarse cells next to the coarse/fine boundary. Note that re-redistribution is also performed in Reflux.
Re-redistribution is unfortunately more complicated. The coarse level needs to accumulate the density (e.g., g/cm^3 for mass density) loss of coarse/fine boundary cells (i.e., coarse cells on the coarse side of the coarse/fine boundary) due to redistribution from/to coarse cells covered by the fine level. If a coarse/fine boundary cell redistributes mass to a covered cell, this counts as a positive loss. Here covered means covered be the fine level, not EB. If a covered cell redistributes mass to a boundary cell, this counts as a negative loss for that boundary cell. The accumulation as the coarse level is performed on FArrayBox returned by EBFluxRegister::getCrseData(MFIter const&). EBFluxRegister also has getCrseFlag(MFIte cons&) function returning IArrayBox that contains flags for genuine coarse cell, coarse/fine boundary cells and covered cells.
The fine level in re-redistribution needs to accumulate the mass (e.g., g for density) gain of ghost cells due to redistribution from/to valid cells. The application code can use a local FArrayBox to store this and then EBFLuxRegister::FineAdd is called to add the part in ghost cells (excluding ghost cells covered by valid cells of other grids) to EBFluxRegister's internal data.