CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
GenericFunctions
CLHEP
GenericFunctions
CLHEP/GenericFunctions/ButcherTableau.hh
Go to the documentation of this file.
1
#ifndef _ButcherTableau_h_
2
#define _ButcherTableau_h_
3
// This class defines a Butcher Tableau, which completely specifies
4
// a Runge-Kutte integration scheme. Butcher Tableau are described
5
// in Numerical Methods for Ordinary Differential Equations, John
6
// Wiley & sons, West Sussex England.
7
//
8
// General form is :
9
//
10
// c|A
11
// ---
12
// |b^T
13
//
14
// where A is a matrix and b, c are column vectors.
15
//
16
// The Butcher Tableau Class presents itself as an empty structure
17
// that the user has to fill up. One can blithely fill write into
18
// any element of A, b, or c. Space is automatically allocated.
19
20
#include <vector>
21
#include <string>
22
namespace
Genfun
{
23
class
ButcherTableau
{
24
25
public
:
26
27
// Constructor:
28
inline
ButcherTableau
(
const
std::string &
name
,
unsigned
int
order
);
29
30
// Returns the name:
31
inline
const
std::string &
name
()
const
;
32
33
// Returns the order:
34
inline
unsigned
int
order
()
const
;
35
36
// Returns the number of steps:
37
inline
unsigned
int
nSteps
()
const
;
38
39
// Write access to elements:
40
inline
double
&
A
(
unsigned
int
i
,
unsigned
int
j
);
41
inline
double
&
b
(
unsigned
int
i
);
42
inline
double
&
c
(
unsigned
int
i
);
43
44
// Read access to elements (inline for speed)
45
inline
const
double
&
A
(
unsigned
int
i
,
unsigned
int
j
)
const
;
46
inline
const
double
&
b
(
unsigned
int
i
)
const
;
47
inline
const
double
&
c
(
unsigned
int
i
)
const
;
48
49
50
private
:
51
52
std::vector< std::vector<double> > _A;
53
std::vector<double> _b;
54
std::vector<double> _c;
55
std::string _name;
56
unsigned
int
_order;
57
};
58
59
60
class
EulerTableau
:
public
ButcherTableau
{
61
// Constructor:
62
public
:
63
inline
EulerTableau
();
64
};
65
66
class
MidpointTableau
:
public
ButcherTableau
{
67
// Constructor:
68
public
:
69
inline
MidpointTableau
();
70
};
71
72
class
TrapezoidTableau
:
public
ButcherTableau
{
73
// Constructor:
74
public
:
75
inline
TrapezoidTableau
();
76
};
77
78
class
RK31Tableau
:
public
ButcherTableau
{
79
// Constructor:
80
public
:
81
inline
RK31Tableau
();
82
};
83
84
class
RK32Tableau
:
public
ButcherTableau
{
85
// Constructor:
86
public
:
87
inline
RK32Tableau
();
88
};
89
90
class
ClassicalRungeKuttaTableau
:
public
ButcherTableau
{
91
// Constructor:
92
public
:
93
inline
ClassicalRungeKuttaTableau
();
94
};
95
96
class
ThreeEighthsRuleTableau
:
public
ButcherTableau
{
97
// Constructor:
98
public
:
99
inline
ThreeEighthsRuleTableau
();
100
};
101
102
}
103
104
inline
std::ostream &
operator <<
(std::ostream & o,
const
Genfun::ButcherTableau
&
b
);
105
106
107
#include "CLHEP/GenericFunctions/ButcherTableau.icc"
108
109
#endif
Genfun::MidpointTableau::MidpointTableau
MidpointTableau()
HepGeom::BasicVector3D::operator<<
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
Definition:
BasicVector3D.cc:108
Genfun::RK32Tableau::RK32Tableau
RK32Tableau()
Genfun::EulerTableau::EulerTableau
EulerTableau()
Genfun::ThreeEighthsRuleTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:96
Genfun::ClassicalRungeKuttaTableau::ClassicalRungeKuttaTableau
ClassicalRungeKuttaTableau()
Genfun::ButcherTableau::b
double & b(unsigned int i)
b
@ b
Definition:
testCategories.cc:125
Genfun::RK31Tableau::RK31Tableau
RK31Tableau()
Genfun::ButcherTableau::name
const std::string & name() const
Genfun::ButcherTableau::A
double & A(unsigned int i, unsigned int j)
Genfun::ThreeEighthsRuleTableau::ThreeEighthsRuleTableau
ThreeEighthsRuleTableau()
Genfun::ButcherTableau::c
double & c(unsigned int i)
Genfun::ClassicalRungeKuttaTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:90
Genfun::RK31Tableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:78
Genfun::ButcherTableau::order
unsigned int order() const
j
long j
Definition:
JamesRandomSeeding.txt:28
Genfun::TrapezoidTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:72
i
long i
Definition:
JamesRandomSeeding.txt:27
Genfun::EulerTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:60
Genfun::ButcherTableau::nSteps
unsigned int nSteps() const
Genfun::MidpointTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:66
Genfun::ButcherTableau::ButcherTableau
ButcherTableau(const std::string &name, unsigned int order)
Genfun::ButcherTableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:23
Genfun::RK32Tableau
Definition:
CLHEP/GenericFunctions/ButcherTableau.hh:84
Genfun
Definition:
CLHEP/GenericFunctions/Abs.hh:14
Genfun::TrapezoidTableau::TrapezoidTableau
TrapezoidTableau()
Generated by
1.8.17