chombo-discharge
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
EBHelmholtzEBBC Class Referenceabstract

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

#include <CD_EBHelmholtzEBBC.H>

Inheritance diagram for EBHelmholtzEBBC:
Inheritance graph
[legend]

Public Types

using AmrMask = RefCountedPtr< LevelData< BaseFab< bool > > >
 Alias to cut down on typing.
 

Public Member Functions

 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 AmrMask &a_validCells, const RealVect &a_probLo, const Real &a_dx, const int a_ghostCF)
 Define function that is called by EBHelmholtzOp.
 
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 =0
 Apply the EB flux. This is the version that is called by EBHelmholtzOp.
 
const LayoutData< BaseIVFAB< VoFStencil > > & getGradPhiStencils () const
 Get the stencil for computing the finite-volume approximation to kappa*Div(F).
 

Protected Member Functions

virtual void define ()=0
 User define function.
 
bool isStencilValidCF (const VoFStencil &a_stencil, const DataIndex &a_dit) const
 Check if stencil is valid.
 
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

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.
 
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
 Valid grid cells.
 
LayoutData< BaseIVFAB< VoFStencil > > m_gradPhiStencils
 Stencils for computing the flux on a single level. This is a single-level object.
 

Static Protected Attributes

static constexpr int m_comp = 0
 Component that everything is defined for. Always have m_comp = 0.
 
static constexpr int m_nComp = 1
 Number of components. Always have m_nComp = 1.
 

Detailed Description

Base class for passing EB boundary conditions into EBHelmholtzOp.

Member Function Documentation

◆ applyEBFlux()

virtual void EBHelmholtzEBBC::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
pure virtual

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.

Implemented in EBHelmholtzDirichletEBBC, EBHelmholtzNeumannEBBC, EBHelmholtzRobinEBBC, and MFHelmholtzEBBC.

◆ define() [1/2]

virtual void EBHelmholtzEBBC::define ( )
protectedpure virtual

◆ define() [2/2]

void EBHelmholtzEBBC::define ( const Location::Cell  a_dataLocation,
const EBLevelGrid a_eblg,
const AmrMask a_validCells,
const RealVect a_probLo,
const Real a_dx,
const int  a_ghostCF 
)

Define function that is called by EBHelmholtzOp.

Parameters
[in]a_dataLocationSpecification of data centering
[in]a_eblgGrid where this object is defined.
[in]a_validCellsValid grid cells (might be null pointer)
[in]a_probLoLower-left corner of computational domain. Required if BC objects needs physical position.
[in]a_dxGrid resolution.
[in]a_ghostCFNumber of ghost cells that are filled across CF interface.

◆ getGradPhiStencils()

const LayoutData< BaseIVFAB< VoFStencil > > & EBHelmholtzEBBC::getGradPhiStencils ( ) const

Get the stencil for computing the finite-volume approximation to kappa*Div(F).

The finite volume approximation to kappa*Div(F) is sum(Fluxes)/dx. This routine should return the flux on the EB, i.e. (B*dphi/dn)/dx. The derivative can be written dphi/dn = w0*phi0 + sum(wi*phi(i)) where phi0 is a boundary weight and phi(i) are grid points. This routine should return the stencil B*wi*phi(i).

Note
Multiplication by beta is done in the operator.

◆ isStencilValidCF()

bool EBHelmholtzEBBC::isStencilValidCF ( const VoFStencil a_stencil,
const DataIndex a_dit 
) const
inlineprotected

Check if stencil is valid.

This routine makes sure that the stencil a_stencil does not reach over the CF interface and into ghost cells that do not have valid data.

Parameters
[in]a_stencilStencil
[in]a_ditData index

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