]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Initial implementation of the TensorProductPolynomials class.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Fri, 15 Dec 2000 11:25:51 +0000 (11:25 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Fri, 15 Dec 2000 11:25:51 +0000 (11:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@3541 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/tensor_product_polynomials.h [new file with mode: 0644]

diff --git a/deal.II/base/include/base/tensor_product_polynomials.h b/deal.II/base/include/base/tensor_product_polynomials.h
new file mode 100644 (file)
index 0000000..0495cba
--- /dev/null
@@ -0,0 +1,76 @@
+//----------------------  tensor_product_polynomials.h  -------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2000 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------  tensor_product_polynomials.h  -------------
+#ifndef __deal2__tensor_product_polynomials_h
+#define __deal2__tensor_product_polynomials_h
+
+
+#include <base/exceptions.h>
+#include <base/tensor.h>
+#include <base/point.h>
+#include <base/polynomial.h>
+
+
+#include <vector.h>
+
+
+/**
+ * Tensor product of given polynomials.
+ *
+ * @author Ralf Hartmann, 2000
+ */
+template <int dim>
+class TensorProductPolynomials
+{
+  public:
+                                    /**
+                                     * Constructor. @p{pols} is a
+                                     * vector of 1d polynomial
+                                     * functions. For polynomials of
+                                     * order @p{p} there should be
+                                     * @p{p+1} polynomials.
+                                     */
+    TensorProductPolynomials(const vector<Polynomial> &pols);
+
+                                    /**
+                                     * Calculates the shape values
+                                     * and shape grads at the
+                                     * @p{unit_point}.
+                                     */
+    void shape_values_and_grads(const Point<dim> &unit_point,
+                               vector<double> > &values,
+                               vector<Tensor<1,dim> > &grads,
+                               vector<Tensor<2,dim> > &grad_grads) const;
+
+                                    /**
+                                     * Exception.
+                                     */
+    DeclException3 (ExcDimensionMismatch2,
+                   int, int, int,
+                   << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3);
+
+           
+  private:
+                                    /**
+                                     * TODO: Implement use of
+                                     * SmartPointer later.
+                                     *
+                                     * Pointer to the @p{polynomials}
+                                     * given to the constructor.
+                                     */
+    const vector<Polynomial> *polynomials;
+}
+
+
+
+
+#endif

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.