chombo-discharge
|
Class which maps boundary condition types to a side and direction. More...
#include <CD_ElectrostaticDomainBc.H>
Public Types | |
enum class | BcType { Dirichlet , Neumann } |
Supported boundary condition types. | |
using | BcFunction = std::function< Real(const RealVect a_position, const Real a_time)> |
Function which maps f(R^3,t) : R. Used for setting the associated value and boundary condition type. More... | |
using | DomainSide = std::pair< int, Side::LoHiSide > |
Alias for mapping a direction and side. | |
using | Bc = std::pair< BcType, BcFunction > |
Alias for mapping a bctype and function. | |
Public Member Functions | |
ElectrostaticDomainBc () | |
Initializing constructor. This populates the BC functions with homogeneous Neumann boundary conditions. | |
ElectrostaticDomainBc (const ElectrostaticDomainBc &a_other)=default | |
Copy constructor. More... | |
ElectrostaticDomainBc (const ElectrostaticDomainBc &&a_other)=delete | |
Disallowed move constructor. More... | |
ElectrostaticDomainBc & | operator= (const ElectrostaticDomainBc &a_other)=default |
Copy assignment. More... | |
ElectrostaticDomainBc & | operator= (const ElectrostaticDomainBc &&a_other)=delete |
Disallowed move assignment. More... | |
virtual | ~ElectrostaticDomainBc () |
Destructor. This. | |
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. More... | |
Bc | getBc (const DomainSide a_domainSide) const |
Returns the boundary condition for a domain side. More... | |
Protected Attributes | |
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 direction and side of the boundary condition. The other entry in the map is the BC type, and the associated function which returns the value in space and time of the BC. | |
Class which maps boundary condition types to a side and direction.
This class is simply meant to hold functions that will be used as boundary conditions for use in various FieldSolver code. The user will construct this object, after which he can associate a polymorphic function with a domain side and a boundary condition type. Currently, only Dirichlet and Neumann are supported.
using ElectrostaticDomainBc::BcFunction = std::function<Real(const RealVect a_position, const Real a_time)> |
Function which maps f(R^3,t) : R. Used for setting the associated value and boundary condition type.
[in] | a_position | Physical coordinates |
[in] | a_time | Time |
|
default |
Copy constructor.
[in] | a_other | Other |
|
delete |
Disallowed move constructor.
[in] | a_other | Other |
ElectrostaticDomainBc::Bc ElectrostaticDomainBc::getBc | ( | const DomainSide | a_domainSide | ) | const |
Returns the boundary condition for a domain side.
[in] | a_domainSide | Domain side |
|
delete |
Disallowed move assignment.
[in] | a_other | Other |
|
default |
Copy assignment.
[in] | a_other | Other |
void ElectrostaticDomainBc::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.
[in] | a_domainSide | Domain side |
[in] | a_bc | BC type and function |