libode
Easy to compile, fast ODE integrators as C++ classes
Loading...
Searching...
No Matches
ode_irk.cc
Go to the documentation of this file.
1
2
3#include "ode_irk.h"
4
5namespace ode {
6
7OdeIRK::OdeIRK (unsigned long neq, int nk) {
8
9 //store nk
10 nk_ = nk;
11 //make a single large vector for k values
12 kall_ = new double[neq*nk];
13 //assign the k_ values along the kall_ array
14 k_ = new double*[nk];
15 for (int i=0; i<nk; i++) k_[i] = kall_ + i*neq;
16}
17
19 delete [] k_;
20 delete [] kall_;
21}
22
23} // namespace ode
double ** k_
individual k arrays for each stage
Definition ode_irk.h:25
~OdeIRK()
destructs
Definition ode_irk.cc:18
OdeIRK(unsigned long neq, int nk)
constructs
Definition ode_irk.cc:7
int nk_
number of RK stages
Definition ode_irk.h:21
double * kall_
pointer to single array storing all stage k values
Definition ode_irk.h:23