OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <Enge.h>
Public Member Functions | |
Enge () | |
Enge (const std::vector< double > a, double x0, double lambda, int max_index) | |
~Enge () | |
Enge * | Clone () const |
std::vector< double > | GetEngeParameters () const |
void | SetEngeParameters (std::vector< double > a) |
double | GetLambda () const |
void | SetLambda (double lambda) |
double | GetX0 () const |
void | SetX0 (double x0) |
double | GetEnge (double x, int n) const |
double | GetDoubleEnge (double x, int n) const |
double | HN (double x, int n) const |
double | GN (double x, int n) const |
![]() | |
virtual | ~EndFieldModel () |
virtual std::ostream & | print (std::ostream &out) const =0 |
virtual double | function (double x, int n) const =0 |
virtual EndFieldModel * | clone () const =0 |
Static Public Member Functions | |
static void | SetEngeDiffIndices (size_t n) |
static std::vector < std::vector< int > > | GetQIndex (int n) |
static std::vector < std::vector< int > > | GetHIndex (int n) |
Private Attributes | |
std::vector< double > | _a |
double | _lambda |
double | _x0 |
Static Private Attributes | |
static std::vector < std::vector< std::vector < int > > > | _q |
static std::vector < std::vector< std::vector < int > > > | _h |
|
inline |
Default constructor
Definition at line 41 of file Enge.h.
References SetEngeDiffIndices().
|
inline |
Builds Enge function with parameters a_0, a_1, ..., lambda and x0.
max_index is the maximum derivative that will be used in calculation if, after setup, you find you need to calculate higher derivatives, you can just call SetEngeDiffIndices(n) where n is the highest derivative you think you will need.
Definition at line 49 of file Enge.h.
References SetEngeDiffIndices().
|
inline |
Enge* endfieldmodel::Enge::Clone | ( | ) | const |
Inheritable copy constructor - no mallocs, so does nothing
|
inline |
double endfieldmodel::Enge::GetEnge | ( | double | x, |
int | n | ||
) | const |
Returns the value of the Enge function or its \(n^{th}\) derivative.
Please call SetEngeDiffIndices(n) before calling if n > max_index
Definition at line 40 of file Enge.cpp.
References Physics::e, GetQIndex(), and GN().
Referenced by GetDoubleEnge().
|
inline |
|
inlinestatic |
Return the indices for calculating the nth derivative of g(x) ito h(x)
Definition at line 125 of file Enge.h.
References _h, Hypervolume::n, and SetEngeDiffIndices().
|
inline |
|
inlinestatic |
Return the indices for calculating the nth derivative of Enge ito g(x)
Definition at line 120 of file Enge.h.
References _q, Hypervolume::n, and SetEngeDiffIndices().
Referenced by GetEnge().
|
inline |
double endfieldmodel::Enge::GN | ( | double | x, |
int | n | ||
) | const |
double endfieldmodel::Enge::HN | ( | double | x, |
int | n | ||
) | const |
|
static |
Recursively calculate the indices for Enge and H
This will calculate the indices for Enge and H that are required to calculate the differential up to order n.
Definition at line 93 of file Enge.cpp.
References _h, _q, and endfieldmodel::CompactVector().
Referenced by Enge(), GetHIndex(), and GetQIndex().
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 111 of file Enge.h.
Referenced by GetEngeParameters(), HN(), and SetEngeParameters().
|
staticprivate |
Indexes the derivatives of g in terms of h
Definition at line 117 of file Enge.h.
Referenced by GetHIndex(), GN(), and SetEngeDiffIndices().
|
private |
Definition at line 112 of file Enge.h.
Referenced by GetLambda(), HN(), and SetLambda().
|
staticprivate |
Indexes the derivatives of enge in terms of g
Definition at line 115 of file Enge.h.
Referenced by GetQIndex(), and SetEngeDiffIndices().
|
private |
Definition at line 112 of file Enge.h.
Referenced by GetDoubleEnge(), GetX0(), and SetX0().