84 void set_polynomial(std::vector<Mdouble> new_coefficients,
unsigned int new_dim);
124 for (
unsigned int i=0; i<N; i++) {
126 if (P[i]>=0) os <<
"+";
127 os << std::setprecision(2) << P[i];
128 if (N-1-i>1) os <<
"r^" << N-1-i;
129 else if (N-1-i==1) os <<
"r";
int get_Order(void)
Returns the order of the polynomial.
std::string name
Contains the name of the polynomial which will be displayed as CGtype by the statistical code...
Mdouble evaluate_2D(Mdouble r)
Returns the value of the polynomial averaged over 1 dimension.
Mdouble evaluateGradient_1D(Mdouble r)
Returns the value of the gradient averaged over 2 dimensions.
Mdouble operator[](int i) const
Access to the coefficients.
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 evaluateGradient_2D(Mdouble r)
Returns the value of the gradient averaged over 1 dimensions.
unsigned int dim
The system dimension.
void set_average()
Sets averaged_coefficients.
void finish_set_polynomial()
Normalizes the polynomial coefficients such that the integral over the unit sphere of the axisymmetr...
void set_polynomial(std::vector< Mdouble > new_coefficients, unsigned int new_dim)
Use this function to set the polynomial coefficients .
void set_average_1D()
Sets averaged_coefficients for StatType=X,Y,Z such that .
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::string get_name()
Returns name of the polynomial.
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.
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...
void set_name(const char *new_name)
Use this function to change the name of the polynomial.
Mdouble evaluate_1D(Mdouble r)
Returns the value of the polynomial averaged over 2 dimensions.
Mdouble evaluateGradient(Mdouble r)
Returns the gradient of the polynomial, .
This class is used to define polynomial axisymmetric coarse-graining functions.
std::vector< Mdouble > coefficients
Stores the coefficients .
Mdouble get_volume()
Returns the integral over the unit sphere of the axisymmetric function .
Mdouble evaluate(Mdouble r)
Returns the value of the polynomial, .
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...