]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Modify code to take into account that GeometryInfo::project_to_unit_cell now
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 May 2006 06:14:35 +0000 (06:14 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 May 2006 06:14:35 +0000 (06:14 +0000)
returns the projected point, rather than modifying the argument.

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

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

index fab9a727dd2d04f64b97ef40513658447f77221f..7c665cc40acdbd5c004be0367f066990d2177bec 100644 (file)
@@ -1798,13 +1798,14 @@ VectorTools::point_difference (const Mapping<dim>    &mapping,
                                    // first find the cell in which this point
                                    // is, initialize a quadrature rule with
                                    // it, and then a FEValues object
-  std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
+  const std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
     cell_point = GridTools::find_active_cell_around_point (mapping, dof, point);
 
-  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10, ExcInternalError());
-  GeometryInfo<dim>::project_to_unit_cell(cell_point.second);
+  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
+         ExcInternalError());
   
-  const Quadrature<dim> quadrature (cell_point.second);
+  const Quadrature<dim>
+    quadrature (GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
   FEValues<dim> fe_values(mapping, fe, quadrature, update_values);
   fe_values.reinit(cell_point.first);
 
@@ -1867,14 +1868,16 @@ VectorTools::point_value (const Mapping<dim>    &mapping,
                                    // first find the cell in which this point
                                    // is, initialize a quadrature rule with
                                    // it, and then a FEValues object
-  std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
-    cell_point = GridTools::find_active_cell_around_point (mapping, dof, point);
+  const std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
+    cell_point
+    = GridTools::find_active_cell_around_point (mapping, dof, point);
 
-  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10, ExcInternalError());
+  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
+         ExcInternalError());
+
+  const Quadrature<dim>
+    quadrature (GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
 
-  GeometryInfo<dim>::project_to_unit_cell(cell_point.second);
-  
-  const Quadrature<dim> quadrature (cell_point.second);
   FEValues<dim> fe_values(mapping, fe, quadrature, update_values);
   fe_values.reinit(cell_point.first);
 
@@ -1903,14 +1906,14 @@ VectorTools::point_value (const Mapping<dim>    &mapping,
                                    // first find the cell in which this point
                                    // is, initialize a quadrature rule with
                                    // it, and then a FEValues object
-  std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
+  const std::pair<typename DoFHandler<dim>::active_cell_iterator, Point<dim> >
     cell_point = GridTools::find_active_cell_around_point (mapping, dof, point);
 
-  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10, ExcInternalError());
-
-  GeometryInfo<dim>::project_to_unit_cell(cell_point.second);
+  Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
+         ExcInternalError());
   
-  const Quadrature<dim> quadrature (cell_point.second);
+  const Quadrature<dim>
+    quadrature (GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
   FEValues<dim> fe_values(mapping, fe, quadrature, update_values);
   fe_values.reinit(cell_point.first);
 

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.