OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Attributes | List of all members
polynomial::RecursionRelationTwo Class Reference

#include <RecursionRelationTwo.h>

Collaboration diagram for polynomial::RecursionRelationTwo:
Collaboration graph
[legend]

Public Member Functions

 RecursionRelationTwo ()
 
 RecursionRelationTwo (const std::size_t &power, const std::size_t &highestXorder)
 
 RecursionRelationTwo (const RecursionRelationTwo &doperator)
 
 ~RecursionRelationTwo ()
 
RecursionRelationTwooperator= (const RecursionRelationTwo &recursion)
 
void printOperator () const
 
void truncate (std::size_t highestXorder)
 
void applyOperator ()
 
void differentiateX ()
 
void differentiateS ()
 
std::size_t getMaxXDerivatives () const
 
std::size_t getMaxSDerivatives () const
 
double evaluatePolynomial (const double &x, const double &s, const std::size_t &xDerivative, const std::size_t &sDerivative, const std::vector< double > &dSvalues) const
 
bool isPolynomialZero (const std::size_t &x, const std::size_t &s, const std::size_t &term) const
 
void resizeX (const std::size_t &xDerivatives)
 
void resizeS (const std::size_t &sDerivatives)
 
std::size_t numberOfTerms (const std::size_t &xDerivative, const std::size_t &sDerivative) const
 
std::vector< std::size_t > getdSfactors (const std::size_t &xDerivative, const std::size_t &sDerivative, const std::size_t &p) const
 
void sortTerms ()
 

Private Attributes

DifferentialOperatorTwo operator_m
 
std::size_t power_m
 
std::size_t highestXorder_m
 

Detailed Description

Definition at line 61 of file RecursionRelationTwo.h.

Constructor & Destructor Documentation

polynomial::RecursionRelationTwo::RecursionRelationTwo ( )

Default constructor, initialises identity operator

Definition at line 37 of file RecursionRelationTwo.cpp.

References operator_m, and polynomial::DifferentialOperatorTwo::setPolynomial().

Here is the call graph for this function:

polynomial::RecursionRelationTwo::RecursionRelationTwo ( const std::size_t &  power,
const std::size_t &  highestXorder 
)

Constructor, initialises the operator

\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*}

where power = n. The denominators are expanded in x and highestXorder
is the highest power of x

Parameters
power-> Value of n of the coefficient fn
highestXorder-> Highest power of x

Definition at line 45 of file RecursionRelationTwo.cpp.

References applyOperator(), operator_m, power_m, polynomial::DifferentialOperatorTwo::setPolynomial(), sortTerms(), and truncate().

Here is the call graph for this function:

polynomial::RecursionRelationTwo::RecursionRelationTwo ( const RecursionRelationTwo doperator)

Copy constructor

Definition at line 60 of file RecursionRelationTwo.cpp.

polynomial::RecursionRelationTwo::~RecursionRelationTwo ( )

Desctructor, does nothing

Definition at line 66 of file RecursionRelationTwo.cpp.

Member Function Documentation

void polynomial::RecursionRelationTwo::applyOperator ( )
void polynomial::RecursionRelationTwo::differentiateS ( )
inline

Apply a differential operator in s

Definition at line 177 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::differentiateS(), and operator_m.

Here is the call graph for this function:

void polynomial::RecursionRelationTwo::differentiateX ( )
inline

Apply a differential operator in x

Definition at line 173 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::differentiateX(), and operator_m.

Here is the call graph for this function:

double polynomial::RecursionRelationTwo::evaluatePolynomial ( const double &  x,
const double &  s,
const std::size_t &  xDerivative,
const std::size_t &  sDerivative,
const std::vector< double > &  dSvalues 
) const
inline

Evaluates polynomial term p with xDerivative x-derivatives
and sDerivative s-derivatives If xDerivative, sDerivative or term are out or range then zero is returned

Parameters
x-> Point x where polynomial is evaluated
s-> Point s where polynomial is evaluated
xDerivative-> Number of x-derivatives
sDerivative-> Number of s-derivatives
term-> Term index

Definition at line 189 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::evaluatePolynomial(), and operator_m.

Here is the call graph for this function:

std::vector< std::size_t > polynomial::RecursionRelationTwo::getdSfactors ( const std::size_t &  xDerivative,
const std::size_t &  sDerivative,
const std::size_t &  p 
) const
inline

Returns list of S(s)-derivatives in term p with xDerivative x-derivatives and sDerivative s-derivatives
If xDerivative or sDerivative are out of range an empty list is returned

Parameters
x-> Number of x-derivatives
s-> Number of s-derivatives
term-> Term index

Definition at line 220 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::getdSFactors(), and operator_m.

Here is the call graph for this function:

std::size_t polynomial::RecursionRelationTwo::getMaxSDerivatives ( ) const
inline

Returns highest derivative of s

Definition at line 185 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::getSDerivatives(), and operator_m.

Here is the call graph for this function:

std::size_t polynomial::RecursionRelationTwo::getMaxXDerivatives ( ) const
inline

Returns highest derivative of x

Definition at line 181 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::getXDerivatives(), and operator_m.

Here is the call graph for this function:

bool polynomial::RecursionRelationTwo::isPolynomialZero ( const std::size_t &  x,
const std::size_t &  s,
const std::size_t &  term 
) const
inline

Check if polynomial term p with x x-derivatives and s s-derivatives is zero
If x, s or term are negative true is returned

Parameters
x-> Number of x-derivatives
s-> Number of s-derivatives
term-> Term index

Definition at line 200 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::isPolynomialZero(), and operator_m.

Here is the call graph for this function:

std::size_t polynomial::RecursionRelationTwo::numberOfTerms ( const std::size_t &  xDerivative,
const std::size_t &  sDerivative 
) const
inline

Returns number of terms in the sum with xDerivative x-derivatives and sDerivative s-derivatives
If xDerivative or sDerivative is negative zero is returned

Parameters
x-> Number of x-derivatives
s-> Number of s-derivatives

Definition at line 214 of file RecursionRelationTwo.h.

References polynomial::DifferentialOperatorTwo::numberOfTerms(), and operator_m.

Here is the call graph for this function:

RecursionRelationTwo & polynomial::RecursionRelationTwo::operator= ( const RecursionRelationTwo recursion)

Assigment operator

Definition at line 69 of file RecursionRelationTwo.cpp.

References highestXorder_m, operator_m, and power_m.

void polynomial::RecursionRelationTwo::printOperator ( ) const

Print operator, used for internal debugging

void polynomial::RecursionRelationTwo::resizeS ( const std::size_t &  sDerivatives)
inline

Change number of s-derivatives to sDerivatives

Parameters
sDerivatives-> Number of s-derivatives after resize

Definition at line 210 of file RecursionRelationTwo.h.

References operator_m, and polynomial::DifferentialOperatorTwo::resizeS().

Here is the call graph for this function:

void polynomial::RecursionRelationTwo::resizeX ( const std::size_t &  xDerivatives)
inline

Change number of x-derivatives to xDerivatives

Parameters
xDerivatives-> Number of x-derivatives after resize

Definition at line 206 of file RecursionRelationTwo.h.

References operator_m, and polynomial::DifferentialOperatorTwo::resizeX().

Referenced by MultipoleTCurvedVarRadius::setMaxOrder(), and MultipoleT::setMaxOrder().

Here is the call graph for this function:

void polynomial::RecursionRelationTwo::sortTerms ( )
inline

Sort the terms in each sum, with fewest S(s)-derivatives first, then in increasing powers

Definition at line 227 of file RecursionRelationTwo.h.

References operator_m, and polynomial::DifferentialOperatorTwo::sortTerms().

Referenced by RecursionRelationTwo().

Here is the call graph for this function:

void polynomial::RecursionRelationTwo::truncate ( std::size_t  highestXorder)
inline

Truncate series in x at highestXorder

Parameters
highestXorder-> Highest power of x after truncation

Definition at line 168 of file RecursionRelationTwo.h.

References highestXorder_m, operator_m, and polynomial::DifferentialOperatorTwo::truncate().

Referenced by RecursionRelationTwo(), MultipoleTCurvedVarRadius::setMaxOrder(), and MultipoleT::setMaxOrder().

Here is the call graph for this function:

Member Data Documentation

std::size_t polynomial::RecursionRelationTwo::highestXorder_m
private

Definition at line 160 of file RecursionRelationTwo.h.

Referenced by applyOperator(), operator=(), and truncate().

DifferentialOperatorTwo polynomial::RecursionRelationTwo::operator_m
private
std::size_t polynomial::RecursionRelationTwo::power_m
private

Definition at line 159 of file RecursionRelationTwo.h.

Referenced by operator=(), and RecursionRelationTwo().


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