CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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/RKIntegrator.hh"
15#include "CLHEP/GenericFunctions/Variable.hh"
16#include "CLHEP/GenericFunctions/Parameter.hh"
17#include <vector>
18
19namespace Classical {
20
21 class RungeKuttaSolver : public Solver {
22
23 public:
24 //
25 // Constructor--takes a hamiltonian and a point in p-space:
26 //
28 //
29 // Destructor:
30 //
32 //
33 // Returns the time evolution for a variable (q_i or p_i)
34 //
35 virtual Genfun::GENFUNCTION equationOf(const Genfun::Variable & v) const;
36 //
37 // Returns the phase space
38 //
39 virtual const PhaseSpace & phaseSpace() const;
40 //
41 // Returns the Hamiltonian (function of the 2N phase space variables).
42 //
43 virtual Genfun::GENFUNCTION hamiltonian() const;
44 //
45 // Returns the energy (function of time).
46 //
47 virtual Genfun::GENFUNCTION energy() const;
48 //
49 // This is in the rare case that the user needs to edit starting values.
50 // or parameterize the Hamiltonian. Most users: can ignore.
51 virtual Genfun::Parameter *takeQ0(unsigned int index);
52 virtual Genfun::Parameter *takeP0(unsigned int index);
53 virtual Genfun::Parameter *createControlParameter(const std::string & variableName="anon",
54 double defStartingValue=0.0,
55 double startingValueMin=0.0,
56 double startingValueMax=0.0) const;
57
58
59
60 private:
61
62 // Illegal Operations:
64 RungeKuttaSolver & operator=(const RungeKuttaSolver &);
65
66 // Clockwork
67 class Clockwork;
68 Clockwork *c;
69 };
70
71}
72
73#endif
virtual Genfun::GENFUNCTION hamiltonian() const
virtual Genfun::Parameter * createControlParameter(const std::string &variableName="anon", double defStartingValue=0.0, double startingValueMin=0.0, double startingValueMax=0.0) const
virtual Genfun::GENFUNCTION equationOf(const Genfun::Variable &v) const
virtual Genfun::GENFUNCTION energy() const
virtual Genfun::Parameter * takeP0(unsigned int index)
virtual Genfun::Parameter * takeQ0(unsigned int index)
virtual const PhaseSpace & phaseSpace() const