8 throw cms::Exception(
"In PadeTableODE constructor: Pade table row number out of range");
10 throw cms::Exception(
"In PadeTableODE constructor: Pade table column number out of range");
14 const double currentIn,
19 const unsigned firstNode,
22 if (lenX < firstNode +
col_)
23 throw cms::Exception(
"In PadeTableODE::calculate: insufficient number of variables");
25 throw cms::Exception(
"In PadeTableODE::calculate: delay time is not positive");
33 derivative[firstNode] = 0.0;
36 derivative[firstNode] += 0.5 * tau * tau * d2Id2t;
39 derivative[firstNode] -= tau * dIdt;
42 derivative[firstNode] += currentIn;
54 derivative[firstNode] = (currentIn - x[firstNode]) / tau;
58 derivative[firstNode] = 2.0 * (currentIn - x[firstNode]) / tau - dIdt;
62 derivative[firstNode] = 3.0 * (currentIn - x[firstNode]) / tau - 2.0 * dIdt + 0.5 * tau * d2Id2t;
72 derivative[firstNode] = x[firstNode + 1];
75 derivative[firstNode + 1] = 2.0 * (currentIn - x[firstNode] - tau * x[firstNode + 1]) / tau / tau;
79 derivative[firstNode + 1] =
80 (6.0 * (currentIn - x[firstNode]) - 2.0 * tau * dIdt - 4.0 * tau * x[firstNode + 1]) / tau /
tau;
84 derivative[firstNode + 1] =
85 12.0 * (currentIn - x[firstNode]) / tau / tau - 6.0 * (x[firstNode + 1] + dIdt) / tau + d2Id2t;
95 derivative[firstNode] = x[firstNode + 1];
96 derivative[firstNode + 1] = x[firstNode + 2];
99 derivative[firstNode + 2] =
100 6.0 * (currentIn - x[firstNode] - tau * x[firstNode + 1] - 0.5 * tau * tau * x[firstNode + 2]) / tau /
105 derivative[firstNode + 2] = 24.0 / tau / tau / tau *
106 (currentIn - x[firstNode] - 0.25 * tau * dIdt - 0.75 * tau * x[firstNode + 1] -
107 0.25 * tau * tau * x[firstNode + 2]);
111 derivative[firstNode + 2] = 60.0 / tau / tau / tau *
112 (currentIn - x[firstNode] - 0.4 * tau * dIdt + 0.05 * tau * tau * d2Id2t -
113 0.6 * tau * x[firstNode + 1] - 0.15 * tau * tau * x[firstNode + 2]);
Derivative< X, A >::type derivative(const A &_)
void setParameters(const double *pars, unsigned nPars)
PadeTableODE(unsigned padeRow, unsigned padeColumn)
void calculate(double tau, double inputCurrent, double dIdt, double d2Id2t, const double *x, unsigned lenX, unsigned firstNode, double *derivative) const