libode
Easy to compile, fast ODE integrators as C++ classes
Loading...
Searching...
No Matches
ode_rk.cc
Go to the documentation of this file.
1
2
3#include "ode_rk.h"
4
5namespace ode {
6
7OdeRK::OdeRK (unsigned long neq, int nk) {
8
9 //store number of stages
10 nk_ = nk;
11 //storage for k values of stages
12 k_ = new double*[nk];
13 for (int i=0; i<nk; i++) k_[i] = new double[neq];
14}
15
16//destructor
18 for (int i=0; i<nk_; i++) delete [] k_[i];
19 delete [] k_;
20}
21
22} // namespace ode
int nk_
number of stages, or k vectors
Definition ode_rk.h:25
~OdeRK()
destructs
Definition ode_rk.cc:17
double ** k_
stage evaluations
Definition ode_rk.h:23
OdeRK(unsigned long neq, int nk)
constructs
Definition ode_rk.cc:7