112 "__power_supply capaChargeFunc UNKNOWN "
129 spb->getFunctionDictionary()->deleteTensor(
"physCoeffSigma");
130 spb->getFunctionDictionary()->addConstant(
"physCoeffSigma",
m_k);
131 spb->setOutputFileBase(spb->getOutputFileBase() +
"_elec_field");
132 spb->initializeEquation();
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
float CepsReal
Need single precision floating point.
constexpr CepsAttribute CepsUniversal
This attribute means "everywhere".
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
CepsReal eval(CepsStandardArgs args) override
Evaluation of function.
Common elements of problems with a pacemaker.
CepsBool hasAnalyticSolution() const
Tells if there is an analytic or reference solution.
void setProblemName(const CepsString &name)
Set the name of the problem.
SourceTermManager * m_sourceTerms
All source terms.
void addUnknown(const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
Register a new unknown.
void addZeroDUnknown(CepsString label, const CepsString &unit="")
Register a new unknown, defined outside of geometry.
void addUnknownInteraction(CepsString label1, CepsString label2, CepsSet< CepsAttribute > attrs={})
Register interaction between unknowns. Also sets the interaction within Unknown instances label1 and ...
Unknown * getUnknown(const CepsString &label) const
Get an unknown by its name.
InputParameters * m_parameters
Input file data.
Geometry * m_geom
Link to geometry on which the pb is defined.
FunctionDictionary * m_functions
Collection of custom functions.
virtual void getInitialCondition(DHVecPtr v) const
Build vector from function pointed by m_initialCondition.
void initializeEquation() override
Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method ...
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > m_errors
Will store Linf, L1 and L2 relative errors.
void solve() override
Solves the all PDE (all iterations)
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors() const
Gets the currently computed errors. First index selects absolute(0) or relative(1) second index selec...
Profiler * getProfiler() const
Access to profiler.
Solver for a Poisson equation with Neumann BC (using 0 mean constraint)
void solve() override
Solve and postprocess.
void addEntry(const CepsString &label, ScalarEntry func)
Ads an entry to the map of scalar functions.
Encapsulates all the geometrical data.
Heat PDE, single unknown, constant diffusion coeff 1, homogeneous Neumann (no BC defined)
CepsMathTensor m_k
Diffusion tensor.
void defineSourceTerms() override
Lists the unknowns of the problem (one here)
ParallelRCElectrode * getCathode() const
Ptr to cathode object.
ParallelRCElectrode * getAnode() const
Ptr to anode object.
PowerSupply(PacemakerPoissonProblem *problem)
constructor
CepsReal eval(CepsStandardArgs args) final
Evaluation function.
Bidomain equation with extracardiac medium and connected to a pacemaker main class.
Unknown * getVCtsUnknown() const override
Link to the VCts unknown of the problem.
Unknown * getUFieldUnknown() const
Link to the u unknown of the problem.
Unknown * getVCetsUnknown() const override
Link to the VCets unknown of the problem.
void run() override
Run the simulation.
Unknown * getUCathodeUnknown() const override
Link to the Um unknown of the problem.
void getInitialCondition(DHVecPtr v0) const override
Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim.
void defineSourceTerms() override
Define the source terms.
CepsSet< CepsAttribute > getAnodeAttributes() const
Get cathode attributes if set.
void defineBoundaryConditions() override
Define the boundary conditions.
void defineUnknowns() override
Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker.
CepsSet< CepsAttribute > getCathodeAttributes() const
Get cathode attributes if set.
void setupWithParameters(InputParameters *params) override
Sets options from the parameters.
PacemakerPoissonProblem(Geometry *g, InputParameters *=nullptr)
Constructor from geometry and possibly parameters.
Unknown * getUAnodeUnknown() const override
Link to the Up unknown of the problem.
Solves pacemaker poisson problem with FBE, SBDF RK or CN schemes.
void stop(CepsString lbl)
Stops the measure of a labeled chronometer.
void start(CepsString lbl, CepsString dspl="")
Creates or continue a labeled chronometer.
void add(const CepsString ¶ms, CepsBool computeSupport=false)
Add a source term from parameters.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
CepsUnknownIndex getIdentifier() const
Get the identifier of the unknown.
CepsSet< CepsAttribute > & getAttributes()
Returns the attributes of the entity.
CepsString toString(_Tp value)
Convert a given value to a string (input has to be compatible with std::to_string)
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
CepsBool isProfiling()
Check if we are currently profiling on the master proc (always false on slave procs).
void destroyObject(_Type &)
Destroy[delete] any type.
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extract...
CepsUnknownIndex unknownId
unknown index
static constexpr const char * UAnode
Potential of anode (device side)
static constexpr const char * VCts
Voltage on reserve capacitor.
static constexpr const char * u
Potential in computational domain.
static constexpr const char * UCathode
Potential of cathode (device side)
static constexpr const char * VCets
Voltage on tank capacitor.