libode
Easy to compile, fast ODE integrators as C++ classes
Loading...
Searching...
No Matches
ode_rosenbrock.h
Go to the documentation of this file.
1#ifndef ODE_ROSENBROCK_H_
2#define ODE_ROSENBROCK_H_
3
5
6#include "ode_linalg.h"
7
8namespace ode {
9
12
13 public:
15
19 OdeRosenbrock (unsigned long neq, int nk);
22
23 protected:
25 double gam;
27 int *p_;
29 double *rhs_;
31 double *soltemp_;
33 double **k_;
35
41 void prep_jac (double **Jac, unsigned long n, double dt, int *p);
42
43 private:
44 //number of stages
45 int nk_;
46};
47
48} // namespace ode
49
50#endif
Base class for Rosenbrock methods.
void prep_jac(double **Jac, unsigned long n, double dt, int *p)
do necessary arithmetic with the Jacobian then lu factor it
int * p_
permutation array for LU factorization
OdeRosenbrock(unsigned long neq, int nk)
constructs
double ** k_
stage derivatives
double * soltemp_
temporary sol vector
~OdeRosenbrock()
destructs
double * rhs_
right hand side of matrix equations
double gam
parameter multipying Jacobian or single diagonal gamma