CEPS  24.01
Cardiac ElectroPhysiology Simulator
PacemakerPoissonProblem Class Reference

Detailed Description

Bidomain equation with extracardiac medium and connected to a pacemaker main class.

Definition at line 38 of file PacemakerPoissonProblem.hpp.

#include <PacemakerPoissonProblem.hpp>

Inheritance diagram for PacemakerPoissonProblem:
[legend]

Data Structures

class  PowerSupply
 Power source function. More...
 
struct  UnknownsName
 Struct for all names of unknowns. More...
 

Public Member Functions

 PacemakerPoissonProblem (Geometry *g, InputParameters *=nullptr)
 Constructor from geometry and possibly parameters. More...
 
virtual ~PacemakerPoissonProblem ()=default
 Destructor. More...
 
void getInitialCondition (DHVecPtr v0) const override
 Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim. More...
 
void defineUnknowns () override
 Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker. More...
 
void defineBoundaryConditions () override
 Define the boundary conditions. More...
 
void defineSourceTerms () override
 Define the source terms. More...
 
void run () override
 Run the simulation. More...
 
CepsSet< CepsAttributegetAnodeAttributes () const
 Get cathode attributes if set. More...
 
CepsSet< CepsAttributegetCathodeAttributes () const
 Get cathode attributes if set. More...
 
UnknowngetUFieldUnknown () const
 Link to the u unknown of the problem. More...
 
UnknowngetUAnodeUnknown () const override
 Link to the Up unknown of the problem. More...
 
UnknowngetUCathodeUnknown () const override
 Link to the Um unknown of the problem. More...
 
UnknowngetVCetsUnknown () const override
 Link to the VCets unknown of the problem. More...
 
UnknowngetVCtsUnknown () const override
 Link to the VCts unknown of the problem. More...
 
- Public Member Functions inherited from HeatProblem
 HeatProblem (Geometry *g, InputParameters *p=nullptr, const CepsMathTensor &k=CepsMathTensor::Identity())
 Constructor from geometry and optional input file. More...
 
 ~HeatProblem () override
 Destructor. More...
 
void setupWithParameters (InputParameters *params) override
 Set attributes from input file. Parameters are passed as arguments in case one wants to use other parameters. More...
 
void defineUnknowns () override
 Lists the unknowns of the problem (one here) More...
 
void defineSourceTerms () override
 Lists the unknowns of the problem (one here) More...
 
virtual CepsMathTensor getDiffusionTensor (Unknown *u=nullptr) const
 Diffusion tensor. More...
 
void run () override
 Computes the solution. More...
 
- Public Member Functions inherited from AbstractTimedPdeProblem
 AbstractTimedPdeProblem (Geometry *geom, InputParameters *params=nullptr)
 Constructor with geometry and optional parameters. More...
 
CepsReal getStartTime () const override
 pde start time More...
 
CepsReal getEndTime () const override
 pde end time More...
 
CepsReal getTimeStep () const
 pde time step More...
 
void setTimes (CepsReal tStart, CepsReal tEnd, CepsReal dt)
 Define the start and end times, also time step. More...
 
CepsReal getSnapshotTime () const override
 Periodicity of outputs, in time units. More...
 
void setSnapshotTime (CepsReal st)
 Periodicity of outputs, in time units. More...
 
virtual void defineInitialCondition ()
 Sets the pointer on function for initial guess. Here it is set to nullptr, so it will be 0. More...
 
void initializeEquation () override
 Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method should be called at the start of run() methods. More...
 
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors () const
 Get the errors. More...
 
CepsBool canComputeErrorAtTime (CepsReal t) const
 Tells if either analytic solution or reference solution has a snapshot at time t. More...
 
- Public Member Functions inherited from AbstractPdeProblem
 AbstractPdeProblem (Geometry *geom, InputParameters *params=nullptr)
 Constructor with geometry and optional parameters. More...
 
virtual ~AbstractPdeProblem ()
 destructor More...
 
 AbstractPdeProblem (const AbstractPdeProblem &that)=delete
 No copy constructor. More...
 
AbstractPdeProblemoperator= (const AbstractPdeProblem &that)=delete
 No assignment operator. More...
 
InputParametersgetParameters () const
 Text parameters. More...
 
void setProblemName (const CepsString &name)
 Set the name of the problem. More...
 
CepsString getProblemName () const
 Get the name of the problem. More...
 
GeometrygetGeometry () const
 Link to geometry on which the pb is defined. More...
 
AbstractDiscretizationgetSpatialDiscretization () const
 Link to the spatial discretization (FE, FV, etc) More...
 
void setSpatialDiscretization (AbstractDiscretization *discr)
 Link to the spatial discretization (FE, FV, etc) More...
 
void createSpatialDiscretization ()
 Compute the discretization structure. More...
 
const CepsVector< Unknown * > & getUnknowns () const
 List of unknowns of the pb. More...
 
UnknowngetUnknown (const CepsString &label) const
 Get an unknown by its name. More...
 
UnknowngetUnknown (CepsUnknownIndex uid) const
 Get an unknown by its id. More...
 
CepsVector< Unknown * > getSpatialUnknowns () const
 A vector of all unknowns of pb defined on cells or points. More...
 
CepsVector< Unknown * > getZeroDUnknowns () const
 A vector of all zeroD unknowns of the pb. More...
 
const CepsVector< UnknownInteraction * > & getUnknownsInteractions () const
 All the interactions between unknowns. More...
 
CepsBool unknownsInteract (Unknown *u1, Unknown *u2, const CepsSet< CepsAttribute > &attrs={CepsUniversal}) const
 Tells if unknowns interact on an entity with attributes. More...
 
CepsBool ignoreZeroDUnknownsForError () const
 Tells if 0D must not be taken into account in error computation. More...
 
CepsBool hasAnalyticSolution () const
 Tells if there is an analytic or reference solution. More...
 
ScalarFunctiongetAnalyticSolution () const
 Pointer on analytic or refScalarFunction solution. More...
 
virtual void defineAnalyticSolution ()
 Set directly the analytic function, default sets no solution, unless there is a collection of reference solution files, provided at init or from parameters. More...
 
void setReferenceSolution (const CepsString &baseFiles, CepsReal snapDt)
 Externally define the referece solution from files. Can be used for convergence tests. More...
 
CepsBool usesReferenceSolution () const
 Tells if analytic solution and if it is loaded from files. More...
 
CepsReal getReferenceSolutionOutputPeriod () const
 Output dt of reference. More...
 
FunctionDictionarygetFunctionDictionary () const
 Get functions manager. More...
 
void setFunctionDictionary (FunctionDictionary *)
 Set functions manager. More...
 
BoundaryConditionManagergetBoundaryConditionManager () const
 Get boundary condition manager. More...
 
void setBoundaryConditionManager (BoundaryConditionManager *bcm)
 Set boundary condition manager. More...
 
SourceTermManagergetSourceTermManager () const
 Get boundary condition manager. More...
 
void setSourceTermManager (SourceTermManager *stm)
 Set boundary condition manager. More...
 
CepsString getOutputFileBase () const
 Output file name includes the directory. More...
 
void setOutputFileBase (CepsString fileName)
 Output file name includes the directory. More...
 
CepsOutputFormat getOutputFormat () const
 Tells if output is binary or ascii. More...
 
void setOutputFormat (CepsOutputFormat opt)
 Enable/disable binary output. More...
 
CepsBool writesGlobalIndices () const
 Tells if global indices are written on top of solution. More...
 
void writeGlobalIndices (CepsBool opt)
 Activate/deactivate global indices writing. More...
 
CepsVector< CepsReal3DgetProbePoints () const
 Returns points where single data output should be written. More...
 
- Public Member Functions inherited from CepsObject
 CepsObject ()=default
 default constructor More...
 
 CepsObject (const CepsObject &)=default
 Copy constructor. More...
 
virtual ~CepsObject ()=default
 Destructor. More...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () const
 Access to profiler. More...
 
- Public Member Functions inherited from AbstractPacemakerProblem
 AbstractPacemakerProblem (Geometry *g, InputParameters *params=nullptr)
 Constructor with geometry and parameters. More...
 
virtual ~AbstractPacemakerProblem ()=default
 Destructor. More...
 
void setStimulation (CepsReal amplitude, CepsReal duration)
 Set the parameters of the stimulation. More...
 
void setStimulationAmplitude (CepsReal amplitude)
 Set the amplitude of the stimulation. More...
 
CepsReal getStimulationAmplitude () const
 Get the stimulation amplitude. More...
 
void setStimulationDuration (CepsReal duration)
 Set the duration of the stimulation. More...
 
CepsReal getStimulationDuration () const
 Get the stimulation duration. More...
 
CepsReal getStimulationPeriod () const
 Get the stimulation period. More...
 
CepsPacemakerPhase getPhase (CepsReal t) const
 Get the phase id of pacemaker cycle. More...
 
CepsBool isRechargingPhase (CepsReal t) const
 Tells if the phase is a rehcarging phase. More...
 
CepsReal getRelativeTimeOnPhase (CepsReal t) const
 Get the relative time of this pacemaker cycle step. More...
 
CepsReal getPacemakerDuration (CepsPacemakerPhase phase) const
 Get the duration of a phase. More...
 
CepsReal getPacemakerCapacitance (CepsReal t) const
 Get the equivalent capacitance of the pacemaker. More...
 
CepsReal getPacemakerCapacitanceCets (CepsReal t) const
 Get the capacitance associated to the main capacitor of the device. More...
 
CepsReal getPacemakerCapacitanceCts (CepsReal t) const
 Get the capacitance associated to the second capacitor of the pacemaker. More...
 
CepsReal getPacemakerResistance (CepsReal t) const
 Get the equivalent resistance of the pacemaker. More...
 
CepsReal getPacemakerResistanceLittle (CepsReal t) const
 Get the resistance used in the recharge circuit of the Cets. More...
 
CepsReal getWireResistanceAnodeLine (CepsReal t) const
 Get the resistance used in to model the wire in anode line. More...
 
CepsReal getWireResistanceCathodeLine (CepsReal t) const
 Get the resistance used in to model the wire in cathode line. More...
 
void setPulseOnlyMode (CepsBool value)
 Set pacemaker in pulse only mode. More...
 
CepsBool isPulseOnlyMode () const
 Tells if the pacemaker is in pulse only mode. More...
 
void setupWithParameters (InputParameters *params)
 Sets options from the parameters. More...
 
void setupRunningProperties ()
 Sets running parameters like equivalent resistances and capacitances. More...
 
- Public Member Functions inherited from HoldsAnodeCathode< ParallelRCElectrode >
 HoldsAnodeCathode ()
 Default constructor. More...
 
 HoldsAnodeCathode (InputParameters *params, Geometry *geom=nullptr)
 Constructor with parameters, pass geometry to compute measures. More...
 
 HoldsAnodeCathode (const CepsSet< CepsAttribute > &anodeAttrs, const CepsSet< CepsAttribute > &cathodeAttrs, Geometry *geom=nullptr)
 Constructor with sets of attributes, pass geometry to compute measures. More...
 
virtual ~HoldsAnodeCathode ()
 Destructor. More...
 
CepsSet< CepsAttribute > & getAnodeAttributes () const
 Anode attributes. More...
 
CepsSet< CepsAttribute > & getCathodeAttributes () const
 Cathode attributes. More...
 
void setElectrodesAttributes (const CepsSet< CepsAttribute > &anodeAttrs, const CepsSet< CepsAttribute > &cathodeAttrs, Geometry *geom=nullptr)
 Sets the attributes. More...
 
ParallelRCElectrodegetAnode () const
 Ptr to anode object. More...
 
ParallelRCElectrodegetCathode () const
 Ptr to cathode object. More...
 

Protected Member Functions

void setupWithParameters (InputParameters *params) override
 Sets options from the parameters. More...
 
- Protected Member Functions inherited from AbstractPdeProblem
void addUnknown (const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
 Register a new unknown. More...
 
void addZeroDUnknown (CepsString label, const CepsString &unit="")
 Register a new unknown, defined outside of geometry. More...
 
void addUnknownInteraction (CepsString label1, CepsString label2, CepsSet< CepsAttribute > attrs={})
 Register interaction between unknowns. Also sets the interaction within Unknown instances label1 and label2. More...
 
- Protected Member Functions inherited from HoldsAnodeCathode< ParallelRCElectrode >
void checkCommonAttributes ()
 Check that anode and cathode do not share attributes. More...
 

Additional Inherited Members

- Public Types inherited from AbstractPdeProblem
using ScalarFunction = ceps::Function< CepsReal(CepsStandardArgs)>
 Typedef for analytic solution. More...
 
- Static Public Attributes inherited from AbstractTimedPdeProblem
static constexpr CepsBool isStatic = false
 Flag for static/timed. More...
 
- Protected Attributes inherited from HeatProblem
CepsMathTensor m_k
 Diffusion tensor. More...
 
- Protected Attributes inherited from AbstractTimedPdeProblem
CepsReal m_pdeStartTime
 Initial time. More...
 
CepsReal m_pdeEndTime
 End time. More...
 
CepsReal m_pdeTimeStep
 Time Step for the PDE. More...
 
CepsReal m_pdeSnapshotTime
 Periodicity of outputs. More...
 
ScalarFunctionm_initialCondition
 Function defining the initial condition, which is 0 if pointer is null. More...
 
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > m_errors
 Will store Linf, L1 and L2 relative errors. More...
 
- Protected Attributes inherited from AbstractPdeProblem
CepsString m_name
 Name of the problem. More...
 
Geometrym_geom
 Link to geometry on which the pb is defined. More...
 
InputParametersm_parameters
 Input file data. More...
 
AbstractDiscretizationm_discr
 Discretization method (eg FE for now) More...
 
CepsBool m_ownedDiscr
 True if instance used new to create discretization. More...
 
CepsVector< Unknown * > m_unknowns
 All maths unknowns of the problem. More...
 
CepsVector< UnknownInteraction * > m_unknownsInteractions
 Describes how unknowns interact. More...
 
ScalarFunctionm_analyticSolution
 analytic or reference solution More...
 
CepsBool m_ownedRefSol
 Flag for reference ownership. More...
 
CepsString m_refSolFiles
 base name of reference solution file, if any More...
 
CepsReal m_refSolSnapDt
 reference solution output period More...
 
FunctionDictionarym_functions
 Collection of custom functions. More...
 
BoundaryConditionManagerm_boundaryConditions
 All BCs should be there. More...
 
SourceTermManagerm_sourceTerms
 All source terms. More...
 
CepsBool m_ownedFunctions
 True if instance used new to create dictionary. More...
 
CepsBool m_ownedBCs
 True if instance used new to create BC manager. More...
 
CepsBool m_ownedSrcs
 True if instance used new to create src term manager. More...
 
CepsString m_outputFileBase
 File names prefix. More...
 
CepsOutputFormat m_outputFormat
 Output format selector. More...
 
CepsBool m_writeGlobalIDs
 Writes CEPS indices as well. More...
 
CepsVector< CepsReal3Dm_probePoints
 Single point data outputs. More...
 
CepsBool m_ignoreZeroDError
 Ignore 0D unknowns when computing errors. More...
 
- Protected Attributes inherited from AbstractPacemakerProblem
CepsReal m_stimAmplitude
 Amplitude of the stim [mV]. More...
 
CepsReal m_stimDuration
 Duration of the stim [ms]. More...
 
CepsBool m_pmkPulseOnlyMode
 Pulse only mode. More...
 
CepsReal m_pmkOffset
 Offset duration [ms]. More...
 
CepsReal m_pmkPeriod
 Period duration [ms], default 90bpm. More...
 
CepsReal m_pmkSwitch
 Switch duration [ms]. More...
 
CepsReal m_pmkOcd
 OCD duration [ms]. More...
 
CepsUInt m_pmkNSpikes
 Number of spikes to do. More...
 
CepsReal m_pmkCets
 CETS capacitance [uF]. More...
 
CepsReal m_pmkCts
 CTS capacitance [uF]. More...
 
CepsReal m_pmkRgnd
 GROUND resistance [kOhm]. More...
 
CepsReal m_pmkRpulse
 PULSE resistance [kOhm]. More...
 
CepsReal m_pmkRwa
 ANODE WIRE resistance [kOhm]. More...
 
CepsReal m_pmkRwc
 CATHODE WIRE resistance [kOhm]. More...
 
CepsReal m_pmkRbig
 BIG resistance [kOhm] during the waiting phase. More...
 
CepsReal m_pmkRlittle
 LITTLE resistance [kOhm] used to recharge the CETS. More...
 
CepsArray< CepsReal, CepsPacemakerPhaseSizem_pmkC
 All equivalent capacitances depending on phase [uF]. More...
 
CepsArray< CepsReal, CepsPacemakerPhaseSizem_pmkR
 All equivalent resistances depending on phase [kOhm]. More...
 
- Protected Attributes inherited from HoldsAnodeCathode< ParallelRCElectrode >
ParallelRCElectrodem_anode
 Electrode object. More...
 
ParallelRCElectrodem_cathode
 Electrode object. More...
 
- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ PacemakerPoissonProblem()

PacemakerPoissonProblem::PacemakerPoissonProblem ( Geometry g,
InputParameters params = nullptr 
)
explicit

Constructor from geometry and possibly parameters.

Definition at line 52 of file PacemakerPoissonProblem.cpp.

◆ ~PacemakerPoissonProblem()

virtual PacemakerPoissonProblem::~PacemakerPoissonProblem ( )
virtualdefault

Destructor.

Member Function Documentation

◆ defineBoundaryConditions()

void PacemakerPoissonProblem::defineBoundaryConditions ( )
overridevirtual

Define the boundary conditions.

Reimplemented from AbstractPdeProblem.

Definition at line 102 of file PacemakerPoissonProblem.cpp.

◆ defineSourceTerms()

void PacemakerPoissonProblem::defineSourceTerms ( )
overridevirtual

Define the source terms.

Reimplemented from AbstractPdeProblem.

Definition at line 106 of file PacemakerPoissonProblem.cpp.

◆ defineUnknowns()

void PacemakerPoissonProblem::defineUnknowns ( )
overridevirtual

Transmembrane voltage (mV), Extracellular potential (mV) and both potential of the pacemaker.

Implements AbstractPdeProblem.

Definition at line 78 of file PacemakerPoissonProblem.cpp.

◆ getAnodeAttributes()

CepsSet< CepsAttribute > PacemakerPoissonProblem::getAnodeAttributes ( ) const

Get cathode attributes if set.

Definition at line 151 of file PacemakerPoissonProblem.cpp.

◆ getCathodeAttributes()

CepsSet< CepsAttribute > PacemakerPoissonProblem::getCathodeAttributes ( ) const

Get cathode attributes if set.

Definition at line 157 of file PacemakerPoissonProblem.cpp.

◆ getInitialCondition()

void PacemakerPoissonProblem::getInitialCondition ( DHVecPtr  v0) const
overridevirtual

Zero and fill with initial conditions for vm and ue, and put QCets to Cets*AmpStim.

Reimplemented from AbstractTimedPdeProblem.

Definition at line 63 of file PacemakerPoissonProblem.cpp.

◆ getUAnodeUnknown()

Unknown * PacemakerPoissonProblem::getUAnodeUnknown ( ) const
overridevirtual

Link to the Up unknown of the problem.

Implements AbstractPacemakerProblem.

Definition at line 169 of file PacemakerPoissonProblem.cpp.

◆ getUCathodeUnknown()

Unknown * PacemakerPoissonProblem::getUCathodeUnknown ( ) const
overridevirtual

Link to the Um unknown of the problem.

Implements AbstractPacemakerProblem.

Definition at line 175 of file PacemakerPoissonProblem.cpp.

◆ getUFieldUnknown()

Unknown * PacemakerPoissonProblem::getUFieldUnknown ( ) const

Link to the u unknown of the problem.

Definition at line 163 of file PacemakerPoissonProblem.cpp.

◆ getVCetsUnknown()

Unknown * PacemakerPoissonProblem::getVCetsUnknown ( ) const
overridevirtual

Link to the VCets unknown of the problem.

Implements AbstractPacemakerProblem.

Definition at line 181 of file PacemakerPoissonProblem.cpp.

◆ getVCtsUnknown()

Unknown * PacemakerPoissonProblem::getVCtsUnknown ( ) const
overridevirtual

Link to the VCts unknown of the problem.

Implements AbstractPacemakerProblem.

Definition at line 187 of file PacemakerPoissonProblem.cpp.

◆ run()

void PacemakerPoissonProblem::run ( )
overridevirtual

Run the simulation.

Reimplemented from AbstractPdeProblem.

Definition at line 118 of file PacemakerPoissonProblem.cpp.

◆ setupWithParameters()

void PacemakerPoissonProblem::setupWithParameters ( InputParameters params)
overrideprotectedvirtual

Sets options from the parameters.

Reimplemented from AbstractPdeProblem.

Definition at line 193 of file PacemakerPoissonProblem.cpp.


The documentation for this class was generated from the following files: