OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <RecursionRelationTwo.h>
Public Member Functions | |
RecursionRelationTwo () | |
RecursionRelationTwo (const std::size_t &power, const std::size_t &highestXorder) | |
RecursionRelationTwo (const RecursionRelationTwo &doperator) | |
~RecursionRelationTwo () | |
RecursionRelationTwo & | operator= (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 |
Definition at line 61 of file RecursionRelationTwo.h.
polynomial::RecursionRelationTwo::RecursionRelationTwo | ( | ) |
Default constructor, initialises identity operator
Definition at line 37 of file RecursionRelationTwo.cpp.
References operator_m, and polynomial::DifferentialOperatorTwo::setPolynomial().
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
power | -> Value of n of the coefficient fn |
highestXorder | -> Highest power of x |
Definition at line 45 of file RecursionRelationTwo.cpp.
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.
void polynomial::RecursionRelationTwo::applyOperator | ( | ) |
Applies another differential operator to the existing operator
Definition at line 80 of file RecursionRelationTwo.cpp.
References polynomial::DifferentialOperatorTwo::addOperator(), polynomial::DifferentialOperatorTwo::differentiateS(), polynomial::DifferentialOperatorTwo::differentiateX(), highestXorder_m, polynomial::DifferentialOperatorTwo::multiplyPolynomial(), operator_m, and pow().
|
inline |
Apply a differential operator in s
Definition at line 177 of file RecursionRelationTwo.h.
References polynomial::DifferentialOperatorTwo::differentiateS(), and operator_m.
|
inline |
Apply a differential operator in x
Definition at line 173 of file RecursionRelationTwo.h.
References polynomial::DifferentialOperatorTwo::differentiateX(), and operator_m.
|
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
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.
|
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
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.
|
inline |
Returns highest derivative of s
Definition at line 185 of file RecursionRelationTwo.h.
References polynomial::DifferentialOperatorTwo::getSDerivatives(), and operator_m.
|
inline |
Returns highest derivative of x
Definition at line 181 of file RecursionRelationTwo.h.
References polynomial::DifferentialOperatorTwo::getXDerivatives(), and operator_m.
|
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
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.
|
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
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.
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
|
inline |
Change number of s-derivatives to sDerivatives
sDerivatives | -> Number of s-derivatives after resize |
Definition at line 210 of file RecursionRelationTwo.h.
References operator_m, and polynomial::DifferentialOperatorTwo::resizeS().
|
inline |
Change number of x-derivatives to xDerivatives
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().
|
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().
|
inline |
Truncate series in x at highestXorder
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 MultipoleTCurvedVarRadius::setMaxOrder(), and MultipoleT::setMaxOrder().
|
private |
Definition at line 160 of file RecursionRelationTwo.h.
Referenced by applyOperator(), operator=(), and truncate().
|
private |
Definition at line 158 of file RecursionRelationTwo.h.
Referenced by applyOperator(), differentiateS(), differentiateX(), evaluatePolynomial(), getdSfactors(), getMaxSDerivatives(), getMaxXDerivatives(), isPolynomialZero(), numberOfTerms(), operator=(), RecursionRelationTwo(), resizeS(), resizeX(), sortTerms(), and truncate().
|
private |
Definition at line 159 of file RecursionRelationTwo.h.
Referenced by operator=().