]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove template arg from VectorTools.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Dec 1999 09:45:48 +0000 (09:45 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Dec 1999 09:45:48 +0000 (09:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@2085 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Attic/examples/convergence/convergence.cc
deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc
deal.II/deal.II/Attic/examples/multigrid/multigrid.cc
deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/source/numerics/base.cc
deal.II/deal.II/source/numerics/vectors.cc
tests/big-tests/convergence/convergence.cc
tests/big-tests/error-estimation/error-estimation.cc
tests/big-tests/multigrid/multigrid.cc
tests/deal.II/wave-test-3.cc

index 3c06838402319238c3bf3eda45e5aae46bff4482..3b09adeaede28c0dc740b7be14abc0d891415d51 100644 (file)
@@ -350,7 +350,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          l1_error_per_cell,
                                          *quadrature, L1_norm);
@@ -358,7 +358,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l1_error.push_back (l1_error_per_cell.l1_norm());
 
   cout << "    Calculating L2 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          l2_error_per_cell,
                                          *quadrature, L2_norm);
@@ -366,7 +366,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l2_error.push_back (l2_error_per_cell.l2_norm());
 
   cout << "    Calculating L-infinity error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          linfty_error_per_cell,
                                          *quadrature, Linfty_norm);
@@ -374,7 +374,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   linfty_error.push_back (linfty_error_per_cell.linfty_norm());
   
   cout << "    Calculating H1-seminorm error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          h1_seminorm_error_per_cell,
                                          *quadrature, H1_seminorm);
@@ -382,7 +382,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
 
   cout << "    Calculating H1 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          h1_error_per_cell,
                                          *quadrature, H1_norm);
@@ -407,12 +407,12 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 //       Vector<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
-//       VectorTools<dim>::project (*dof, constraints, *fe,
+//       VectorTools::project (*dof, constraints, *fe,
 //                              StraightBoundary<dim>(), *quadrature, 
 //                              sol, projected_solution, false,
 //                              *boundary_quadrature);
 //       cout << "    Calculating L2 error of projected solution... ";
-//       VectorTools<dim>::integrate_difference (*dof_handler,
+//       VectorTools::integrate_difference (*dof_handler,
 //                                           projected_solution, sol,
 //                                           l2_error_per_cell,
 //                                           *quadrature, *fe, L2_norm);
index 9d6b65fdbe96956b2d1f5ccc561bbdabb516c368..2aa1b4e5dac9403e9b901f82a8ca4a6dadbfb1b5 100644 (file)
@@ -521,7 +521,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       QGauss3<dim>  q;
   
       cout << "    Calculating L2 error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              l2_error_per_cell, q,
                                              L2_norm);
@@ -529,7 +529,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       l2_error.push_back (l2_error_per_cell.l2_norm());
 
       cout << "    Calculating L-infinity error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              linfty_error_per_cell, q,
                                              Linfty_norm);
@@ -537,7 +537,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       linfty_error.push_back (linfty_error_per_cell.linfty_norm());
 
       cout << "    Calculating H1 error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              h1_error_per_cell, q, 
                                              H1_norm);
index a862bdda17bc3abb27c3f80ee86ee594e2bd8d58..a4bfcc9fab385854455b6ee68b03b8a166677f39 100644 (file)
@@ -399,7 +399,7 @@ void PoissonProblem<dim>::assemble (const Equation<dim>      &equation,
 
   for (FunctionMap::const_iterator bc=dirichlet_bc.begin();
        bc != dirichlet_bc.end(); ++bc)
-    VectorTools<dim>::interpolate_boundary_values (*dof,
+    VectorTools::interpolate_boundary_values (*dof,
                                                   bc->first,
                                                   *bc->second,
                                                   boundary_value_list);
@@ -511,7 +511,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          l1_error_per_cell,
                                          *quadrature, L1_norm);
@@ -519,7 +519,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l1_error.push_back (l1_error_per_cell.l1_norm());
 
   cout << "    Calculating L2 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          l2_error_per_cell,
                                          *quadrature, L2_norm);
@@ -527,7 +527,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l2_error.push_back (l2_error_per_cell.l2_norm());
 
   cout << "    Calculating L-infinity error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          linfty_error_per_cell,
                                          *quadrature, Linfty_norm);
@@ -535,7 +535,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   linfty_error.push_back (linfty_error_per_cell.linfty_norm());
   
   cout << "    Calculating H1-seminorm error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          h1_seminorm_error_per_cell,
                                          *quadrature, H1_seminorm);
@@ -543,7 +543,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
 
   cout << "    Calculating H1 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          h1_error_per_cell,
                                          *quadrature, H1_norm);
@@ -568,12 +568,12 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 //       Vector<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
-//       VectorTools<dim>::project (*dof, constraints, *fe,
+//       VectorTools::project (*dof, constraints, *fe,
 //                              StraightBoundary<dim>(), *quadrature, 
 //                              sol, projected_solution, false,
 //                              *boundary_quadrature);
 //       cout << "    Calculating L2 error of projected solution... ";
-//       VectorTools<dim>::integrate_difference (*dof,
+//       VectorTools::integrate_difference (*dof,
 //                                           projected_solution, sol,
 //                                           l2_error_per_cell,
 //                                           *quadrature, *fe, L2_norm);
index 521261f480ca187b1158976d6ad2ecfce01232a6..675fa5a0f58366e64d49ac0d49fadeda3bf0d409 100644 (file)
@@ -251,24 +251,9 @@ enum NormType {
  *
  * @author Wolfgang Bangerth, 1998
  */
-template <int dim>
 class VectorTools
 {
   public:
-                                    /**
-                                     * Declare a data type which denotes a
-                                     * mapping between a boundary indicator
-                                     * and the function denoting the boundary
-                                     * values on this part of the boundary.
-                                     * Only one boundary function may be given
-                                     * for each boundary indicator, which is
-                                     * guaranteed by the #map# data type.
-                                     * 
-                                     * See the general documentation of this
-                                     * class for more detail.
-                                     */
-    typedef map<unsigned char,const Function<dim>*> FunctionMap;
-
                                     /**
                                      * Compute the interpolation of
                                      * #function# at the support
@@ -281,6 +266,7 @@ class VectorTools
                                      * See the general documentation of this
                                      * class for further information.
                                      */
+    template <int dim>
     static void interpolate (const DoFHandler<dim>    &dof,
                             const Function<dim>      &function,
                             Vector<double>           &vec);
@@ -297,11 +283,12 @@ class VectorTools
                                      * #transfer#. Curved boundaries
                                      * are neglected so far.
                                      */
-    static void interpolate(const DoFHandler<dim>    &high_dof,
-                           const DoFHandler<dim>    &low_dof,
-                           const FullMatrix<double> &transfer,
-                           const Vector<double>     &high,
-                           Vector<double>           &low);
+    template <int dim>
+    static void interpolate (const DoFHandler<dim>    &high_dof,
+                            const DoFHandler<dim>    &low_dof,
+                            const FullMatrix<double> &transfer,
+                            const Vector<double>     &high,
+                            Vector<double>           &low);
                          
                                     /**
                                      * Compute the projection of
@@ -335,6 +322,7 @@ class VectorTools
                                      * See the general documentation of this
                                      * class for further information.
                                      */
+    template <int dim>
     static void project (const DoFHandler<dim>    &dof,
                         const ConstraintMatrix   &constraints,
                         const Quadrature<dim>    &quadrature,
@@ -350,6 +338,7 @@ class VectorTools
                                      * See the general documentation of this
                                      * class for further information.
                                      */                                      
+    template <int dim>
     static void create_right_hand_side (const DoFHandler<dim>    &dof,
                                        const Quadrature<dim>    &q,
                                        const Function<dim>      &rhs,
@@ -398,6 +387,7 @@ class VectorTools
                                      * See the general doc for more
                                      * information.
                                      */
+    template <int dim>
     static void interpolate_boundary_values (const DoFHandler<dim> &dof,
                                             const unsigned char    boundary_component,
                                             const Function<dim>   &boundary_function,
@@ -425,8 +415,9 @@ class VectorTools
                                      * See the general documentation of this
                                      * class for further information.
                                      */
+    template <int dim>
     static void project_boundary_values (const DoFHandler<dim>  &dof,
-                                        const FunctionMap      &boundary_function,
+                                        const map<unsigned char,const Function<dim>*> &boundary_function,
                                         const Quadrature<dim-1>&q,
                                         map<int,double>        &boundary_values);
     
@@ -473,6 +464,7 @@ class VectorTools
                                      * See the general documentation of this
                                      * class for more information.
                                      */
+    template <int dim>
     static void integrate_difference (const DoFHandler<dim>    &dof,
                                      const Vector<double>     &fe_function,
                                      const Function<dim>      &exact_solution,
index 67db86386ee5069801cc6942b40ccc6cb49af6fe..a393d3bd43b979b138d1e89f79f9a56346b5870e 100644 (file)
@@ -129,10 +129,10 @@ void ProblemBase<dim>::assemble (const Equation<dim>      &equation,
 
   for (FunctionMap::const_iterator dirichlet = dirichlet_bc.begin() ;
        dirichlet != dirichlet_bc.end() ; ++dirichlet)
-    VectorTools<dim>::interpolate_boundary_values (*dof_handler,
-                                                  dirichlet->first,
-                                                  *(dirichlet->second), 
-                                                  boundary_value_list);
+    VectorTools::interpolate_boundary_values (*dof_handler,
+                                             dirichlet->first,
+                                             *(dirichlet->second), 
+                                             boundary_value_list);
   MatrixTools<dim>::apply_boundary_values (boundary_value_list,
                                           system_matrix, solution,
                                           right_hand_side);  
index ea5463742994bb03ae4849a285e6c7f99cc1d462..85d464b889bf8c896417a92d6a52dc8f441b84d7 100644 (file)
@@ -43,9 +43,9 @@ inline double sqr_point (const Tensor<1,dim> &p) {
 
 
 template <int dim>
-void VectorTools<dim>::interpolate (const DoFHandler<dim> &dof,
-                                   const Function<dim>   &function,
-                                   Vector<double>        &vec)
+void VectorTools::interpolate (const DoFHandler<dim> &dof,
+                              const Function<dim>   &function,
+                              Vector<double>        &vec)
 {
   Assert (dof.get_fe().n_components() == function.n_components,
          ExcComponentMismatch());
@@ -276,11 +276,11 @@ void VectorTools<dim>::interpolate (const DoFHandler<dim> &dof,
 
 
 template <int dim> void
-VectorTools<dim>::interpolate(const DoFHandler<dim>           &high_dof,
-                             const DoFHandler<dim>           &low_dof,
-                             const FullMatrix<double>        &transfer,
-                             const Vector<double>            &high,
-                             Vector<double>                  &low)
+VectorTools::interpolate(const DoFHandler<dim>           &high_dof,
+                        const DoFHandler<dim>           &low_dof,
+                        const FullMatrix<double>        &transfer,
+                        const Vector<double>            &high,
+                        Vector<double>                  &low)
 {
   Vector<double> cell_high(high_dof.get_fe().dofs_per_cell);
   Vector<double> cell_low(low_dof.get_fe().dofs_per_cell);
@@ -302,14 +302,14 @@ VectorTools<dim>::interpolate(const DoFHandler<dim>           &high_dof,
 #if deal_II_dimension == 1
 
 template <>
-void VectorTools<1>::project (const DoFHandler<1>    &,
-                             const ConstraintMatrix &,
-                             const Quadrature<1>    &,
-                             const Function<1>      &,
-                             Vector<double>         &,
-                             const bool              ,
-                             const Quadrature<0>    &,
-                             const bool              ) {
+void VectorTools::project (const DoFHandler<1>    &,
+                          const ConstraintMatrix &,
+                          const Quadrature<1>    &,
+                          const Function<1>      &,
+                          Vector<double>         &,
+                          const bool              ,
+                          const Quadrature<0>    &,
+                          const bool              ) {
                                   // this function should easily be implemented
                                   // using the template below. However some
                                   // changes have to be made since faces don't
@@ -325,14 +325,14 @@ void VectorTools<1>::project (const DoFHandler<1>    &,
 
 
 template <int dim>
-void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
-                               const ConstraintMatrix   &constraints,
-                               const Quadrature<dim>    &quadrature,
-                               const Function<dim>      &function,
-                               Vector<double>           &vec,
-                               const bool                enforce_zero_boundary,
-                               const Quadrature<dim-1>  &q_boundary,
-                               const bool                project_to_boundary_first)
+void VectorTools::project (const DoFHandler<dim>    &dof,
+                          const ConstraintMatrix   &constraints,
+                          const Quadrature<dim>    &quadrature,
+                          const Function<dim>      &function,
+                          Vector<double>           &vec,
+                          const bool                enforce_zero_boundary,
+                          const Quadrature<dim-1>  &q_boundary,
+                          const bool                project_to_boundary_first)
 {
   Assert (dof.get_fe().n_components() == function.n_components,
          ExcInvalidFE());
@@ -373,7 +373,7 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
                                         // the different boundary parts. We want the
                                         // #function# to hold on all parts of the
                                         // boundary
-       FunctionMap boundary_functions;
+       map<unsigned char,const Function<dim>*> boundary_functions;
        for (unsigned char c=0; c<255; ++c)
          boundary_functions[c] = &function;
        project_boundary_values (dof, boundary_functions, q_boundary,
@@ -405,7 +405,7 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
       MatrixCreator<dim>::create_mass_matrix (dof, quadrature, mass_matrix);
     };
   
-  VectorTools<dim>::create_right_hand_side (dof, quadrature, function, tmp);
+  VectorTools::create_right_hand_side (dof, quadrature, function, tmp);
 
   constraints.condense (mass_matrix);
   constraints.condense (tmp);
@@ -431,10 +431,10 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
 
 
 template <int dim>
-void VectorTools<dim>::create_right_hand_side (const DoFHandler<dim>    &dof,
-                                              const Quadrature<dim>    &quadrature,
-                                              const Function<dim>      &rhs,
-                                              Vector<double>           &rhs_vector)
+void VectorTools::create_right_hand_side (const DoFHandler<dim>    &dof,
+                                         const Quadrature<dim>    &quadrature,
+                                         const Function<dim>      &rhs,
+                                         Vector<double>           &rhs_vector)
 {
   Assert (dof.get_fe().n_components() == rhs.n_components,
          ExcComponentMismatch());
@@ -466,11 +466,11 @@ void VectorTools<dim>::create_right_hand_side (const DoFHandler<dim>    &dof,
 
 template <>
 void
-VectorTools<1>::interpolate_boundary_values (const DoFHandler<1> &dof,
-                                            const unsigned char  boundary_component,
-                                            const Function<1>   &boundary_function,
-                                            map<int,double>     &boundary_values,
-                                            const vector<bool>  &component_mask_)
+VectorTools::interpolate_boundary_values (const DoFHandler<1> &dof,
+                                         const unsigned char  boundary_component,
+                                         const Function<1>   &boundary_function,
+                                         map<int,double>     &boundary_values,
+                                         const vector<bool>  &component_mask_)
 {
   Assert (boundary_component != 255,
          ExcInvalidBoundaryIndicator());
@@ -549,11 +549,11 @@ VectorTools<1>::interpolate_boundary_values (const DoFHandler<1> &dof,
 
 template <int dim>
 void
-VectorTools<dim>::interpolate_boundary_values (const DoFHandler<dim> &dof,
-                                              const unsigned char    boundary_component,
-                                              const Function<dim>   &boundary_function,
-                                              map<int,double>       &boundary_values,
-                                              const vector<bool>    &component_mask_)
+VectorTools::interpolate_boundary_values (const DoFHandler<dim> &dof,
+                                         const unsigned char    boundary_component,
+                                         const Function<dim>   &boundary_function,
+                                         map<int,double>       &boundary_values,
+                                         const vector<bool>    &component_mask_)
 {
   Assert (boundary_component != 255,
          ExcInvalidBoundaryIndicator());
@@ -632,10 +632,10 @@ VectorTools<dim>::interpolate_boundary_values (const DoFHandler<dim> &dof,
 
 template <int dim>
 void
-VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
-                                          const FunctionMap        &boundary_functions,
-                                          const Quadrature<dim-1>  &q,
-                                          map<int,double>          &boundary_values)
+VectorTools::project_boundary_values (const DoFHandler<dim>    &dof,
+                                     const map<unsigned char,const Function<dim>*>        &boundary_functions,
+                                     const Quadrature<dim-1>  &q,
+                                     map<int,double>          &boundary_values)
 {
   Assert (dof.get_fe().n_components() == boundary_functions.begin()->second->n_components,
          ExcComponentMismatch());
@@ -715,13 +715,13 @@ VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
 
 template <int dim>
 void
-VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
-                                       const Vector<double>     &fe_function,
-                                       const Function<dim>      &exact_solution,
-                                       Vector<float>            &difference,
-                                       const Quadrature<dim>    &q,
-                                       const NormType           &norm,
-                                       const Function<dim>      *weight)
+VectorTools::integrate_difference (const DoFHandler<dim>    &dof,
+                                  const Vector<double>     &fe_function,
+                                  const Function<dim>      &exact_solution,
+                                  Vector<float>            &difference,
+                                  const Quadrature<dim>    &q,
+                                  const NormType           &norm,
+                                  const Function<dim>      *weight)
 {
   const unsigned int        n_q_points   = q.n_quadrature_points;
   const FiniteElement<dim> &fe           = dof.get_fe();
@@ -946,10 +946,9 @@ VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
 
 
 
-template<int dim>
 void
-VectorTools<dim>::subtract_mean_value(Vector<double>     &v,
-                                     const vector<bool> &p_select)
+VectorTools::subtract_mean_value(Vector<double>     &v,
+                                const vector<bool> &p_select)
 {
   unsigned int n = v.size();
   Assert(n == p_select.size(), ExcDimensionMismatch(n, p_select.size()));
@@ -974,4 +973,46 @@ VectorTools<dim>::subtract_mean_value(Vector<double>     &v,
 
 
 // explicit instantiations
-template VectorTools<deal_II_dimension>;
+template
+void VectorTools::integrate_difference (const DoFHandler<deal_II_dimension> &,
+                                       const Vector<double>                &,
+                                       const Function<deal_II_dimension>   &,
+                                       Vector<float>                       &,
+                                       const Quadrature<deal_II_dimension> &,
+                                       const NormType                      &,
+                                       const Function<deal_II_dimension>   *);
+template
+void VectorTools::project_boundary_values (const DoFHandler<deal_II_dimension>  &,
+                                          const map<unsigned char,const Function<deal_II_dimension>*>&,
+                                          const Quadrature<deal_II_dimension-1>&,
+                                          map<int,double>        &);
+template
+void VectorTools::interpolate_boundary_values (const DoFHandler<deal_II_dimension> &,
+                                              const unsigned char,
+                                              const Function<deal_II_dimension>   &,
+                                              map<int,double>       &,
+                                              const vector<bool>    &);
+template
+void VectorTools::create_right_hand_side (const DoFHandler<deal_II_dimension> &,
+                                       const Quadrature<deal_II_dimension>   &,
+                                       const Function<deal_II_dimension>     &,
+                                       Vector<double>                        &);
+template
+void VectorTools::project (const DoFHandler<deal_II_dimension>   &,
+                          const ConstraintMatrix                &,
+                          const Quadrature<deal_II_dimension>   &,
+                          const Function<deal_II_dimension>     &,
+                          Vector<double>                        &,
+                          const bool,
+                          const Quadrature<deal_II_dimension-1> &,
+                          const bool);
+template
+void VectorTools::interpolate(const DoFHandler<deal_II_dimension> &,
+                             const DoFHandler<deal_II_dimension> &,
+                             const FullMatrix<double> &,
+                             const Vector<double>     &,
+                             Vector<double>           &);
+template
+void VectorTools::interpolate (const DoFHandler<deal_II_dimension> &,
+                              const Function<deal_II_dimension>   &,
+                              Vector<double>                      &);
index 3c06838402319238c3bf3eda45e5aae46bff4482..3b09adeaede28c0dc740b7be14abc0d891415d51 100644 (file)
@@ -350,7 +350,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          l1_error_per_cell,
                                          *quadrature, L1_norm);
@@ -358,7 +358,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l1_error.push_back (l1_error_per_cell.l1_norm());
 
   cout << "    Calculating L2 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          l2_error_per_cell,
                                          *quadrature, L2_norm);
@@ -366,7 +366,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l2_error.push_back (l2_error_per_cell.l2_norm());
 
   cout << "    Calculating L-infinity error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          linfty_error_per_cell,
                                          *quadrature, Linfty_norm);
@@ -374,7 +374,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   linfty_error.push_back (linfty_error_per_cell.linfty_norm());
   
   cout << "    Calculating H1-seminorm error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          h1_seminorm_error_per_cell,
                                          *quadrature, H1_seminorm);
@@ -382,7 +382,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
 
   cout << "    Calculating H1 error... ";
-  VectorTools<dim>::integrate_difference (*dof_handler,
+  VectorTools::integrate_difference (*dof_handler,
                                          solution, sol,
                                          h1_error_per_cell,
                                          *quadrature, H1_norm);
@@ -407,12 +407,12 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 //       Vector<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
-//       VectorTools<dim>::project (*dof, constraints, *fe,
+//       VectorTools::project (*dof, constraints, *fe,
 //                              StraightBoundary<dim>(), *quadrature, 
 //                              sol, projected_solution, false,
 //                              *boundary_quadrature);
 //       cout << "    Calculating L2 error of projected solution... ";
-//       VectorTools<dim>::integrate_difference (*dof_handler,
+//       VectorTools::integrate_difference (*dof_handler,
 //                                           projected_solution, sol,
 //                                           l2_error_per_cell,
 //                                           *quadrature, *fe, L2_norm);
index 9d6b65fdbe96956b2d1f5ccc561bbdabb516c368..2aa1b4e5dac9403e9b901f82a8ca4a6dadbfb1b5 100644 (file)
@@ -521,7 +521,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       QGauss3<dim>  q;
   
       cout << "    Calculating L2 error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              l2_error_per_cell, q,
                                              L2_norm);
@@ -529,7 +529,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       l2_error.push_back (l2_error_per_cell.l2_norm());
 
       cout << "    Calculating L-infinity error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              linfty_error_per_cell, q,
                                              Linfty_norm);
@@ -537,7 +537,7 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       linfty_error.push_back (linfty_error_per_cell.linfty_norm());
 
       cout << "    Calculating H1 error... ";
-      VectorTools<dim>::integrate_difference (*dof_handler,
+      VectorTools::integrate_difference (*dof_handler,
                                              solution, *solution_function,
                                              h1_error_per_cell, q, 
                                              H1_norm);
index a862bdda17bc3abb27c3f80ee86ee594e2bd8d58..a4bfcc9fab385854455b6ee68b03b8a166677f39 100644 (file)
@@ -399,7 +399,7 @@ void PoissonProblem<dim>::assemble (const Equation<dim>      &equation,
 
   for (FunctionMap::const_iterator bc=dirichlet_bc.begin();
        bc != dirichlet_bc.end(); ++bc)
-    VectorTools<dim>::interpolate_boundary_values (*dof,
+    VectorTools::interpolate_boundary_values (*dof,
                                                   bc->first,
                                                   *bc->second,
                                                   boundary_value_list);
@@ -511,7 +511,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          l1_error_per_cell,
                                          *quadrature, L1_norm);
@@ -519,7 +519,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l1_error.push_back (l1_error_per_cell.l1_norm());
 
   cout << "    Calculating L2 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          l2_error_per_cell,
                                          *quadrature, L2_norm);
@@ -527,7 +527,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   l2_error.push_back (l2_error_per_cell.l2_norm());
 
   cout << "    Calculating L-infinity error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          linfty_error_per_cell,
                                          *quadrature, Linfty_norm);
@@ -535,7 +535,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   linfty_error.push_back (linfty_error_per_cell.linfty_norm());
   
   cout << "    Calculating H1-seminorm error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          h1_seminorm_error_per_cell,
                                          *quadrature, H1_seminorm);
@@ -543,7 +543,7 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
 
   cout << "    Calculating H1 error... ";
-  VectorTools<dim>::integrate_difference (*dof,
+  VectorTools::integrate_difference (*dof,
                                          solution, sol,
                                          h1_error_per_cell,
                                          *quadrature, H1_norm);
@@ -568,12 +568,12 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 //       Vector<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
-//       VectorTools<dim>::project (*dof, constraints, *fe,
+//       VectorTools::project (*dof, constraints, *fe,
 //                              StraightBoundary<dim>(), *quadrature, 
 //                              sol, projected_solution, false,
 //                              *boundary_quadrature);
 //       cout << "    Calculating L2 error of projected solution... ";
-//       VectorTools<dim>::integrate_difference (*dof,
+//       VectorTools::integrate_difference (*dof,
 //                                           projected_solution, sol,
 //                                           l2_error_per_cell,
 //                                           *quadrature, *fe, L2_norm);
index a3b4da97776d5b3792f67f15cc857877ee0895b1..272686fcd3be4aee164a03714424e59a7b614c28 100644 (file)
@@ -5926,7 +5926,7 @@ void TimeStep_Dual<dim>::do_timestep ()
     {
       static const ZeroFunction<dim> boundary_values;
       
-      VectorTools<dim>::interpolate_boundary_values (*dof_handler, 0, boundary_values,
+      VectorTools::interpolate_boundary_values (*dof_handler, 0, boundary_values,
                                                     boundary_value_list);
       MatrixTools<dim>::apply_boundary_values (boundary_value_list,
                                               system_matrix, v,
@@ -8161,13 +8161,13 @@ void TimeStep_Primal<dim>::do_initial_step ()
 
                                   // use L2-projection for u0 and v0
 #if 2 == 1
-  VectorTools<dim>::interpolate (*dof_handler, *parameters.initial_u, u);
-  VectorTools<dim>::interpolate (*dof_handler, *parameters.initial_v, v);
+  VectorTools::interpolate (*dof_handler, *parameters.initial_u, u);
+  VectorTools::interpolate (*dof_handler, *parameters.initial_v, v);
 #else
-  VectorTools<dim>::project (*dof_handler, constraints,
+  VectorTools::project (*dof_handler, constraints,
                             quadrature, *parameters.initial_u, u,
                             false, quadrature_face, (dim==2 ? true : false));
-  VectorTools<dim>::project (*dof_handler, constraints,
+  VectorTools::project (*dof_handler, constraints,
                             quadrature, *parameters.initial_v, v,
                             false, quadrature_face, (dim==2 ? true : false));
 #endif
@@ -8255,7 +8255,7 @@ void TimeStep_Primal<dim>::do_timestep ()
       parameters.boundary_values_v->set_time (time);
       
       map<int,double> boundary_value_list;
-      VectorTools<dim>::interpolate_boundary_values (*dof_handler, 0,
+      VectorTools::interpolate_boundary_values (*dof_handler, 0,
                                                     *(parameters.boundary_values_u),
                                                     boundary_value_list);
       MatrixTools<dim>::apply_boundary_values (boundary_value_list,
@@ -8281,7 +8281,7 @@ void TimeStep_Primal<dim>::do_timestep ()
   if (dim != 1)
     {
       map<int,double> boundary_value_list;
-      VectorTools<dim>::interpolate_boundary_values (*dof_handler, 0,
+      VectorTools::interpolate_boundary_values (*dof_handler, 0,
                                                     *(parameters.boundary_values_v),
                                                     boundary_value_list);
       MatrixTools<dim>::apply_boundary_values (boundary_value_list,

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.