CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
GenericFunctions
GenericFunctions/RungeKuttaClassicalSolver.hh
Go to the documentation of this file.
1
// This is a class the creates an N-Dimensional Phase Space //
2
3
// It is for use in computing the time development of classical //
4
// Hamiltonian Systems. //
5
6
// Joe Boudreau October 2011 //
7
8
//--------------------------------------------------------------//
9
10
#ifndef _RKClassicalSolver_h__
11
#define _RKClassicalSolver_h__
12
#include "
CLHEP/GenericFunctions/PhaseSpace.hh
"
13
#include "
CLHEP/GenericFunctions/ClassicalSolver.hh
"
14
#include "
CLHEP/GenericFunctions/Variable.hh
"
15
#include "
CLHEP/GenericFunctions/Parameter.hh
"
16
#include <vector>
17
18
namespace
Classical {
19
20
class
RungeKuttaSolver :
public
Solver {
21
22
public
:
23
//
24
// Constructor--takes a hamiltonian and a point in p-space:
25
//
26
RungeKuttaSolver
(
Genfun::GENFUNCTION
H,
const
PhaseSpace &
phaseSpace
);
27
//
28
// Destructor:
29
//
30
~RungeKuttaSolver
();
31
//
32
// Returns the time evolution for a variable (q_i or p_i)
33
//
34
virtual
Genfun::GENFUNCTION
equationOf
(
const
Genfun::Variable
& v)
const
;
35
//
36
// Returns the phase space
37
//
38
virtual
const
PhaseSpace &
phaseSpace
()
const
;
39
//
40
// Returns the Hamiltonian (function of the 2N phase space variables).
41
//
42
virtual
Genfun::GENFUNCTION
hamiltonian
()
const
;
43
//
44
// Returns the energy (function of time).
45
//
46
virtual
Genfun::GENFUNCTION
energy
()
const
;
47
//
48
// This is in the rare case that the user needs to edit starting values.
49
// or parameterize the Hamiltonian. Most users: can ignore.
50
virtual
Genfun::Parameter
*
takeQ0
(
unsigned
int
index);
51
virtual
Genfun::Parameter
*
takeP0
(
unsigned
int
index);
52
virtual
Genfun::Parameter
*
createControlParameter
(
const
std::string & variableName=
"anon"
,
53
double
defStartingValue=0.0,
54
double
startingValueMin=0.0,
55
double
startingValueMax=0.0)
const
;
56
57
58
59
private
:
60
61
// Illegal Operations:
62
RungeKuttaSolver
(
const
RungeKuttaSolver
&);
63
RungeKuttaSolver
& operator=(
const
RungeKuttaSolver
&);
64
65
// Clockwork
66
class
Clockwork;
67
Clockwork *c;
68
};
69
70
}
71
72
#endif
Generated on Sun Jun 17 2012 08:08:27 for CLHEP by
1.8.1.1