chombo-discharge
|
Class for computing matching the saturation charge boundary condition in an MFHelmholtzOp context. More...
#include <CD_MFHelmholtzSaturationChargeJumpBC.H>
Public Member Functions | |
MFHelmholtzSaturationChargeJumpBC ()=delete | |
Disallowe weak construction. | |
MFHelmholtzSaturationChargeJumpBC (const phase::which_phase a_phase, const Location::Cell a_dataLocation, const MFLevelGrid &a_mflg, const BcoefPtr &a_Bcoef, const Real a_dx, const int a_order, const int a_weight, const int a_radius, const int a_ghostCF, const IntVect a_ghostPhi) | |
Full constructor. More... | |
virtual | ~MFHelmholtzSaturationChargeJumpBC () |
Destructor (does nothing) | |
virtual void | matchBC (BaseIVFAB< Real > &a_jump, const MFCellFAB &a_phi, const bool a_homogeneousPhysBC, const DataIndex &a_dit) const override |
Match the BC. More... | |
Public Member Functions inherited from MFHelmholtzJumpBC | |
MFHelmholtzJumpBC ()=delete | |
Disallowed weak construction. | |
MFHelmholtzJumpBC (const Location::Cell a_dataLocation, const MFLevelGrid &a_mflg, const BcoefPtr &a_Bcoef, const Real a_dx, const int a_order, const int a_weight, const int a_radius, const int a_ghostCF, const IntVect a_ghostPhi) | |
Defining constructor. More... | |
MFHelmholtzJumpBC (const MFHelmholtzJumpBC &a_other)=delete | |
Disallowed copy constructor. | |
virtual | ~MFHelmholtzJumpBC () |
Destructor. Does nothing. | |
MFHelmholtzJumpBC & | operator= (const MFHelmholtzJumpBC &a_other)=delete |
Disallowed assignment constructor. | |
void | setBco (const RefCountedPtr< LevelData< MFBaseIVFAB >> &a_Bcoef) |
Set B-coefficient. This updates the stencils. More... | |
bool | isMultiPhase () const noexcept |
Is multiphase or not. More... | |
int | getOrder () const |
Return stencil order. | |
int | getWeight () const |
Return stencil weight (for least squares) | |
int | getRadius () const |
Return stencil radius (for least squares) | |
virtual void | matchBC (LevelData< BaseIVFAB< Real >> &a_jump, const LevelData< MFCellFAB > &a_phi, const bool a_homogeneousPhysBC) const |
Match the BC. More... | |
virtual const BaseIVFAB< Real > & | getBndryPhi (const int a_phase, const DataIndex &a_dit) const |
Get phi on the boundary. More... | |
virtual VoFIterator & | getSinglePhaseVofs (const int a_phase, const DataIndex &a_dit) const |
Return vof iterator which iterates over single-phase cells on a specific phase and box. | |
virtual VoFIterator & | getMultiPhaseVofs (const int a_phase, const DataIndex &a_dit) const |
Return vof iterator which iterates over multi-phase cells on a specified phase and box. | |
virtual const LayoutData< MFInterfaceFAB< VoFStencil > > & | getGradPhiStencils () const noexcept |
Get stencils for computing dphi/dn at the boundary. | |
virtual const LayoutData< MFInterfaceFAB< Real > > & | getGradPhiWeights () const noexcept |
Get constant weights involved when computing dphi/dn at the boundary. | |
virtual void | resetBC () const |
Set everything to zero. This is a debugging function. | |
Protected Attributes | |
phase::which_phase | m_phase |
Phase where the saturation charge BC is applied. | |
Protected Attributes inherited from MFHelmholtzJumpBC | |
Location::Cell | m_dataLocation |
Data centering. | |
MFLevelGrid | m_mflg |
Grids. | |
RefCountedPtr< LevelData< MFBaseIVFAB > > | m_Bcoef |
B-coefficient. | |
Real | m_dx |
Grid resolution. | |
int | m_order |
Stencil order. | |
int | m_weight |
Stencil order. | |
int | m_radius |
Stencil order. | |
int | m_ghostCF |
Number of grid cells that were filled over the CF. | |
int | m_numPhases |
Number of phases. | |
IntVect | m_ghostPhi |
Number of ghost cells in phi (must be exact match in order to use AggStencil) | |
bool | m_multiPhase |
Multiphase or not. | |
LayoutData< MFInterfaceFAB< Real > > | m_boundaryPhi |
Value of phi on the boundary. | |
std::map< int, std::shared_ptr< LayoutData< VoFIterator > > > | m_singlePhaseVofs |
Iterators for single-phase cells. The integer index is the phase. | |
std::map< int, std::shared_ptr< LayoutData< VoFIterator > > > | m_multiPhaseVofs |
Iterators for multi-phase cells. The integer index is the phase. | |
LayoutData< IntVectSet > | m_ivs |
IntVectSet over which we run the "averaging". | |
LayoutData< MFInterfaceFAB< VoFStencil > > | m_gradPhiStencils |
Raw stencils for dphi/dn. | |
LayoutData< MFInterfaceFAB< Real > > | m_gradPhiWeights |
Raw weights for dphi/dn. | |
LayoutData< MFInterfaceFAB< VoFStencil > > | m_avgStencils |
Average stencil. | |
LayoutData< MFInterfaceFAB< Vector< VolIndex > > > | m_avgVoFs |
Target vofs for average stencils. | |
LayoutData< MFInterfaceFAB< Real > > | m_denom |
Denominator 1/(bp*wp + bq*wq) for all interface cells. | |
LayoutData< MFInterfaceFAB< Real > > | m_avgWeights |
Average weights. | |
LayoutData< RefCountedPtr< AggStencil< EBCellFAB, BaseIVFAB< Real > > > > | m_aggStencils [2] |
Agg stencils for making matching go faster. | |
Additional Inherited Members | |
Public Types inherited from MFHelmholtzJumpBC | |
using | BcoefPtr = RefCountedPtr< LevelData< MFBaseIVFAB > > |
Alias to cut down on typing. | |
Protected Member Functions inherited from MFHelmholtzJumpBC | |
void | defineStencils () |
Define function. Builds stencils. | |
void | defineIterators () |
Define function. Builds stencils. | |
void | buildAverageStencils () |
Brief the average stencils. | |
virtual bool | getLeastSquaresBoundaryGradStencil (std::pair< Real, VoFStencil > &a_stencil, const VolIndex &a_vof, const EBISBox &a_ebisbox, const VofUtils::Neighborhood a_neighborhood, const int a_order) const |
Get stencil with specified order. More... | |
bool | isStencilValidCF (const VoFStencil &a_stencil, const DataIndex &a_dit) const |
Check if stencil is valid. More... | |
Real | applyStencil (const VoFStencil &a_stencil, const EBCellFAB &a_phi) const |
Apply a stencil and return the result. More... | |
Static Protected Attributes inherited from MFHelmholtzJumpBC | |
static constexpr int | m_comp = 0 |
Component where stencils are stored. | |
static constexpr int | m_nComp = 1 |
Number of components in stencil. | |
Class for computing matching the saturation charge boundary condition in an MFHelmholtzOp context.
MFHelmholtzSaturationChargeJumpBC::MFHelmholtzSaturationChargeJumpBC | ( | const phase::which_phase | a_phase, |
const Location::Cell | a_dataLocation, | ||
const MFLevelGrid & | a_mflg, | ||
const BcoefPtr & | a_Bcoef, | ||
const Real | a_dx, | ||
const int | a_order, | ||
const int | a_weight, | ||
const int | a_radius, | ||
const int | a_ghostCF, | ||
const IntVect | a_ghostPhi | ||
) |
Full constructor.
[in] | a_dataLocation | Data centering |
[in] | a_mflg | Grids |
[in] | a_Bcoef | Helmholtz B-coefficient |
[in] | a_dx | Grid resolution |
[in] | a_order | Stencil approximation order |
[in] | a_weight | Weighting factor for least squares |
[in] | a_radius | Stencil radius |
[in] | a_ghostCF | Number of grid cells that were filled across the CF. |
[in] | a_ghostPhi | Number of ghost cells in phi (needed for AggStencil) |
|
overridevirtual |
Match the BC.
MFhelmholtzJumpBC uses a_jump as the fixed parameter, computing the fluxes from the boundary potential and surface source. This function, however, specifies a zero flux into one of the phases and uses a_jump as a free parameter (it is computed from the fluxes).
[out] | a_jump | Jump data, i.e. right-hand side of dphi/dn + dphi/m = jump. Set equal to jump = b*dphi/dm. |
[in] | a_phi | Cell-centered data |
[in] | a_homogeneousPhysBC | Homogeneous BC or not |
[in] | a_dit | Grid index |
Reimplemented from MFHelmholtzJumpBC.