95 void set_polynomial(std::vector<Mdouble> new_coefficients,
unsigned int new_dim);
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)
253 #include "NormalisedPolynomial.hcc"
void setName(const char *new_name)
Use this function to change the name of the polynomial.
Mdouble evaluateGradient_2D(Mdouble r)
Returns the value of the gradient averaged over 1 dimensions.
std::string name
Contains the name of the polynomial which will be displayed as CGtype by the statistical code...
Mdouble get_volume()
Returns the integral over the unit sphere of the axisymmetric function .
Mdouble operator[](int i) const
Access to the coefficients.
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 evaluate_2D(Mdouble r)
Returns the value of the polynomial averaged over 1 dimension. For StatType=XY, . ...
unsigned int dim
The system dimension.
void set_average()
Sets averaged_coefficients.
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...
Mdouble evaluate_1D(Mdouble r)
Returns the value of the polynomial averaged over 2 dimensions. For StatType=X, . See also set_averag...
void finish_set_polynomial()
Normalizes the polynomial coefficients such that the integral over the unit sphere of the axisymmetr...
Mdouble evaluateGradient_1D(Mdouble r)
Returns the value of the gradient averaged over 2 dimensions.
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...
void set_average_1D()
Sets averaged_coefficients for StatType=X,Y,Z such that . See evaluate_1D.
NORMALIZED_POLYNOMIAL()
Basic constructor; note that this does not determine the particular polynomial; one needs to call set...
void set_average_2D()
For StatType=XY,XZ,XZ, averaged_coefficients is not used since can be evaluated as a function of ...
std::vector< Mdouble > averaged_coefficients
Stores some coefficients used in evaluate and evaluateIntegral for StatTypes different from XYZ...
friend std::ostream & operator<<(std::ostream &os, const NORMALIZED_POLYNOMIAL &P)
Returns a text description of the polynomial.
std::string getName()
Returns name of the polynomial.
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...
Mdouble evaluate(Mdouble r)
Returns the value of the polynomial, .
This class is used to define polynomial axisymmetric coarse-graining functions.
std::vector< Mdouble > coefficients
Stores the coefficients .
int getOrder(void)
Returns the order of the polynomial.
Mdouble evaluateGradient(Mdouble r)
Returns the gradient of the polynomial, .