12 #ifndef CD_ElectrostaticDomainBc_H
13 #define CD_ElectrostaticDomainBc_H
24 #include <CD_NamespaceHeader.H>
49 using BcFunction = std::function<Real(
const RealVect a_position,
const Real a_time)>;
59 using Bc = std::pair<BcType, BcFunction>;
122 #include <CD_NamespaceFooter.H>
Class which maps boundary condition types to a side and direction.
Definition: CD_ElectrostaticDomainBc.H:33
virtual ~ElectrostaticDomainBc()
Destructor. This.
Definition: CD_ElectrostaticDomainBc.cpp:40
ElectrostaticDomainBc(const ElectrostaticDomainBc &a_other)=default
Copy constructor.
BcType
Supported boundary condition types.
Definition: CD_ElectrostaticDomainBc.H:39
std::map< DomainSide, Bc > m_bcFunctions
This holds the map to the boundary condition type and side. The first entry in the map is the directi...
Definition: CD_ElectrostaticDomainBc.H:119
ElectrostaticDomainBc & operator=(const ElectrostaticDomainBc &a_other)=default
Copy assignment.
Bc getBc(const DomainSide a_domainSide) const
Returns the boundary condition for a domain side.
Definition: CD_ElectrostaticDomainBc.cpp:56
std::pair< BcType, BcFunction > Bc
Alias for mapping a bctype and function.
Definition: CD_ElectrostaticDomainBc.H:59
ElectrostaticDomainBc & operator=(const ElectrostaticDomainBc &&a_other)=delete
Disallowed move assignment.
std::pair< int, Side::LoHiSide > DomainSide
Alias for mapping a direction and side.
Definition: CD_ElectrostaticDomainBc.H:54
ElectrostaticDomainBc()
Initializing constructor. This populates the BC functions with homogeneous Neumann boundary condition...
Definition: CD_ElectrostaticDomainBc.cpp:19
std::function< Real(const RealVect a_position, const Real a_time)> BcFunction
Function which maps f(R^3,t) : R. Used for setting the associated value and boundary condition type.
Definition: CD_ElectrostaticDomainBc.H:49
ElectrostaticDomainBc(const ElectrostaticDomainBc &&a_other)=delete
Disallowed move constructor.
void setBc(const DomainSide a_wall, const Bc a_bc)
Set the boundary condition on a domain side. You must set both the type, and the associated function.
Definition: CD_ElectrostaticDomainBc.cpp:48