OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::LegendrePolynomial Class Reference

#include <LegendrePolynomial.hpp>

Public Member Functions

 LegendrePolynomial (int maxPower)
 
virtual ~LegendrePolynomial ()
 
RealType evaluate (int n, RealType x)
 
RealType evaluateDerivative (int n, RealType x)
 
const DoublePolynomialgetLegendrePolynomial (int n) const
 

Protected Attributes

std::vector< DoublePolynomialpolyList_
 

Private Member Functions

void GeneratePolynomials (int maxPower)
 
virtual void GenerateFirstTwoTerms ()
 

Private Attributes

int maxPower_
 

Detailed Description

A collection of Legendre Polynomials.

Todo:
document

Definition at line 65 of file LegendrePolynomial.hpp.

Constructor & Destructor Documentation

◆ LegendrePolynomial()

OpenMD::LegendrePolynomial::LegendrePolynomial ( int  maxPower)

Definition at line 46 of file LegendrePolynomial.cpp.

References GeneratePolynomials(), and maxPower_.

◆ ~LegendrePolynomial()

virtual OpenMD::LegendrePolynomial::~LegendrePolynomial ( )
inlinevirtual

Definition at line 68 of file LegendrePolynomial.hpp.

Member Function Documentation

◆ evaluate()

RealType OpenMD::LegendrePolynomial::evaluate ( int  n,
RealType  x 
)
inline

Calculates the value of the nth Legendre Polynomial evaluated at the given x value.

Returns
The value of the nth Legendre Polynomial evaluates at the given x value
Parameters
n
xthe value of the independent variable for the nth Legendre Polynomial function

Definition at line 76 of file LegendrePolynomial.hpp.

References polyList_.

◆ evaluateDerivative()

RealType OpenMD::LegendrePolynomial::evaluateDerivative ( int  n,
RealType  x 
)
inline

Returns the first derivative of the nth Legendre Polynomial.

Returns
the first derivative of the nth Legendre Polynomial
Parameters
n
xthe value of the independent variable for the nth Legendre Polynomial function

Definition at line 87 of file LegendrePolynomial.hpp.

References polyList_.

◆ GenerateFirstTwoTerms()

void OpenMD::LegendrePolynomial::GenerateFirstTwoTerms ( )
privatevirtual

Definition at line 71 of file LegendrePolynomial.cpp.

References polyList_, and OpenMD::Polynomial< Real >::setCoefficient().

Referenced by GeneratePolynomials().

◆ GeneratePolynomials()

void OpenMD::LegendrePolynomial::GeneratePolynomials ( int  maxPower)
private

◆ getLegendrePolynomial()

const DoublePolynomial& OpenMD::LegendrePolynomial::getLegendrePolynomial ( int  n) const
inline

Returns the nth Legendre Polynomial

Returns
the nth Legendre Polynomial
Parameters
n

Definition at line 97 of file LegendrePolynomial.hpp.

References polyList_.

Referenced by OpenMD::COHZ::COHZ(), and OpenMD::LegendreCorrFuncZ::LegendreCorrFuncZ().

Member Data Documentation

◆ maxPower_

int OpenMD::LegendrePolynomial::maxPower_
private

Definition at line 111 of file LegendrePolynomial.hpp.

Referenced by LegendrePolynomial().

◆ polyList_

std::vector<DoublePolynomial> OpenMD::LegendrePolynomial::polyList_
protected

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