OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Functions
polynomial Namespace Reference

Classes

class  DifferentialOperator
 
class  DifferentialOperatorTwo
 
class  Polynomial
 
class  PolynomialSum
 
class  RecursionRelation
 
class  RecursionRelationTwo
 

Functions

bool operator< (const TwoPolynomial &left, const TwoPolynomial &right)
 
bool operator== (const TwoPolynomial &left, const TwoPolynomial &right)
 

Detailed Description


DifferentialOperator describes a differential operator in terms of
polynomial coefficients.


Class category: AbsBeamline
Author: Martin Duy Tat


A differential operator is a linear sum of operators in the form

\[p(x)\frac{\partial^n}{\partial x^n}\frac{\partial^m}{\partial s^m}\]

,
and the polynomials p(x) are stored in a n by m list.


DifferentialOperatorTwo describes a differential operator in terms of
polynomial coefficients. The polynomials have two variables x and S(s).


Class category: AbsBeamline
Author: Martin Duy Tat


A differential operator is a linear sum of operators in the form

\[p(x, S(s))\frac{\partial^n}{\partial x^n} \frac{\partial^m}{\partial s^m}\]

,
and the polynomials p(x, S(s)) are stored in a n by m list.


Polynomial describes a polynomial of one variable.


Class category: AbsBeamline
Author: Martin Duy Tat


The polynomial

\[p(x) = a_0 + a_1x + ... + a_nx^n \]

is stored as a
list (a_0, a_1, ..., a_n).
BUG: For large n the integer type might overflow. If you need this many
terms change all int to long int.


PolynomialSum describes a sum of TwoPolynomial objects.


Class category: AbsBeamline
Author: Martin Duy Tat


The polynomial of two variables

\[p(x) = a_{00} + a_{10}x + a_{11}xS(s) + ... + a_{nm}x^nS(s)^m \]

cannot be summed with other polynomials
unless all the powers of S(s)-derivatives are identical.
Instead all terms are just stored seperately in a list.


RecursionRelation describes the differential operator used to find the
coefficients in the expansion of the magnetic scalar potential
It contains member functions for extracting all information required to
reconstruct the differential operator and evaluate its terms.


Class category: AbsBeamline
Author: Martin Duy Tat


The operator of interest is

\begin{eqnarray*} { \Big(\frac{1}{\rho(1 &+& x/\rho)}\frac{\partial}{\partial x} + \frac{\partial^2}{\partial x^2} &+& \frac{1}{(1 + x/\rho)^2}\frac{\partial^2}{\partial s^2}\Big)^n \end{eqnarray*}

and it can be initialised to any power of x and up to any n.


RecursionRelationTwo describes the differential operator used to find
the coefficients in the expansion of the magnetic scalar potential. It
contains member functions for extracting all information required to
reconstruct the differential operator and evaluate its terms.


Class category: AbsBeamline
Author: Martin Duy Tat


The operator of interest is

\begin{eqnarray*} { \Big(\frac{1}{\rho(s)(1 &+& x/\rho(s))}\frac{\partial}{\partial x} + \frac{\partial^2}{\partial x^2} &+& \frac{1}{1 + x/\rho(s)}\frac{\partial}{\partial s}\Big(\frac{1}{1 + x/\rho(s)}\frac{\partial}{\partial s}\Big)\Big)^n \end{eqnarray*}

and it can be initialised to any power of x and up to any n.

Function Documentation

◆ operator<()

bool polynomial::operator< ( const TwoPolynomial &  left,
const TwoPolynomial &  right 
)

Definition at line 375 of file TwoPolynomial.cpp.

References Hypervolume::n.

◆ operator==()

bool polynomial::operator== ( const TwoPolynomial &  left,
const TwoPolynomial &  right 
)

Definition at line 396 of file TwoPolynomial.cpp.