CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::EnergyFunction Class Reference

#include <ClassicalSolver.hh>

+ Inheritance diagram for Genfun::EnergyFunction:

Public Member Functions

 EnergyFunction (const Classical::Solver &)
 
virtual ~EnergyFunction ()
 
 EnergyFunction (const EnergyFunction &right)
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
- Public Member Functions inherited from Genfun::AbsFunction
 AbsFunction ()
 
 AbsFunction (const AbsFunction &right)
 
virtual ~AbsFunction ()
 
virtual unsigned int dimensionality () const
 
virtual double operator() (double argument) const =0
 
virtual double operator() (const Argument &argument) const =0
 
virtual AbsFunctionclone () const =0
 
virtual FunctionComposition operator() (const AbsFunction &f) const
 
virtual ParameterComposition operator() (const AbsParameter &p) const
 
Derivative derivative (const Variable &v) const
 
Derivative prime () const
 
virtual bool hasAnalyticDerivative () const
 
virtual Derivative partial (unsigned int) const
 

Detailed Description

Definition at line 76 of file ClassicalSolver.hh.

Constructor & Destructor Documentation

◆ EnergyFunction() [1/2]

Genfun::EnergyFunction::EnergyFunction ( const Classical::Solver xsolver)

Definition at line 11 of file ClassicalSolver.cc.

11 :
12 solver(xsolver)
13 {}

◆ ~EnergyFunction()

Genfun::EnergyFunction::~EnergyFunction ( )
virtual

Definition at line 15 of file ClassicalSolver.cc.

15 {
16 }

◆ EnergyFunction() [2/2]

Genfun::EnergyFunction::EnergyFunction ( const EnergyFunction right)

Definition at line 18 of file ClassicalSolver.cc.

19 :AbsFunction(right), solver(right.solver)
20 { }

Member Function Documentation

◆ operator()() [1/2]

virtual double Genfun::EnergyFunction::operator() ( const Argument a) const
inlineoverridevirtual

Implements Genfun::AbsFunction.

Definition at line 93 of file ClassicalSolver.hh.

93{return operator() (a[0]);}
virtual double operator()(double argument) const override

◆ operator()() [2/2]

double Genfun::EnergyFunction::operator() ( double  argument) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 23 of file ClassicalSolver.cc.

23 {
24 const Classical::PhaseSpace & phaseSpace=solver.phaseSpace();
25 const unsigned int DIM=phaseSpace.dim();
26 Genfun::Argument arg(2*DIM);
27 for (unsigned int i=0;i<phaseSpace.dim();i++) {
28 arg[i] =solver.equationOf(phaseSpace.coordinates()[i])(t);
29 arg[i+DIM]=solver.equationOf(phaseSpace.momenta()[i])(t);
30 }
31 Genfun::GENFUNCTION H = solver.hamiltonian();
32 return H(arg);
33 }
const Component & momenta() const
Definition: PhaseSpace.cc:70
const Component & coordinates() const
Definition: PhaseSpace.cc:66
unsigned int dim() const
Definition: PhaseSpace.cc:98
virtual Genfun::GENFUNCTION equationOf(const Genfun::Variable &v) const =0
virtual Genfun::GENFUNCTION hamiltonian() const =0
virtual const PhaseSpace & phaseSpace() const =0

Referenced by operator()().


The documentation for this class was generated from the following files: