]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix the first part of the problem in dof_tools_19, where we run aground because we...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Aug 2006 14:06:44 +0000 (14:06 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 7 Aug 2006 14:06:44 +0000 (14:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@13615 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/include/numerics/vectors.templates.h

index 3bdfccb08ae4dac2a9c25fbbd07bfbf3cf5cd30f..b50bf9c89bb2ca72633b1334164533d55955efee 100644 (file)
@@ -544,6 +544,26 @@ class VectorTools
                         const Quadrature<dim-1>  &q_boundary = QGauss<dim-1>(2),
                         const bool                project_to_boundary_first = false);
 
+                                    /**
+                                     * Declaration of specialization
+                                     * of the previous function for
+                                     * 1d. At present, it is not
+                                     * implemented.
+                                     *
+                                     * The default value of the boundary
+                                     * quadrature formula is an invalid
+                                     * object since it makes no sense in 1d.
+                                     */
+    template <class VECTOR>
+    static void project (const DoFHandler<1>      &dof,
+                        const ConstraintMatrix   &constraints,
+                        const Quadrature<1>      &quadrature,
+                        const Function<1>        &function,
+                        VECTOR                   &vec,
+                        const bool                enforce_zero_boundary = false,
+                        const Quadrature<0>      &q_boundary = *invalid_face_quadrature,
+                        const bool                project_to_boundary_first = false);
+    
                                     /**
                                      * Create a right hand side
                                      * vector. Prior content of the
index 97f5d4ef8b6016390dca4360e8caf2d4ac4dfd4f..98760a90c980c43549101e65ee4ce3d1f88f2627 100644 (file)
@@ -41,6 +41,9 @@
 #include <vector>
 #include <cmath>
 
+
+//TODO[RH]: Use StaticQ1Mapping where appropriate
+
 template <int dim>
 inline double sqr_point (const Tensor<1,dim> &p)
 {
@@ -298,6 +301,23 @@ void VectorTools::project (const Mapping<1>       &,
 }
 
 
+template <class VECTOR>
+void VectorTools::project (const DoFHandler<1>    &dof_handler,
+                          const ConstraintMatrix &constraints,
+                          const Quadrature<1>    &quadrature,
+                          const Function<1>      &function,
+                          VECTOR                 &vec_result,
+                          const bool              enforce_zero_boundary,
+                          const Quadrature<0>    &q_boundary,
+                          const bool              project_to_boundary_first)
+{
+  Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping"));
+  static const MappingQ1<1> mapping;
+  project (mapping, dof_handler, constraints, quadrature, function, vec_result,
+          enforce_zero_boundary, q_boundary, project_to_boundary_first);
+}
+
+
 #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.