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

Base class for making Robin boundary conditions with EBHelmholtzOp. More...

#include <CD_EBHelmholtzRobinEBBCFactory.H>

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

Public Member Functions

 EBHelmholtzRobinEBBCFactory ()
 Constructor.
 
 EBHelmholtzRobinEBBCFactory (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...
 
 EBHelmholtzRobinEBBCFactory (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 ~EBHelmholtzRobinEBBCFactory ()
 Destructor (does nothing).
 
void setOrder (const int a_order)
 Set BC order. More...
 
void setWeight (const int a_weight)
 Set equation weights for least squares reconstruction. More...
 
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 setDomainDropOrder (const int a_domainSize)
 Drop BC order if domain size is equal or below this.
 
RefCountedPtr< EBHelmholtzEBBCcreate () override
 Factory method. More...
 
- Public Member Functions inherited from EBHelmholtzEBBCFactory
 EBHelmholtzEBBCFactory ()
 Constructor.
 
virtual ~EBHelmholtzEBBCFactory ()
 Destructor.
 
 EBHelmholtzEBBCFactory (const EBHelmholtzEBBCFactory &a_other)=delete
 Disallowed – don't see why you would need it.
 
EBHelmholtzEBBCFactoryoperator= (const EBHelmholtzEBBCFactory &a_other)=delete
 Disallowed - don't see why you would need it.
 

Protected Attributes

bool m_useConstant
 
bool m_useFunction
 Use function for BC value.
 
int m_order
 (Attempted) stencil order
 
int m_weight
 Weight for least squares gradient 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.
 

Detailed Description

Base class for making Robin boundary conditions with 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

◆ EBHelmholtzRobinEBBCFactory() [1/2]

EBHelmholtzRobinEBBCFactory::EBHelmholtzRobinEBBCFactory ( 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

◆ EBHelmholtzRobinEBBCFactory() [2/2]

EBHelmholtzRobinEBBCFactory::EBHelmholtzRobinEBBCFactory ( 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

◆ create()

RefCountedPtr< EBHelmholtzEBBC > EBHelmholtzRobinEBBCFactory::create ( )
overridevirtual

Factory method.

Returns
An EBHelmholtzRobinEBBC object with specified order and coefficients.

Implements EBHelmholtzEBBCFactory.

◆ setCoefficients() [1/2]

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

Set constant coefficients.

Parameters
[in]a_AA-coefficient
[in]a_BB-coefficient
[in]a_CC-coefficient

◆ setCoefficients() [2/2]

void EBHelmholtzRobinEBBCFactory::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_AA-coefficient
[in]a_BB-coefficient
[in]a_CC-coefficient

◆ setOrder()

void EBHelmholtzRobinEBBCFactory::setOrder ( const int  a_order)

Set BC order.

Parameters
[in]a_orderOrder

◆ setWeight()

void EBHelmholtzRobinEBBCFactory::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: