]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
compute_mean_value takes BlockVector
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Dec 2001 14:43:55 +0000 (14:43 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Dec 2001 14:43:55 +0000 (14:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@5325 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/source/numerics/vectors.cc

index dd2e555363c86789292732bf94c96e36b7bf6ac0..3b0a4bae0b12fbaf25072cef3d2c4b0ac9f16eb2 100644 (file)
@@ -844,22 +844,22 @@ class VectorTools
                                      * Stokes with complete Dirichlet
                                      * boundaries for the velocities.
                                      */
-    template <int dim>
+    template <int dim, class InVector>
     static double compute_mean_value (const Mapping<dim>    &mapping,
                                      const DoFHandler<dim> &dof,
                                      const Quadrature<dim> &quadrature,
-                                     Vector<double>        &v,
+                                     InVector              &v,
                                      const unsigned int     component);
     
                                     /**
-                                     * Calls the @p{integrate_difference}
+                                     * Calls the @p{compute_mean_value}
                                      * function, see above, with
                                      * @p{mapping=MappingQ1<dim>()}.
                                      */
-    template <int dim>
+    template <int dim, class InVector>
     static double compute_mean_value (const DoFHandler<dim> &dof,
                                      const Quadrature<dim> &quadrature,
-                                     Vector<double>        &v,
+                                     InVector              &v,
                                      const unsigned int     component);
 
                                     /**
index c2f8c94d66af3eace3aff7465542c57dfe1728e6..b2bbb2a0929be8bcefa0ed33d715f392c47a3723 100644 (file)
@@ -1408,12 +1408,12 @@ VectorTools::integrate_difference (const DoFHandler<dim>    &dof,
 
 
 
-template <int dim>
+template <int dim, class InVector>
 double
 VectorTools::compute_mean_value (const Mapping<dim>    &mapping,
                                 const DoFHandler<dim> &dof,
                                 const Quadrature<dim> &quadrature,
-                                Vector<double>        &v,
+                                InVector              &v,
                                 const unsigned int     component)
 {
   Assert (component < dof.get_fe().n_components(),
@@ -1445,11 +1445,11 @@ VectorTools::compute_mean_value (const Mapping<dim>    &mapping,
 };
 
 
-template <int dim>
+template <int dim, class InVector>
 double
 VectorTools::compute_mean_value (const DoFHandler<dim> &dof,
                                 const Quadrature<dim> &quadrature,
-                                Vector<double>        &v,
+                                InVector              &v,
                                 const unsigned int     component)
 {
   Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping"));
@@ -1704,18 +1704,56 @@ void VectorTools::project_boundary_values (const DoFHandler<deal_II_dimension>
                                           const FunctionMap<deal_II_dimension>::type &,
                                           const Quadrature<deal_II_dimension-1>&,
                                           std::map<unsigned int,double>        &);
+
 template
-double VectorTools::compute_mean_value (const Mapping<deal_II_dimension>    &,
-                                       const DoFHandler<deal_II_dimension> &,
-                                       const Quadrature<deal_II_dimension> &,
-                                       Vector<double>                      &,
+double VectorTools::compute_mean_value (const Mapping<deal_II_dimension>&,
+                                       const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       Vector<double>&,
                                        const unsigned int);
 template
-double VectorTools::compute_mean_value (const DoFHandler<deal_II_dimension> &,
-                                       const Quadrature<deal_II_dimension> &,
-                                       Vector<double>                      &,
+double VectorTools::compute_mean_value (const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       Vector<double>&,
+                                       const unsigned int);
+
+template
+double VectorTools::compute_mean_value (const Mapping<deal_II_dimension>&,
+                                       const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       BlockVector<double>&,
+                                       const unsigned int);
+template
+double VectorTools::compute_mean_value (const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       BlockVector<double>&,
+                                       const unsigned int);
+
+template
+double VectorTools::compute_mean_value (const Mapping<deal_II_dimension>&,
+                                       const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       Vector<float>&,
+                                       const unsigned int);
+template
+double VectorTools::compute_mean_value (const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       Vector<float>&,
                                        const unsigned int);
 
+template
+double VectorTools::compute_mean_value (const Mapping<deal_II_dimension>&,
+                                       const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       BlockVector<float>&,
+                                       const unsigned int);
+template
+double VectorTools::compute_mean_value (const DoFHandler<deal_II_dimension>&,
+                                       const Quadrature<deal_II_dimension>&,
+                                       BlockVector<float>&,
+                                       const unsigned int);
+
+
 
 // the following two functions are not derived from a template in 1d
 // and thus need no explicit instantiation

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.