queso-0.57.1
|
Class for piecewise-linear one-dimensional functions. More...
#include <1D1DFunction.h>
Public Member Functions | |
Constructor/Destructor methods | |
PiecewiseLinear1D1DFunction (double minDomainValue, double maxDomainValue, const std::vector< double > &referenceDomainValues, double referenceImageValue0, const std::vector< double > &rateValues) | |
Default constructor. More... | |
~PiecewiseLinear1D1DFunction () | |
Destructor. More... | |
Mathematical methods | |
double | value (double domainValue) const |
Returns the value of the piecewise-linear function at point domainValue . More... | |
double | deriv (double domainValue) const |
Returns the value of the derivative of the piecewise-linear function 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 | |
unsigned int | m_numRefValues |
Number of points which will be evaluated. More... | |
std::vector< double > | m_referenceDomainValues |
Reference values in the piecewise-linear function domain; \( x_1i \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues . More... | |
std::vector< double > | m_referenceImageValues |
Reference values in the piecewise-linear function image; \( y_{1i} \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues . More... | |
std::vector< double > | m_rateValues |
Rate value; \( m_i \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues . More... | |
Protected Attributes inherited from QUESO::Base1D1DFunction | |
double | m_minDomainValue |
double | m_maxDomainValue |
Class for piecewise-linear one-dimensional functions.
This class implements piecewise-linear one-dimensional functions.
Definition at line 237 of file 1D1DFunction.h.
QUESO::PiecewiseLinear1D1DFunction::PiecewiseLinear1D1DFunction | ( | double | minDomainValue, |
double | maxDomainValue, | ||
const std::vector< double > & | referenceDomainValues, | ||
double | referenceImageValue0, | ||
const std::vector< double > & | rateValues | ||
) |
Default constructor.
Definition at line 239 of file 1D1DFunction.C.
References m_numRefValues, m_rateValues, m_referenceDomainValues, m_referenceImageValues, QUESO::queso_require_equal_to_msg, and QUESO::queso_require_not_equal_to_msg.
QUESO::PiecewiseLinear1D1DFunction::~PiecewiseLinear1D1DFunction | ( | ) |
Destructor.
Definition at line 279 of file 1D1DFunction.C.
References m_rateValues, m_referenceDomainValues, and m_referenceImageValues.
|
virtual |
Returns the value of the derivative of the piecewise-linear function at point domainValue
.
This function checks if point 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 334 of file 1D1DFunction.C.
References QUESO::Base1D1DFunction::m_maxDomainValue, QUESO::Base1D1DFunction::m_minDomainValue, m_numRefValues, m_rateValues, and m_referenceDomainValues.
|
virtual |
Returns the value of the piecewise-linear function at point domainValue
.
This function checks if point domainValue
belongs to the domain of this
function, and in affirmative case, it evaluates the function at such point.
Implements QUESO::Base1D1DFunction.
Definition at line 287 of file 1D1DFunction.C.
References QUESO::Base1D1DFunction::m_maxDomainValue, QUESO::Base1D1DFunction::m_minDomainValue, m_numRefValues, m_rateValues, m_referenceDomainValues, and m_referenceImageValues.
|
protected |
Number of points which will be evaluated.
Definition at line 268 of file 1D1DFunction.h.
Referenced by deriv(), PiecewiseLinear1D1DFunction(), and value().
|
protected |
Rate value; \( m_i \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues
.
Definition at line 277 of file 1D1DFunction.h.
Referenced by deriv(), PiecewiseLinear1D1DFunction(), value(), and ~PiecewiseLinear1D1DFunction().
|
protected |
Reference values in the piecewise-linear function domain; \( x_1i \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues
.
Definition at line 271 of file 1D1DFunction.h.
Referenced by deriv(), PiecewiseLinear1D1DFunction(), value(), and ~PiecewiseLinear1D1DFunction().
|
protected |
Reference values in the piecewise-linear function image; \( y_{1i} \) in \( f_i(x) = y_{1i} + m_i (x - x_{1i})\), for each \( i \)=1 .. m_numRefValues
.
Definition at line 274 of file 1D1DFunction.h.
Referenced by PiecewiseLinear1D1DFunction(), value(), and ~PiecewiseLinear1D1DFunction().