chombo-discharge
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EBHelmholtzRobinEBBC Class Reference

Base class for passing Robin EB boundary conditions into EBHelmholtzOp. More...

#include <CD_EBHelmholtzRobinEBBC.H>

Inheritance diagram for EBHelmholtzRobinEBBC:
Inheritance graph
[legend]
Collaboration diagram for EBHelmholtzRobinEBBC:
Collaboration graph
[legend]

Public Member Functions

 EBHelmholtzRobinEBBC ()
 Default constructor. Must subsequently set coefficients.
 
 EBHelmholtzRobinEBBC (const int a_order, const int a_weight, const Real a_A, const Real a_B, const Real a_C)
 Full constructor which sets constant coefficients. More...
 
 EBHelmholtzRobinEBBC (const int a_order, const int a_weight, const std::function< Real(const RealVect &a_pos)> &a_A, const std::function< Real(const RealVect &a_pos)> &a_B, const std::function< Real(const RealVect &a_pos)> &a_C)
 Full constructor which sets variable coefficients. More...
 
virtual ~EBHelmholtzRobinEBBC ()
 Destructor.
 
void setOrder (const int a_order)
 Set BC order. More...
 
void setWeight (const int a_weight)
 Set equation weights for least squares reconstruction. More...
 
virtual void setDomainDropOrder (const int a_domainSize)
 Drop BC order if domain size is equal or below this.
 
void setCoefficients (const Real a_A, const Real a_B, const Real a_C)
 Set constant coefficients. More...
 
void setCoefficients (const std::function< Real(const RealVect &a_pos)> &a_A, const std::function< Real(const RealVect &a_pos)> &a_B, const std::function< Real(const RealVect &a_pos)> &a_C)
 Set variable coefficients. More...
 
virtual void applyEBFlux (VoFIterator &a_vofit, EBCellFAB &a_Lphi, const EBCellFAB &a_phi, const BaseIVFAB< Real > &a_Bcoef, const DataIndex &a_dit, const Real &a_beta, const bool &a_homogeneousPhysBC) const override
 Apply the EB flux. This is the version that is called by EBHelmholtzOp. More...
 
- Public Member Functions inherited from EBHelmholtzEBBC
 EBHelmholtzEBBC ()
 Default constructor.
 
virtual ~EBHelmholtzEBBC ()
 Destructor.
 
 EBHelmholtzEBBC (const EBHelmholtzEBBC &a_other)=delete
 Disallowed – don't see why you would need it.
 
EBHelmholtzEBBCoperator= (const EBHelmholtzEBBC &a_other)=delete
 Disallowed - don't see why you would need it.
 
void define (const Location::Cell a_dataLocation, const EBLevelGrid &a_eblg, const RealVect &a_probLo, const Real &a_dx, const int a_ghostCF)
 Define function that is called by EBHelmholtzOp. More...
 
const LayoutData< BaseIVFAB< VoFStencil > > & getGradPhiStencils () const
 Get the stencil for computing the finite-volume approximation to kappa*Div(F). More...
 

Protected Member Functions

virtual void define () override
 User define function.
 
VoFStencil getInterpolationStencil (const VolIndex &a_vof, const DataIndex &a_dit, const VofUtils::Neighborhood a_neighborhood, const int a_order) const
 Get a least-squares based interpolation stencil. More...
 
- Protected Member Functions inherited from EBHelmholtzEBBC
bool isStencilValidCF (const VoFStencil &a_stencil, const DataIndex &a_dit) const
 Check if stencil is valid. More...
 
RealVect getBoundaryPosition (const VolIndex &a_vof, const DataIndex &a_dit) const
 Returns physical position at the boundary.
 
Real applyStencil (const VoFStencil &a_stencil, const EBCellFAB &a_phi) const
 Apply stencil to data holder and return result.
 

Protected Attributes

bool m_useConstant
 Use constant for BC.
 
bool m_useFunction
 Use function for BC value.
 
int m_order
 Stencil order.
 
int m_weight
 Stencil weight (for weighting equations in least squares reconstruction)
 
int m_domainDropOrder
 Special flag for dropping stencil order when domains become coarser than this.
 
Real m_constantA
 Constant A-coefficient.
 
Real m_constantB
 Constant B-coefficient.
 
Real m_constantC
 Constant C-coefficient.
 
std::function< Real(const RealVect &a_pos)> m_functionA
 Function-based A-coefficient.
 
std::function< Real(const RealVect &a_pos)> m_functionB
 Function-based B-coefficient.
 
std::function< Real(const RealVect &a_pos)> m_functionC
 Function-based C-coefficient.
 
- Protected Attributes inherited from EBHelmholtzEBBC
Location::Cell m_dataLocation
 Data centering.
 
int m_ghostCF
 Number of ghost cells that were filled across CF interface.
 
Real m_dx
 Grid resolution.
 
RealVect m_probLo
 Lower-left corner of computational domain.
 
EBLevelGrid m_eblg
 Level grid.
 
LayoutData< BaseIVFAB< VoFStencil > > m_gradPhiStencils
 Stencils for computing the flux on a single level. This is a single-level object.
 

Additional Inherited Members

- Static Protected Attributes inherited from EBHelmholtzEBBC
constexpr static int m_comp = 0
 Component that everything is defined for. Always have m_comp = 0.
 
constexpr static int m_nComp = 1
 Number of components. Always have m_nComp = 1.
 

Detailed Description

Base class for passing Robin EB boundary conditions into EBHelmholtzOp.

Robin bcs are in the form A*phi + B*dphi/dn = C. We impose dphi/dn = (C - A*phi)/B where phi is extrapolated to the EB to first order.

Note
The B-coefficient is not the same as in the Helmholtz equation...
In our notation, n points into the computational domain.

Constructor & Destructor Documentation

◆ EBHelmholtzRobinEBBC() [1/2]

EBHelmholtzRobinEBBC::EBHelmholtzRobinEBBC ( const int  a_order,
const int  a_weight,
const Real  a_A,
const Real  a_B,
const Real  a_C 
)

Full constructor which sets constant coefficients.

Parameters
[in]a_orderStencil order. Must be > 0
[in]a_weightEquation weights. Must be >=0
[in]a_ARobin A-coefficient
[in]a_BRobin B-coefficient
[in]a_CRobin C-coefficient

◆ EBHelmholtzRobinEBBC() [2/2]

EBHelmholtzRobinEBBC::EBHelmholtzRobinEBBC ( const int  a_order,
const int  a_weight,
const std::function< Real(const RealVect &a_pos)> &  a_A,
const std::function< Real(const RealVect &a_pos)> &  a_B,
const std::function< Real(const RealVect &a_pos)> &  a_C 
)

Full constructor which sets variable coefficients.

Parameters
[in]a_orderStencil order. Must be > 0
[in]a_weightEquation weights. Must be >=0
[in]a_ARobin A-coefficient
[in]a_BRobin B-coefficient
[in]a_CRobin C-coefficient

Member Function Documentation

◆ applyEBFlux()

void EBHelmholtzRobinEBBC::applyEBFlux ( VoFIterator &  a_vofit,
EBCellFAB &  a_Lphi,
const EBCellFAB &  a_phi,
const BaseIVFAB< Real > &  a_Bcoef,
const DataIndex &  a_dit,
const Real &  a_beta,
const bool &  a_homogeneousPhysBC 
) const
overridevirtual

Apply the EB flux. This is the version that is called by EBHelmholtzOp.

Parameters
[in,out]a_vofitIterator for cut-cells
[in]a_LphiOperator kappa*L(phi)
[in]a_phiPhi, cell-centered.
[in]a_BcoefEB-centered B-coefficient
[in]a_ditData index
[in]a_betaBeta. Passed in from operator.
[in]a_homogeneousPhysBCHomogeneous BC or not.

Implements EBHelmholtzEBBC.

◆ getInterpolationStencil()

VoFStencil EBHelmholtzRobinEBBC::getInterpolationStencil ( const VolIndex &  a_vof,
const DataIndex &  a_dit,
const VofUtils::Neighborhood  a_neighborhood,
const int  a_order 
) const
protected

Get a least-squares based interpolation stencil.

Parameters
[in]a_vofGrid cell
[in]a_ditData index.
[in]a_neighborhoodVof neighborhood (either quadrant-based or radius)
[in]a_orderStencil order
Note
This extrapolates from cell-centers to the EB using a first order expression.

◆ setCoefficients() [1/2]

void EBHelmholtzRobinEBBC::setCoefficients ( const Real  a_A,
const Real  a_B,
const Real  a_C 
)

Set constant coefficients.

Parameters
[in]a_AConstant A-coefficient
[in]a_BConstant B-coefficient
[in]a_CConstant C-coefficient

◆ setCoefficients() [2/2]

void EBHelmholtzRobinEBBC::setCoefficients ( const std::function< Real(const RealVect &a_pos)> &  a_A,
const std::function< Real(const RealVect &a_pos)> &  a_B,
const std::function< Real(const RealVect &a_pos)> &  a_C 
)

Set variable coefficients.

Parameters
[in]a_ASpatially dependent A-coefficient
[in]a_BSpatially dependent B-coefficient
[in]a_CSpatially dependent C-coefficient

◆ setOrder()

void EBHelmholtzRobinEBBC::setOrder ( const int  a_order)

Set BC order.

Parameters
[in]a_orderOrder

◆ setWeight()

void EBHelmholtzRobinEBBC::setWeight ( const int  a_weight)

Set equation weights for least squares reconstruction.

Parameters
[in]a_weightWeights

The documentation for this class was generated from the following files: