std::basic_string< CepsChar > CepsString
C++ format string.
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
Represents a ionic model for a group of cells, i.e. multiple systems of ODEs.
CepsReal gaussian(CepsReal x, CepsReal c, CepsReal s) const
Function often used in rates evaluations.
Unknown * getUnknown() const
The unknown object of the transmembrane voltage.
IonicSolver * getLinkedSolver() const
Get link to solver.
IonicSolver * m_solver
Link to solver, set when solver is created.
CepsReal m_paperStim
Original stim amplitude.
ScalarField< DegreeOfFreedom > * m_cm
Link to coef Cm of the PDE, for unit conversion.
virtual CepsReal convertDtvToCepsUnit(const CepsReal &dtv) const
Convert current from ionic model units to ceps units (mV ms-1). Does nothing by default.
ScalarField< DegreeOfFreedom > * getCm() const
Link to Cm coefficient of PDE.
virtual void computeRates(CepsReal t, CepsReal *y, CepsReal *v, CepsReal *dtyL, CepsReal *dtyNL, CepsReal *dtv, DegreeOfFreedom *dof) const =0
Get the linear and non linear part of the evolution function f. Also computes the ionic current.
CepsString getName() const
Name of the solver for info display.
virtual CepsReal convertCmFromCepsUnit(const CepsReal &cm) const
Convert capacitance from ceps units (uF/cm2) to ionic model units. Does nothing by default.
CepsReal * m_dconstants
Constant parameters of the model, computed from others.
CepsUInt m_nStateVars
Dimensionality of the ODE system, -1 for vm.
virtual CepsReal convertCurrentFromCepsUnit(const CepsReal &i) const
Convert current from ionic model units to ceps units (uA per cm2). Does nothing by default.
virtual CepsReal convertCmToCepsUnit(const CepsReal &cm) const
Convert capacitance from ionic model units to ceps units (uF/cm2). Does nothing by default.
CepsReal * m_constants
Constant parameters of the model, from inputs.
virtual CepsUInt getNbStateVariables() const
The number of state variables, except transmembrane voltage.
AbstractIonicModel(Unknown *u, const CepsSet< CepsAttribute > &attrs={})
Called only by derived classes.
CepsReal getStimulation(DegreeOfFreedom *x, CepsReal t) const
Get the sum of all stimulations at time t and dof x.
CepsReal uOverExpm1u(CepsReal u) const
Functions u/(1-exp(u)) that returns 2 (from expansion around 0)
CepsVector< CepsString > m_stateVarNames
Names of state variables.
virtual CepsReal convertVoltageToCepsUnit(const CepsReal &v) const
Convert voltage from ionic model units to ceps units (mV). Does nothing by default.
CepsReal getCmInternal(CepsReal t, DegreeOfFreedom *dof) const
Get either the value of cm on dof, or the default value from the paper.
CepsReal getPaperStim() const
Get the original amplitude of stimulation, converted into ceps units.
Unknown * m_unknown
Pointer on unknown on which the model applies.
virtual ~AbstractIonicModel()
Destructor.
void addStimulation(ScalarSourceTerm *stim)
Links the model to a stimulation function, needed for computation of _ki.
CepsReal getPaperCm(CepsBool cepsUnit) const
Get the original value of Cm used in paper.
CepsVector< ScalarSourceTerm * > m_stims
Link to excitations.
void setCm(ScalarField< DegreeOfFreedom > *)
Link to Cm coefficient of PDE.
CepsString getStateVariableName(CepsUInt i) const
Gives the name of the i-th state variable.
virtual CepsReal convertVoltageFromCepsUnit(const CepsReal &v) const
Convert voltage from ceps units (mV) to ionic model units. Does nothing by default.
CepsReal m_paperCm
Original value of Cm.
CepsReal sigmoid(CepsReal x, CepsReal c, CepsReal k) const
Function often used in rates evaluations.
virtual void getInitialCondition(CepsReal *v, CepsReal *y) const =0
Sets initial values of state variables and transmembrane voltage for a single point....
CepsString m_name
A label for display.
void setLinkedSolver(IonicSolver *solver)
Links instance to solver.
A degree of freedom for any kind of problem The dof can be associated to a geometrical element or not...
A Field is an object wrapped around a SAFunc functor, defined on at least one domain.
Groups two ODE solvers for ionic variables and interacts with cardiac problem.
Source term, essentially a ScalarField.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
An abstract class from which all objects that contain region attributes should derive.