26 #ifndef MECURYDPM_POLY_H
27 #define MECURYDPM_POLY_H
95 void set_polynomial(std::vector<Mdouble> new_coefficients,
unsigned int new_dim);
158 unsigned int N =
P.coefficients.size();
159 for (
unsigned int i = 0;
i < N;
i++)
165 os << std::setprecision(2) <<
P[
i];
167 os <<
"r^" << N - 1 -
i;
168 else if (N - 1 -
i == 1)
This class is used to define polynomial axisymmetric coarse-graining functions.
Definition: NormalisedPolynomial.h:52
Mdouble evaluateIntegral(Mdouble a, Mdouble b, Mdouble t)
Returns the value of the line integral along the normal P1P2 "from a to b" over the axisymmetric func...
void set_polynomial(Mdouble *new_coefficients, unsigned int num_coeff, unsigned int new_dim)
Some as set_polynomial, but avoids the use of a vector.
Mdouble operator[](int i) const
Access to the coefficients.
Definition: NormalisedPolynomial.h:247
Mdouble evaluate_2D(Mdouble r)
Returns the value of the polynomial averaged over 1 dimension. For StatType=XY, .
NORMALIZED_POLYNOMIAL()
Basic constructor; note that this does not determine the particular polynomial; one needs to call set...
Definition: NormalisedPolynomial.h:85
Mdouble get_volume()
Returns the integral over the unit sphere of the axisymmetric function .
Mdouble evaluateGradient_2D(Mdouble r)
Returns the value of the gradient averaged over 1 dimensions.
int getOrder(void)
Returns the order of the polynomial.
Definition: NormalisedPolynomial.h:148
Mdouble evaluateGradient_1D(Mdouble r)
Returns the value of the gradient averaged over 2 dimensions.
friend std::ostream & operator<<(std::ostream &os, const NORMALIZED_POLYNOMIAL &P)
Returns a text description of the polynomial.
Definition: NormalisedPolynomial.h:156
Mdouble evaluateIntegral_1D(Mdouble a, Mdouble b, Mdouble t)
Returns the value of the line integral along the normal P1P2 "from a to b" over the axisymmetric func...
Mdouble evaluateGradient(Mdouble r)
Returns the gradient of the polynomial, .
void set_average_1D()
Sets averaged_coefficients for StatType=X,Y,Z such that . See evaluate_1D.
void finish_set_polynomial()
Normalizes the polynomial coefficients such that the integral over the unit sphere of the axisymmetr...
std::string getName()
Returns name of the polynomial.
Definition: NormalisedPolynomial.h:113
Mdouble evaluateIntegral_2D(Mdouble a, Mdouble b, Mdouble t)
Returns the value of the line integral along the normal P1P2 "from a to b" over the axisymmetric func...
void set_average_2D()
For StatType=XY,XZ,XZ, averaged_coefficients is not used since can be evaluated as a function of ....
void set_average()
Sets averaged_coefficients.
Mdouble evaluate_1D(Mdouble r)
Returns the value of the polynomial averaged over 2 dimensions. For StatType=X, . See also set_averag...
void set_polynomial(std::vector< Mdouble > new_coefficients, unsigned int new_dim)
Use this function to set the polynomial coefficients . This function calls finish_set_polynomial to n...
unsigned int dim
The system dimension.
Definition: NormalisedPolynomial.h:66
Mdouble evaluate(Mdouble r)
Returns the value of the polynomial, .
std::vector< Mdouble > coefficients
Stores the coefficients .
Definition: NormalisedPolynomial.h:71
void setName(const char *new_name)
Use this function to change the name of the polynomial.
Definition: NormalisedPolynomial.h:105
std::vector< Mdouble > averaged_coefficients
Stores some coefficients used in evaluate and evaluateIntegral for StatTypes different from XYZ.
Definition: NormalisedPolynomial.h:76
std::string name
Contains the name of the polynomial which will be displayed as CGtype by the statistical code.
Definition: NormalisedPolynomial.h:61
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51