50 auto Am = pb->
getAm()->getFunctor()->eval(args);
51 auto Cm = pb->
getCm()->getFunctor()->eval(args);
54 return res / (Am * Cm);
120 "__power_supply capaChargeFunc UNKNOWN "
137 auto dico = spb->getFunctionDictionary();
138 dico->deleteTensor(
"physCoeffSigma");
141 dico->add(
"physCoeffSigma",
"OPERATOR sigma_i + sigma_e");
142 spb->setOutputFileBase(spb->getOutputFileBase() +
"_elec_field");
143 spb->initializeEquation();
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
float CepsReal
Need single precision floating point.
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.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > m_errors
Will store Linf, L1 and L2 relative errors.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors() const
Gets the currently computed errors. First index selects absolute(0) or relative(1) second index selec...
void getInitialCondition(DHVecPtr v) const override
asks each ionic model to fill the parts of the Vm vector with its initial value, fill ue with same va...
CepsString m_sigmaIOptions
Options for intracellular conductivity.
CepsString m_sigmaEOptions
Options for extracellulat conductivity.
const CepsSet< CepsAttribute > & getTissueAttributes() const
All attributes that localize tissue.
ScalarField< DegreeOfFreedom > * getCm() const
Link to Cm coefficient.
void initializeEquation() override
Initializes all the elements of the PDE from options.
ScalarField< DegreeOfFreedom > * getAm() const
Link to Am coefficient.
void defineSourceTerms() override
For cardiac problem, only calls initializeStimulation. Can be overriden.
void solve() override
Performs all iterations of the PDE solver.
Profiler * getProfiler() const
Access to profiler.
Bidomain equation with extracardiac medium main class.
CepsSet< CepsAttribute > getWholeDomainAttributes() const
Get all attributes: tissue and extracardiac.
CepsString m_biElecStimOpts
Anodal and cathodal stimulation parameters, disabled if empty.
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.
ParallelRCElectrode * getCathode() const
Ptr to cathode object.
ParallelRCElectrode * getAnode() const
Ptr to anode object.
PowerSupply(PacemakerBidomainProblem *problem)
constructor
CepsReal eval(CepsStandardArgs args) final
Evaluation function.
Bidomain equation with extracardiac medium and connected to a pacemaker main class.
CepsSet< CepsAttribute > getAnodeAttributes() const override
Get cathode attributes if set.
void setupWithParameters(InputParameters *params) override
Sets options from the parameters.
Unknown * getUAnodeUnknown() const override
Link to the Up unknown of the problem.
void defineSourceTerms() override
Define the source terms.
Unknown * getVCetsUnknown() const override
Link to the VCets unknown of the problem.
Unknown * getUCathodeUnknown() const override
Link to the Um unknown of the problem.
CepsSet< CepsAttribute > getCathodeAttributes() const override
Get cathode attributes if set.
PacemakerBidomainProblem(Geometry *g, InputParameters *=nullptr)
Constructor from geometry and possibly parameters.
Unknown * getVCtsUnknown() const override
Link to the VCts unknown of the problem.
void defineUnknowns() override
Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker.
void defineBoundaryConditions() override
Define the boundary conditions.
void run() override
Run the simulation.
void getInitialCondition(DHVecPtr v0) const override
Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim.
Solves pacemaker bidomain 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 * VCts
Voltage on reserve capacitor.
static constexpr const char * ue
Extracellular and extracardiac potential.
static constexpr const char * UCathode
Potential of cathode (device side)
static constexpr const char * VCets
Voltage on tank capacitor.
static constexpr const char * UAnode
Potential of anode (device side)
static constexpr const char * vm
Transmebrane voltage.