]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed bug in DoFTools::map_dofs_to_support_points that prevented it from working...
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 5 Apr 2009 17:27:57 +0000 (17:27 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 5 Apr 2009 17:27:57 +0000 (17:27 +0000)
codimension one meshes.

git-svn-id: https://svn.dealii.org/trunk@18551 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_tools.h
deal.II/deal.II/source/dofs/dof_tools.cc

index ffdfb14edc32869994d2a0270fbf1e4a2619b277..d62ecf4e6f96213867d40cc09682712c0bb42f2b 100644 (file)
@@ -1688,7 +1688,7 @@ class DoFTools
     static void
     map_dofs_to_support_points (const Mapping<dim,spacedim>       &mapping,
                                const DoFHandler<dim,spacedim>    &dof_handler,
-                               std::vector<Point<dim> > &support_points);
+                               std::vector<Point<spacedim> > &support_points);
 
                                     /**
                                      * This is the opposite function
@@ -1721,7 +1721,7 @@ class DoFTools
     static void
     map_support_points_to_dofs (const Mapping<DH::dimension, DH::space_dimension> &mapping,
                                const DH                     &dof_handler,
-                               std::map<Point<DH::dimension>, unsigned int, Comp> &point_to_index_map);
+                               std::map<Point<DH::space_dimension>, unsigned int, Comp> &point_to_index_map);
 
                                     /**
                                      * Map a coupling table from the
@@ -1997,12 +1997,12 @@ void
 DoFTools::map_support_points_to_dofs (
   const Mapping<DH::dimension,DH::space_dimension> &mapping,
   const DH                     &dof_handler,
-  std::map<Point<DH::dimension>, unsigned int, Comp> &point_to_index_map)
+  std::map<Point<DH::space_dimension>, unsigned int, Comp> &point_to_index_map)
 {
                                   // let the checking of arguments be
                                   // done by the function first
                                   // called
-  std::vector<Point<DH::dimension> > support_points (dof_handler.n_dofs());
+  std::vector<Point<DH::space_dimension> > support_points (dof_handler.n_dofs());
   map_dofs_to_support_points (mapping, dof_handler, support_points);
                                   // now copy over the results of the
                                   // previous function into the
index 3545b3fff2f92258dbae500a14f7db1aaa157ea1..b015033dd49a6fbe298a84a0219b217adf0b5f5a 100644 (file)
@@ -5134,7 +5134,7 @@ template <int dim, int spacedim>
 void
 DoFTools::map_dofs_to_support_points (const Mapping<dim,spacedim>       &mapping,
                                      const DoFHandler<dim,spacedim>    &dof_handler,
-                                     std::vector<Point<dim> > &support_points)
+                                     std::vector<Point<spacedim> > &support_points)
 {
   const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
   
@@ -5158,8 +5158,8 @@ DoFTools::map_dofs_to_support_points (const Mapping<dim,spacedim>       &mapping
                                   // rule are set to invalid values
                                   // by the used constructor.
   Quadrature<dim> q_dummy(dof_handler.get_fe().get_unit_support_points());
-  FEValues<dim> fe_values (mapping, dof_handler.get_fe(),
-                          q_dummy, update_quadrature_points);
+  FEValues<dim,spacedim> fe_values (mapping, dof_handler.get_fe(),
+                                   q_dummy, update_quadrature_points);
   typename DoFHandler<dim,spacedim>::active_cell_iterator
     cell = dof_handler.begin_active(),
     endc = dof_handler.end();
@@ -5169,7 +5169,7 @@ DoFTools::map_dofs_to_support_points (const Mapping<dim,spacedim>       &mapping
     {
       fe_values.reinit (cell);
       cell->get_dof_indices (local_dof_indices);
-      const std::vector<Point<dim> > & points
+      const std::vector<Point<spacedim> > & points
        = fe_values.get_quadrature_points ();
       for (unsigned int i=0; i<dofs_per_cell; ++i)
        support_points[local_dof_indices[i]] = points[i];
@@ -5857,6 +5857,17 @@ DoFTools::map_dofs_to_support_points<deal_II_dimension>
  const DoFHandler<deal_II_dimension>&,
  std::vector<Point<deal_II_dimension> >&);
 
+#if deal_II_dimension != 3
+
+template
+void
+DoFTools::map_dofs_to_support_points<deal_II_dimension,deal_II_dimension+1>
+(const Mapping<deal_II_dimension,deal_II_dimension+1>&,
+ const DoFHandler<deal_II_dimension, deal_II_dimension+1>&,
+ std::vector<Point<deal_II_dimension+1> >&);
+
+#endif
+
 template
 void
 DoFTools::convert_couplings_to_blocks (

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.