#include <base/exceptions.h>
+#include <base/subscriptor.h>
#include <vector.h>
* happens through the Horner scheme which provides both numerical
* stability and a minimal number of numerical operations.
*
- * @author Ralf Hartmann, 2000
+ * @author Ralf Hartmann, Guido Kanschat, 2000
*/
-class Polynomial
+class Polynomial : public Subscriptor
{
public:
/**
* passed down by derived
* classes.
*/
- const vector<double> coefficients;
+ vector<double> coefficients;
};
#include <base/tensor.h>
#include <base/point.h>
#include <base/polynomial.h>
-
+#include <base/smartpointer.h>
#include <vector.h>
* order @p{p} there should be
* @p{p+1} polynomials.
*/
- TensorProductPolynomials(const vector<Polynomial> &pols);
+ TensorProductPolynomials(const vector<SmartPointer<Polynomial> > &pols);
/**
* Calculates the shape values
* @p{unit_point}.
*/
void shape_values_and_grads(const Point<dim> &unit_point,
- vector<double> > &values,
+ vector<double> &values,
vector<Tensor<1,dim> > &grads,
vector<Tensor<2,dim> > &grad_grads) const;
private:
/**
- * TODO: Implement use of
- * SmartPointer later.
- *
* Pointer to the @p{polynomials}
* given to the constructor.
*/
- const vector<Polynomial> *polynomials;
-}
+ vector<SmartPointer<Polynomial> > polynomials;
+};
+