chombo-discharge
Loading...
Searching...
No Matches
EBHelmholtzDirichletEBBCFactory Class Reference

Factory class for making Dirichlet BCs on EBs in EBHelmholtzOp. More...

#include <CD_EBHelmholtzDirichletEBBCFactory.H>

Inheritance diagram for EBHelmholtzDirichletEBBCFactory:
Collaboration diagram for EBHelmholtzDirichletEBBCFactory:

Public Member Functions

 EBHelmholtzDirichletEBBCFactory ()
 Constructor.
 EBHelmholtzDirichletEBBCFactory (const int a_order, const int a_weight, const Real a_value)
 Full constructor which sets order and value on EB.
 EBHelmholtzDirichletEBBCFactory (const int a_order, const int a_weight, const std::function< Real(const RealVect &a_pos)> &a_value)
 Full constructor which sets order and spatially varying value on EBs.
virtual ~EBHelmholtzDirichletEBBCFactory ()
 Destructor.
virtual void setOrder (const int a_order)
 Set BC order.
virtual void setWeight (const int a_weight)
 Set BC order.
virtual void setValue (const Real a_value)
 Set the value on the EB.
virtual void setDomainDropOrder (const int a_domainSize)
 Drop BC order if domain size is equal or below this.
virtual void setCoarseGridDropOrder (const bool a_dropOrder)
 Signal that it should drop the stencil order if the cell is a coarsened cell.
virtual void setValue (const std::function< Real(const RealVect &a_pos)> &a_value)
 Set the spatially varying value on the EB.
virtual RefCountedPtr< EBHelmholtzEBBC > create () override
 Factory method.
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.
EBHelmholtzEBBCFactory & operator= (const EBHelmholtzEBBCFactory &a_other)=delete
 Disallowed - don't see why you would need it.

Protected Attributes

bool m_useConstant
 Use constant for BC.
bool m_useFunction
 Use function for BC value.
int m_order
 Stencil approximation order,.
int m_weight
 Stencil weighting.
int m_domainDropOrder
 Special flag for dropping stencil order when domains become coarser than this.
bool m_dropOrder
 Special flag for dropping stencil order if the cell is a coarsened cell.
Real m_constantValue
 Value on EB.
std::function< Real(const RealVect &a_pos)> m_functionValue
 Value on the EB.

Detailed Description

Factory class for making Dirichlet BCs on EBs in EBHelmholtzOp.

Constructor & Destructor Documentation

◆ EBHelmholtzDirichletEBBCFactory() [1/2]

EBHelmholtzDirichletEBBCFactory::EBHelmholtzDirichletEBBCFactory ( const int a_order,
const int a_weight,
const Real a_value )

Full constructor which sets order and value on EB.

Parameters
[in]a_orderApproximation order
[in]a_weightWeighting factor for stencils
[in]a_valueConstant value on EB
Note
The order is also the attempted radius of the stencil.

◆ EBHelmholtzDirichletEBBCFactory() [2/2]

EBHelmholtzDirichletEBBCFactory::EBHelmholtzDirichletEBBCFactory ( const int a_order,
const int a_weight,
const std::function< Real(const RealVect &a_pos)> & a_value )

Full constructor which sets order and spatially varying value on EBs.

Parameters
[in]a_orderApproximation order
[in]a_valueSpatially varying value on EBs
[in]a_weightDescription

Member Function Documentation

◆ create()

RefCountedPtr< EBHelmholtzEBBC > EBHelmholtzDirichletEBBCFactory::create ( )
overridevirtual

Factory method.

Returns
Return value

Implements EBHelmholtzEBBCFactory.

◆ setCoarseGridDropOrder()

void EBHelmholtzDirichletEBBCFactory::setCoarseGridDropOrder ( const bool a_dropOrder)
virtual

Signal that it should drop the stencil order if the cell is a coarsened cell.

Parameters
[in]a_dropOrder

◆ setDomainDropOrder()

void EBHelmholtzDirichletEBBCFactory::setDomainDropOrder ( const int a_domainSize)
virtual

Drop BC order if domain size is equal or below this.

Parameters
[in]a_domainSizeDescription

◆ setOrder()

void EBHelmholtzDirichletEBBCFactory::setOrder ( const int a_order)
virtual

Set BC order.

Parameters
[in]a_orderApproximation order (1 and 2 are accepted)
Note
For least squares, the order is also the attempted radius of the stencil.

◆ setValue() [1/2]

void EBHelmholtzDirichletEBBCFactory::setValue ( const Real a_value)
virtual

Set the value on the EB.

Parameters
[in]a_valueConstant value on EB

◆ setValue() [2/2]

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

Set the spatially varying value on the EB.

Parameters
[in]a_valueSpatially dependent value on EB

◆ setWeight()

void EBHelmholtzDirichletEBBCFactory::setWeight ( const int a_weight)
virtual

Set BC order.

Parameters
[in]a_weightWeight for least squares stencils.
Note
a_weight = 0 can lead to ill-conditioned least-squares systems.

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