queso-0.53.0
|
Class for one-dimensional Lagrange polynomials. More...
#include <1D1DFunction.h>
Public Member Functions | |
Constructor/Destructor methods | |
LagrangePolynomial1D1DFunction (const std::vector< double > &positionValues, const std::vector< double > *functionValues) | |
Default constructor. More... | |
~LagrangePolynomial1D1DFunction () | |
Destructor. More... | |
Mathematical methods | |
double | value (double domainValue) const |
Returns the value of the Lagrange polynomial at point domainValue . More... | |
double | deriv (double domainValue) const |
TODO: Returns the value of the derivative of the Lagrange polynomial at point domainValue . More... | |
Public Member Functions inherited from QUESO::Base1D1DFunction | |
Base1D1DFunction (double minDomainValue, double maxDomainValue) | |
Default constructor. More... | |
virtual | ~Base1D1DFunction () |
Destructor. More... | |
double | minDomainValue () const |
Returns the minimum value of the domain of the (one-dimensional) function. More... | |
double | maxDomainValue () const |
Returns the maximum value of the domain of the (one-dimensional) function. More... | |
virtual double | multiplyAndIntegrate (const Base1D1DFunction &func, unsigned int quadratureOrder, double *resultWithMultiplicationByTAsWell) const |
TODO: Multiplies this function with function , and integrates it numerically. See template specialization. More... | |
Protected Attributes | |
std::vector< double > | m_positionValues |
std::vector< double > | m_functionValues |
Protected Attributes inherited from QUESO::Base1D1DFunction | |
double | m_minDomainValue |
double | m_maxDomainValue |
Class for one-dimensional Lagrange polynomials.
The Lagrange interpolating polynomial of a one-dimensional function is the polynomial of degree that passes through the points , and is given by:
Written explicitly,
In this class, the array std::vector<double>& positionValues
stores the points and the array std::vector<double>* functionValues
stores the points of the Lagrange polynomial.
Definition at line 558 of file 1D1DFunction.h.
QUESO::LagrangePolynomial1D1DFunction::LagrangePolynomial1D1DFunction | ( | const std::vector< double > & | positionValues, |
const std::vector< double > * | functionValues | ||
) |
Default constructor.
Definition at line 743 of file 1D1DFunction.C.
References m_functionValues, m_positionValues, and queso_require_equal_to_msg.
QUESO::LagrangePolynomial1D1DFunction::~LagrangePolynomial1D1DFunction | ( | ) |
|
virtual |
TODO: Returns the value of the derivative of the Lagrange polynomial at point domainValue
.
domainValue
belongs to the domain of this
function, and in affirmative case, it returns the value of the derivative at such point. Implements QUESO::Base1D1DFunction.
Definition at line 797 of file 1D1DFunction.C.
References QUESO::Base1D1DFunction::m_maxDomainValue, QUESO::Base1D1DFunction::m_minDomainValue, queso_not_implemented, queso_require_msg, and value().
|
virtual |
Returns the value of the Lagrange polynomial at point domainValue
.
Implements QUESO::Base1D1DFunction.
Definition at line 762 of file 1D1DFunction.C.
References k, m_functionValues, and m_positionValues.
Referenced by deriv().
|
protected |
Definition at line 585 of file 1D1DFunction.h.
Referenced by LagrangePolynomial1D1DFunction(), and value().
|
protected |
Definition at line 584 of file 1D1DFunction.h.
Referenced by LagrangePolynomial1D1DFunction(), and value().