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

Boundary condition class for passing Dirichlet domain boundary conditions into EBHelmholtzOp. More...

#include <CD_EBHelmholtzDirichletDomainBC.H>

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

Public Member Functions

 EBHelmholtzDirichletDomainBC ()
 Constructor. Must subsequently call setValue.
 
 EBHelmholtzDirichletDomainBC (const Real a_value)
 Constructor. More...
 
 EBHelmholtzDirichletDomainBC (const std::function< Real(const RealVect &a_pos)> &a_value)
 Full constructor. More...
 
virtual ~EBHelmholtzDirichletDomainBC ()
 Destructor.
 
void setValue (const Real a_value)
 Set the constant value on the domain side. More...
 
void setValue (const std::function< Real(const RealVect &a_pos)> &a_value)
 Set the spatially dependent value on the domain side. More...
 
virtual void getFaceFlux (BaseFab< Real > &a_faceFlux, const BaseFab< Real > &a_phi, const BaseFab< Real > &a_Bcoef, const int &a_dir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const bool a_useHomogeneous) const override
 Get face flux. This is for regular cells, and it uses first order finite differences for filling the flux. More...
 
virtual Real getFaceFlux (const VolIndex &a_vof, const EBCellFAB &a_phi, const EBFaceFAB &a_Bcoef, const int &a_dir, const Side::LoHiSide &a_side, const DataIndex &a_dit, const bool a_useHomogeneous) const override
 Get face flux. This is for irregular cells. More...
 
- Public Member Functions inherited from EBHelmholtzDomainBC
 EBHelmholtzDomainBC ()
 Constructor.
 
virtual ~EBHelmholtzDomainBC ()
 Destructor.
 
 EBHelmholtzDomainBC (const EBHelmholtzDomainBC &a_other)=delete
 Disallowed – don't see why you would need it.
 
 EBHelmholtzDomainBC (const EBHelmholtzDomainBC &&a_other)=delete
 Disallowed – don't see why you would need it.
 
EBHelmholtzDomainBCoperator= (const EBHelmholtzDomainBC &a_other)=delete
 Disallowed - don't see why you would need it.
 
EBHelmholtzDomainBCoperator= (const EBHelmholtzDomainBC &&a_other)=delete
 Disallowed - don't see why you would need it.
 
virtual void define (const Location::Cell a_dataLocation, const EBLevelGrid &a_eblg, const RealVect &a_probLo, const Real a_dx)
 Define function. More...
 

Protected Attributes

bool m_useConstant
 Use constant for BC.
 
bool m_useFunction
 Use function for BC value.
 
Real m_constantValue
 Constant value on domain sides.
 
std::function< Real(const RealVect &a_pos)> m_functionValue
 Spatially dependent value on domain sides.
 
- Protected Attributes inherited from EBHelmholtzDomainBC
Location::Cell m_dataLocation
 Data centering.
 
Real m_dx
 Grid resolution.
 
RealVect m_probLo
 Lower-left corner of computational domain.
 
EBLevelGrid m_eblg
 Level grid.
 

Additional Inherited Members

- Protected Member Functions inherited from EBHelmholtzDomainBC
RealVect getBoundaryPosition (const IntVect &a_iv, const int &a_dir, const Side::LoHiSide &a_side) const
 Returns the cell-centered position at the boundary. More...
 
void multiplyByBcoef (BaseFab< Real > &a_flux, const BaseFab< Real > &a_bco, const int a_dir, const Side::LoHiSide a_side) const
 Utility function which multiplies the flux (or actually, dphi/dn) by the B-coefficient. This is used by the implementation classes when they compute the regular flux at the domain edges/faces. More...
 
- Static Protected Attributes inherited from EBHelmholtzDomainBC
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

Boundary condition class for passing Dirichlet domain boundary conditions into EBHelmholtzOp.

Constructor & Destructor Documentation

◆ EBHelmholtzDirichletDomainBC() [1/2]

EBHelmholtzDirichletDomainBC::EBHelmholtzDirichletDomainBC ( const Real  a_value)

Constructor.

Parameters
[in]a_valueConstant value on all domain sides.

◆ EBHelmholtzDirichletDomainBC() [2/2]

EBHelmholtzDirichletDomainBC::EBHelmholtzDirichletDomainBC ( const std::function< Real(const RealVect &a_pos)> &  a_value)

Full constructor.

Parameters
[in]a_valueSpatially dependent value on all domain sides.

Member Function Documentation

◆ getFaceFlux() [1/2]

void EBHelmholtzDirichletDomainBC::getFaceFlux ( BaseFab< Real > &  a_faceFlux,
const BaseFab< Real > &  a_phi,
const BaseFab< Real > &  a_Bcoef,
const int &  a_dir,
const Side::LoHiSide &  a_side,
const DataIndex &  a_dit,
const bool  a_useHomogeneous 
) const
overridevirtual

Get face flux. This is for regular cells, and it uses first order finite differences for filling the flux.

Parameters
[in,out]a_faceFluxFace-centered flux.
[in]a_phiCell-centered data
[in]a_BcoefFace-centered B-coefficient
[in]a_dirCoordinate direction
[in]a_sideHigh or low side
[in]a_ditData index
[in]a_useHomogeneousHomogeneous physical BCs or not.
Note
a_faceFlux is defined in the first strip of interior cells on the (dir,side) edge of the domain.

Implements EBHelmholtzDomainBC.

◆ getFaceFlux() [2/2]

Real EBHelmholtzDirichletDomainBC::getFaceFlux ( const VolIndex &  a_vof,
const EBCellFAB &  a_phi,
const EBFaceFAB &  a_Bcoef,
const int &  a_dir,
const Side::LoHiSide &  a_side,
const DataIndex &  a_dit,
const bool  a_useHomogeneous 
) const
overridevirtual

Get face flux. This is for irregular cells.

Parameters
[in]a_vofGrid cell
[in]a_phiCell-centered data
[in]a_BcoefFace-centered B-coefficient
[in]a_dirCoordinate direction
[in]a_sideHigh or low side
[in]a_ditData index
[in]a_useHomogeneousHomogeneous physical BCs or not.

Implements EBHelmholtzDomainBC.

◆ setValue() [1/2]

void EBHelmholtzDirichletDomainBC::setValue ( const Real  a_value)

Set the constant value on the domain side.

Parameters
[in]a_valueConstant value on all domain sides.

◆ setValue() [2/2]

void EBHelmholtzDirichletDomainBC::setValue ( const std::function< Real(const RealVect &a_pos)> &  a_value)

Set the spatially dependent value on the domain side.

Parameters
[in]a_valueSpatially dependent value on all domain sides.

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