]> https://gitweb.dealii.org/ - dealii.git/commitdiff
more on polynomials
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 18 Dec 2000 10:18:25 +0000 (10:18 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 18 Dec 2000 10:18:25 +0000 (10:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@3546 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/polynomial.h
deal.II/base/include/base/tensor_product_polynomials.h

index e5acb1986f272c7e8b58558e13a71f94550c1788..da6040d3c6c9cedbc71c6b7e6f8f65a158291130 100644 (file)
@@ -16,6 +16,7 @@
 
 
 #include <base/exceptions.h>
+#include <base/subscriptor.h>
 
 #include <vector.h>
 
@@ -26,9 +27,9 @@
  * 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:
                                     /**
@@ -92,7 +93,7 @@ class Polynomial
                                      * passed down by derived
                                      * classes.
                                      */
-    const vector<double> coefficients;
+    vector<double> coefficients;
 };
 
 
index 0495cbaf157a5429ac78f3d11305c7ddb1d78574..ceade27a832a201820e4e9ff8cd2d56016c87627 100644 (file)
@@ -18,7 +18,7 @@
 #include <base/tensor.h>
 #include <base/point.h>
 #include <base/polynomial.h>
-
+#include <base/smartpointer.h>
 
 #include <vector.h>
 
@@ -39,7 +39,7 @@ class TensorProductPolynomials
                                      * 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
@@ -47,7 +47,7 @@ class TensorProductPolynomials
                                      * @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;
 
@@ -61,14 +61,12 @@ class TensorProductPolynomials
            
   private:
                                     /**
-                                     * TODO: Implement use of
-                                     * SmartPointer later.
-                                     *
                                      * Pointer to the @p{polynomials}
                                      * given to the constructor.
                                      */
-    const vector<Polynomial> *polynomials;
-}
+    vector<SmartPointer<Polynomial> > polynomials;
+};
+
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.