std::basic_string< CepsChar > CepsString
C++ format string.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
Abstract Class for all numerical method (FE, FD, FV etc)
Represents a ionic model for a group of cells, i.e. multiple systems of ODEs.
Groups two ODE solvers for ionic variables and interacts with cardiac problem.
CepsUInt m_size
Number of dofs for this solver.
CepsReal * m_y
Values of state variables.
CepsVector< CepsIndex > m_localToGlobal
Mapping between local index of dof and index in PDE.
void computeModelRates(CepsReal t, CepsReal *y)
Computes the evolution function and ionic current on all dofs, calls the model.
CepsBool m_tauOk
Flag to avoid to compute tau and winf twice per iteration.
CepsReal * m_dtv
Total ionic current.
void fillPdeVm(DHVecPtr vPde) const
Fills the linked PDE vector for vm with current values of m_v. Can be used to get initial condition.
CepsUInt getNbMultiSteps() const
Number of multi steps of the inner solver.
AbstractIonicModel * m_model
Link to ionic model equations.
void computeRatesLin(CepsReal t, CepsReal *w, CepsReal *dtw, CepsUInt n)
Call the linear part of evolution function of the model.
void createSolvers(CepsString opts)
Instantiates ODE solvers from options.
~IonicSolver()
Destructor.
CepsReal * m_v
Transmembrane voltage.
void addDtv(DHVecPtr dtv, CepsReal t=0) const
Fills the given distributed vector with values of ionic current from ODE system. Does the unit conver...
void takeOneSubStep(CepsReal t, CepsReal dt, DHVecPtr vPde)
Advance the ODE system by one sub step (for RK solvers)
CepsReal * m_dtyLin
Linear part of rates.
CepsReal * getStates() const
Get pointer on state vars for testing purposes.
DHVecPtr * m_vPde
Pointer on pointer with v data from the PDE.
CepsReal * getDtv() const
Get pointer on ionic current for testing purposes.
AbstractOdeSolver * m_solver
internal ODE solver
CepsReal * m_dtyNLin
Non-linear part of rates.
void takeOneStep(CepsReal t, CepsReal dt, DHVecPtr vPde)
Advance the ODE system by one full step each (not substep)
void computeIndexMapping()
Sets the map from instance-local indices of points to global indices, then allocates arrays and sets ...
IonicSolver(CepsString opts, AbstractIonicModel *m, AbstractDiscretization *discr)
Constructor with parameters from input file and ionic model to be linked with The constructor also se...
CepsReal getVm(CepsBool convert) const
Get TMV for testing purposes.
void setActionPotential(DHVecPtr vPde)
Copies values of TMV from PDE vector to local array. Call this method prior to takeOneStep or takeOne...
EvolFunction * m_fNLin
Evolution function (non linear part winf/tau + others)
void initializeSolver()
Set the initial conditions and required intermediate arrays of the ODE solvers.
void computeRatesNonLin(CepsReal t, CepsReal *w, CepsReal *dtw, CepsUInt n)
Get the non linear part of evolution function of the model.
AbstractDiscretization * m_sDiscr
Link to spatial discretization.
EvolFunction * m_fLin
Evolution function (linear part -1/tau)
function caller : abstract base, only contains an variadic operator()