|
chombo-discharge
|
Flux redistribution: the hybrid divergence with mass redistribution, as an EBRedistribution. More...
#include <CD_EBFluxRedistribution.H>


Public Member Functions | |
| EBFluxRedistribution ()=delete | |
| Disallowed weak construction. | |
| EBFluxRedistribution (const RefCountedPtr< AmrMesh > &a_amr, const std::string &a_realm, const phase::which_phase a_phase, const bool a_blendConservation, const bool a_redistribute) noexcept | |
| Constructor. Allocates the scratch data on the current grids, so the object must be rebuilt after a regrid. | |
| virtual | ~EBFluxRedistribution () noexcept |
| Destructor. | |
| void | redistribute (EBAMRCellData &a_divG, const EBAMRCellData &a_phi, const Real a_dt) noexcept override |
| Turn kappa*D into the hybrid divergence and redistribute the missed mass. | |
| Public Member Functions inherited from EBRedistribution | |
| EBRedistribution () noexcept | |
| Default constructor. | |
| EBRedistribution (const EBRedistribution &a_other)=delete | |
| Disallowed copy constructor. | |
| EBRedistribution (const EBRedistribution &&a_other)=delete | |
| Disallowed move constructor. | |
| EBRedistribution & | operator= (const EBRedistribution &a_other)=delete |
| Disallowed copy assignment. | |
| EBRedistribution & | operator= (const EBRedistribution &&a_other)=delete |
| Disallowed move assignment. | |
| virtual | ~EBRedistribution () noexcept |
| Destructor. | |
Protected Member Functions | |
| void | hybridDivergence (LevelData< EBCellFAB > &a_hybridDivergence, LevelData< BaseIVFAB< Real > > &a_massDifference, const LevelData< BaseIVFAB< Real > > &a_nonConservativeDivergence, const int a_level) const noexcept |
| Make the hybrid divergence on one level. | |
Protected Attributes | |
| RefCountedPtr< AmrMesh > | m_amr |
| AMR mesh. | |
| std::string | m_realm |
| Realm. | |
| phase::which_phase | m_phase |
| Phase. | |
| bool | m_blendConservation |
| If false, the non-conservative divergence is zero. | |
| bool | m_redistribute |
| If false, the missed mass is not redistributed. | |
| EBAMRIVData | m_nonConservativeDivergence |
| Non-conservative divergence in the cut cells. | |
| EBAMRIVData | m_massDifference |
| Mass that the hybrid divergence misses in the cut cells. | |
Flux redistribution: the hybrid divergence with mass redistribution, as an EBRedistribution.
In a cut cell with volume fraction kappa, the right-hand side is the hybrid divergence
R = kappa*D + (1-kappa)*D_nc,
where D is the conservative divergence and D_nc the non-conservative divergence, a kappa-weighted average of kappa*D over the neighbouring cells. The mass that this misses, (1-kappa)*(kappa*D - kappa*D_nc), is redistributed to the neighbouring cells through the EBMassRedistribution operators of the AmrMesh, on this level and across refinement boundaries. The result depends on neither the state nor the time step.
|
noexcept |
Constructor. Allocates the scratch data on the current grids, so the object must be rebuilt after a regrid.
The realm must have the operators for the non-conservative divergence and, with a_redistribute, for the redistribution registered.
| [in] | a_amr | AMR mesh |
| [in] | a_realm | Realm |
| [in] | a_phase | Phase |
| [in] | a_blendConservation | If false, the non-conservative divergence is zero, and R = kappa*D in cut cells. |
| [in] | a_redistribute | If false, the missed mass is not redistributed, and the update is not conservative. |
|
protectednoexcept |
Make the hybrid divergence on one level.
On input, a_hybridDivergence holds kappa*D. On output, it holds the hybrid divergence in the cut cells, and a_massDifference the mass that it misses.
| [in,out] | a_hybridDivergence | On input kappa*D, on output the hybrid divergence. |
| [out] | a_massDifference | Mass that the hybrid divergence misses. |
| [in] | a_nonConservativeDivergence | Non-conservative divergence. |
| [in] | a_level | Grid level |
|
overridevirtualnoexcept |
Turn kappa*D into the hybrid divergence and redistribute the missed mass.
See EBRedistribution::redistribute. The state and the time step are not used.
| [in,out] | a_divG | On input kappa*D, on output R. |
| [in] | a_phi | State that the update starts from (not used). |
| [in] | a_dt | Time step of the update (not used). |
Implements EBRedistribution.