|
chombo-discharge
|
Class which can do refluxing across a coarse-fine interface. More...
#include <CD_EBReflux.H>
Public Member Functions | |
| EBReflux () noexcept | |
| Disallowed constructor. | |
| EBReflux (const EBReflux &a_other)=delete | |
| Disallowed copy constructor. | |
| EBReflux (const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const int a_refRat) noexcept | |
| Full constructor. Calls the define function. | |
| virtual | ~EBReflux () noexcept |
| Destructor (does nothing) | |
| virtual void | define (const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const int a_refRat) noexcept |
| Define method. Puts object in usable state. | |
| virtual void | reflux (LevelData< EBCellFAB > &a_Lphi, const LevelData< EBFluxFAB > &a_flux, const LevelData< EBFluxFAB > &a_fineFlux, const Interval a_variables, const Real a_scaleCoarFlux, const Real a_scaleFineFlux) const noexcept |
| Reflux into the coarse data. | |
Protected Member Functions | |
| virtual void | defineRegionsCF () noexcept |
| Define coarse-fine interface regions so that we can compute things later. | |
| virtual void | defineStencils () noexcept |
| Define the stencils required for coarsening the fine-grid fluxes onto the coarse grid. | |
| virtual void | defineBuffers () noexcept |
| Define buffers. | |
| virtual void | coarsenFluxesCF (LevelData< EBFluxFAB > &a_coarFluxes, const LevelData< EBFluxFAB > &a_fineFluxes, const int a_coarVar, const int a_fineVar) const noexcept |
| Coarsen the input fine fluxes onto the coarse fluxes. | |
| virtual void | refluxIntoCoarse (LevelData< EBCellFAB > &a_Lphi, const LevelData< EBFluxFAB > &a_oldFluxes, const LevelData< EBFluxFAB > &a_newFluxes, const int a_phiVar, const int a_oldFluxVar, const int a_newFluxVar, const Real a_scaleCoarFlux, const Real a_scaleFineFlux) const noexcept |
| Reflux data into a_Lphi. | |
Protected Attributes | |
| bool | m_isDefined |
| Is defined or not. | |
| int | m_refRat |
| Refinement factor between fine and coarse level. | |
| EBLevelGrid | m_eblgFine |
| Fine grids. | |
| EBLevelGrid | m_eblg |
| Grid on this level. | |
| EBLevelGrid | m_eblgCoFi |
| Coarsened fine grids. | |
| Copier | m_copier |
| Copier for copying from the coarsened fine grids to the coarse grids. | |
| LayoutData< std::map< std::pair< int, Side::LoHiSide >, BaseIFFAB< FaceStencil > > > | m_fluxCoarseningStencils |
| Stencils for conservatively coarsening fine-grid fluxes onto the coarse grid. | |
| LayoutData< std::map< std::pair< int, Side::LoHiSide >, DenseIntVectSet > > | m_regularCoarseFineRegions |
| Regular coarse-fine regions for coarse-grid patches. | |
| LayoutData< std::map< std::pair< int, Side::LoHiSide >, FaceIterator > > | m_fluxCoarseningRegions |
| Stencils for conservatively coarsening fine-grid fluxes onto the coarse grid. | |
| LayoutData< std::map< std::pair< int, Side::LoHiSide >, VoFIterator > > | m_irregularCoarseFineRegions |
| Cut-cells in each patch that lie on the coarse-fine interface. | |
Class which can do refluxing across a coarse-fine interface.
This is like Chombos EBReflux, but trimmed for being faster & cheaper. This class will only reflux on the coarse-fine interface. If the user wants to accumulate fluxes, he/she should do it outside of this routine and only call the reflux method at the very end (only relevant for subcycling).
This reflux method operates slightly different from Chombo in that the coarse-grid fluxes are first constructed by conservatively coarsening the fine-grid fluxes. Then we do as we always do, subtracting the originan coarse-grid fluxes and adding in the corresponding fine-grid fluxes. Standard scaling factor for scaling the coarse/fine flux contributions are present, as always.
|
noexcept |
Full constructor. Calls the define function.
| [in] | a_eblg | Grids |
| [in] | a_eblgFine | Fine grids |
| [in] | a_eblgCoFi | Coarsened fine grids |
| [in] | a_refRat | Refinement ratio between grids. |
|
protectedvirtualnoexcept |
Coarsen the input fine fluxes onto the coarse fluxes.
This replaces the coarse fluxes along the coarse-fine interface by the conservative average of the fine fluxes.
| [in,out] | a_coarFluxes | Coarse-grid fluxes |
| [in] | a_fineFluxes | Fine-grid fluxes |
| [in] | a_coarVar | Coarse-flux variable |
| [in] | a_fineVar | Fine-flux variable |
|
virtualnoexcept |
Define method. Puts object in usable state.
| [in] | a_eblg | Grids on this level |
| [in] | a_eblgFine | Fine grids |
| [in] | a_eblgCoFi | Coarsened fine grids |
| [in] | a_refRat | Refinement ratio between coarse and fine grids. |
|
virtualnoexcept |
Reflux into the coarse data.
This subtracts the coarse-fluxes from the EB and adds in the sum offine-grid fluxes. Multiplication by area fractions and grid resolutions are done in this routine.
| [in,out] | a_data | Data |
| [in] | a_flux | Fluxes |
| [in] | a_fineFlux | Fine-grid flux. |
| [in] | a_variables | Variables to reflux. |
| [in] | a_scaleCoarFlux | Scaling constant for fine-grid fluxes |
| [in] | a_scaleFineFlux | Scaling constant for fine-grid fluxes |
|
protectedvirtualnoexcept |
Reflux data into a_Lphi.
This subtracts the old fluxes (scaled by a_scaleOldFlux) from a_Lphi and adds in the new fluxes (scaled by a_scaleFineFlux).
| [in,out] | a_Lphi | |
| [in] | a_oldFluxes | Previous fluxes from which a_Lphi was computed |
| [in] | a_newFluxes | New fluxes to be put into a_Lphi |
| [in] | a_phiVar | Variable in a_Lphi to reflux |
| [in] | a_oldFluxVar | Variable in a_oldFluxes to subtract |
| [in] | a_newFluxVar | Variable in a_newFluxes to add |
| [in] | a_scaleCoarFlux | Scaling constant for fine-grid fluxes |
| [in] | a_scaleFineFlux | Scaling constant for fine-grid fluxes |
|
mutableprotected |
Cut-cells in each patch that lie on the coarse-fine interface.