CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
ExtendedButcherTableau.hh
Go to the documentation of this file.
1#ifndef _ExtendedButcherTableau_h_
2#define _ExtendedButcherTableau_h_
3// This class defines a ExtendedButcher Tableau, which completely specifies
4// an *embedded* Runge-Kutte integration scheme. ExtendedButcher Tableau
5// are described in Numerical Methods for Ordinary Differential Equations,
6// John Wiley & sons, West Sussex England.
7//
8// General form is :
9//
10// c|A
11// ---
12// |b^T
13// |bHat^T
14//
15// where A is a matrix and b, bHat, and c are column vectors.
16//
17// The ExtendedButcher Tableau Class presents itself as an empty structure
18// that the user has to fill up. One can blithely fill write into
19// any element of A, b, bHat or c. Space is automatically allocated.
20
21#include <vector>
22#include <string>
23namespace Genfun {
25
26 public:
27
28 // Constructor:
29 inline ExtendedButcherTableau(const std::string &name, unsigned int order, unsigned int orderHat);
30
31 // Returns the name:
32 inline const std::string & name() const;
33
34 // Returns the order of the main formula
35 inline unsigned int order() const;
36
37 // Returns the order of the controlling formula
38 inline unsigned int orderHat() const;
39
40 // Returns the number of steps:
41 inline unsigned int nSteps() const;
42
43 // Write access to elements:
44 inline double & A(unsigned int i, unsigned int j);
45 inline double & b(unsigned int i);
46 inline double & bHat(unsigned int i);
47 inline double & c(unsigned int i);
48
49 // Read access to elements (inline for speed)
50 inline const double & A(unsigned int i, unsigned int j) const;
51 inline const double & b(unsigned int i) const;
52 inline const double & bHat(unsigned int i) const;
53 inline const double & c(unsigned int i) const;
54
55
56 private:
57
58 std::vector< std::vector<double> > _A;
59 std::vector<double> _b;
60 std::vector<double> _bHat;
61 std::vector<double> _c;
62 std::string _name;
63 unsigned int _order;
64 unsigned int _orderHat;
65
66 };
67
68
70 // Constructor:
71 public:
73 };
74
76 // Constructor:
77 public:
79 };
80
82 // Constructor:
83 public:
85 };
86
88 // Constructor:
89 public:
91 };
92
93}
94
95inline std::ostream & operator << (std::ostream & o, const Genfun::ExtendedButcherTableau & b);
96
97
98#include "CLHEP/GenericFunctions/ExtendedButcherTableau.icc"
99
100#endif
std::ostream & operator<<(std::ostream &o, const Genfun::ExtendedButcherTableau &b)
const std::string & name() const
unsigned int nSteps() const
const double & c(unsigned int i) const
double & c(unsigned int i)
ExtendedButcherTableau(const std::string &name, unsigned int order, unsigned int orderHat)
unsigned int orderHat() const
double & A(unsigned int i, unsigned int j)
double & bHat(unsigned int i)
unsigned int order() const
const double & b(unsigned int i) const
double & b(unsigned int i)
const double & A(unsigned int i, unsigned int j) const
const double & bHat(unsigned int i) const
Definition: Abs.hh:14