chombo-discharge
|
Class which maps boundary condition types to a side and direction. More...
#include <CD_ElectrostaticEbBc.H>
Public 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 potential at an electrode. | |
Public Member Functions | |
ElectrostaticEbBc () | |
Initializing constructor (does nothing) | |
virtual | ~ElectrostaticEbBc () |
Destructor (does nothing) | |
void | clear () |
Clears the object. | |
void | addEbBc (const Electrode &a_electrode, const BcFunction &a_bcFunction) |
Add a boundary condition. More... | |
void | setEbBc (const int a_electrode, const BcFunction &a_bcFunction) |
Set the potential for a_electrode to be given by a_bcFunction. More... | |
BcFunction & | getBc (const int a_electrode) |
Return boundary condition associated with a particular electrode. More... | |
const BcFunction & | getBc (const int a_electrode) const |
Return boundary condition associated with a particular electrode. More... | |
std::vector< std::pair< Electrode, BcFunction > > & | getBcs () |
Get all boundary conditions. More... | |
const std::vector< std::pair< Electrode, BcFunction > > & | getBcs () const |
Get all boundary conditions. More... | |
Protected Attributes | |
std::vector< std::pair< Electrode, BcFunction > > | m_bcFunctions |
Data structure which holds electrode and associated potential functions. | |
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 an electrode, which is used for setting the voltage on the electrode (in time and space).
void ElectrostaticEbBc::addEbBc | ( | const Electrode & | a_electrode, |
const BcFunction & | a_bcFunction | ||
) |
Add a boundary condition.
[in] | a_electrode | The electrode. |
[in] | a_bcFunction | Boundary condition function. |
This appends an EbBc to the end of m_bcFunctions.
ElectrostaticEbBc::BcFunction & ElectrostaticEbBc::getBc | ( | const int | a_electrode | ) |
Return boundary condition associated with a particular electrode.
[in] | a_electrode | electrode |
const ElectrostaticEbBc::BcFunction & ElectrostaticEbBc::getBc | ( | const int | a_electrode | ) | const |
Return boundary condition associated with a particular electrode.
[in] | a_electrode | electrode |
std::vector< std::pair< Electrode, ElectrostaticEbBc::BcFunction > > & ElectrostaticEbBc::getBcs | ( | ) |
Get all boundary conditions.
const std::vector< std::pair< Electrode, ElectrostaticEbBc::BcFunction > > & ElectrostaticEbBc::getBcs | ( | ) | const |
Get all boundary conditions.
void ElectrostaticEbBc::setEbBc | ( | const int | a_electrode, |
const BcFunction & | a_bcFunction | ||
) |
Set the potential for a_electrode to be given by a_bcFunction.
[in] | a_electrode | The electrode index in the vector. |
[in] | a_bcFunction | Boundary condition function. |