15 c3 = 1.0/2; a32 = 1.0/2;
17 b1 = 1.0/6; b2 = 1.0/3; b3 = 1.0/3; b4 = 1.0/6;
20void OdeRK4::step_ (
double dt) {
40 for (i=0; i<
neq_; i++)
sol_[i] += dt*(b1*
k_[0][i]
Base class implementing solver functions with adaptive time steps.
unsigned long neq_
number of equations in the system of ODEs
std::string method_
the "name" of the solver/method, as in "Euler" or "RK4"
double * sol_
array for the solution, changing over time
void ode_fun_(double *solin, double *fout)
wrapper, calls ode_fun() and increases the neval counter by one
Base class providing space for temporary solutions moving through RK stages.
double * soltemp_
temporary solution vector
OdeRK4(unsigned long neq)
constructs
Provides space for stage slope values, an array of arrays for k values.
double ** k_
stage evaluations