12 #ifndef CD_ElectrostaticEbBc_H
13 #define CD_ElectrostaticEbBc_H
24 #include <CD_NamespaceHeader.H>
38 using BcFunction = std::function<Real(
const RealVect a_position,
const Real a_time)>;
80 getBc(
const int a_electrode);
88 getBc(
const int a_electrode)
const;
94 std::vector<std::pair<Electrode, BcFunction>>&
101 const std::vector<std::pair<Electrode, BcFunction>>&
111 #include <CD_NamespaceFooter.H>
Declaration of an electrode class.
Electrode class for encapsulating the concept of an electrical conductor.
Definition: CD_Electrode.H:26
Class which maps boundary condition types to a side and direction.
Definition: CD_ElectrostaticEbBc.H:33
std::function< Real(const RealVect a_position, const Real a_time)> BcFunction
Function which maps f(R^3,t) : R. Used for setting the potential at an electrode.
Definition: CD_ElectrostaticEbBc.H:38
void setEbBc(const int a_electrode, const BcFunction &a_bcFunction)
Set the potential for a_electrode to be given by a_bcFunction.
Definition: CD_ElectrostaticEbBc.cpp:43
void addEbBc(const Electrode &a_electrode, const BcFunction &a_bcFunction)
Add a boundary condition.
Definition: CD_ElectrostaticEbBc.cpp:35
ElectrostaticEbBc()
Initializing constructor (does nothing)
Definition: CD_ElectrostaticEbBc.cpp:16
virtual ~ElectrostaticEbBc()
Destructor (does nothing)
Definition: CD_ElectrostaticEbBc.cpp:21
std::vector< std::pair< Electrode, BcFunction > > m_bcFunctions
Data structure which holds electrode and associated potential functions.
Definition: CD_ElectrostaticEbBc.H:108
BcFunction & getBc(const int a_electrode)
Return boundary condition associated with a particular electrode.
Definition: CD_ElectrostaticEbBc.cpp:55
std::vector< std::pair< Electrode, BcFunction > > & getBcs()
Get all boundary conditions.
Definition: CD_ElectrostaticEbBc.cpp:79
void clear()
Clears the object.
Definition: CD_ElectrostaticEbBc.cpp:27