svMultiPhysics
Loading...
Searching...
No Matches
CepModFn.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef CEP_MOD_FN_H
5#define CEP_MOD_FN_H
6
7#include "Array.h"
8#include "Vector.h"
9
10/// @brief This module defines data structures for Fitzhugh-Nagumo cellular
11/// activation model for cardiac electrophysiology.
12///
13/// The classes defined here duplicate the data structures in the Fortran FNMOD module defined in CEPMOD_FN.f
14/// and PARAMS_FN.f files.
16{
17 public:
18 CepModFn();
19 ~CepModFn();
20
21 // Scaling factors
22 /// Voltage scaling
23 double Vscale = 1.0;
24 /// Time scaling
25 double Tscale = 1.0;
26 /// Voltage offset parameter
27 double Voffset = 0.0;
28
29 /// Model parameters
30 double alpha = -0.50;
31 double a = 0.0;
32 double b = -0.60;
33 double c = 50.0;
34
35 void getf(const int n, const Vector<double>& X, Vector<double>& f, const double fext);
36 void getj(const int n, const Vector<double>& X, Array<double>& JAC);
37
38 void init(const int nX, Vector<double> &X);
39 void init(const int nX, Vector<double> &X, double X0);
40 void init(const int nX, Vector<double> &X, Vector<double>& X0);
41
42 void integ_cn2(const int nX, Vector<double>& Xn, const double Ts, const double Ti, const double Istim,
43 Vector<int>& IPAR, Vector<double>& RPAR);
44 void integ_fe(const int nX, Vector<double>& X, const double Ts, const double Ti, const double Istim);
45 void integ_rk(const int nX, Vector<double>& X, const double Ts, const double Ti, const double Istim);
46
47};
48
49#endif
50
This module defines data structures for Fitzhugh-Nagumo cellular activation model for cardiac electro...
Definition CepModFn.h:16
double Tscale
Time scaling.
Definition CepModFn.h:25
double Vscale
Voltage scaling.
Definition CepModFn.h:23
double alpha
Model parameters.
Definition CepModFn.h:30
void init(const int nX, Vector< double > &X)
SUBROUTINE FN_INIT0(nX, X)
Definition CepModFn.cpp:37
void integ_cn2(const int nX, Vector< double > &Xn, const double Ts, const double Ti, const double Istim, Vector< int > &IPAR, Vector< double > &RPAR)
Time integration performed using Crank-Nicholson method.
Definition CepModFn.cpp:55
double Voffset
Voltage offset parameter.
Definition CepModFn.h:27
void integ_rk(const int nX, Vector< double > &X, const double Ts, const double Ti, const double Istim)
Time integration performed using 4th order Runge-Kutta method.
Definition CepModFn.cpp:131
void integ_fe(const int nX, Vector< double > &X, const double Ts, const double Ti, const double Istim)
Time integration performed using Forward Euler method.
Definition CepModFn.cpp:114
The Vector template class is used for storing int and double data.
Definition Vector.h:23