]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Adjust implementation of laplace_transform to what had been documented.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Mar 2014 03:13:45 +0000 (03:13 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 24 Mar 2014 03:13:45 +0000 (03:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@32684 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/grid/grid_tools.h
deal.II/source/grid/grid_generator.cc

index 4f58f53eeeccbb5d1e109c4aa4ac5bf124c29e74..c45afc16b7d3645ff4b145b0c821e35d1f17fbaf 100644 (file)
@@ -56,7 +56,7 @@ inconvenience this causes.
   longer supported. Comparing for equality is done using '==' instead of '='.
   <br>
   (Timo Heister, 2014/02/10)
-  </li>  
+  </li>
 
   <li> Changed: The various classes generating graphical output, such
   as DataOut or DataOutStack, are all derived from a common interface
@@ -91,10 +91,10 @@ inconvenience this causes.
 
 <ol>
   <li> Changed: The functionparser library bundled with deal.II got replaced
-  by the muparser library.  
+  by the muparser library.
   <br>
   (Timo Heister, 2014/02/10)
-  </li>  
+  </li>
 
   <li> Changed: It was possible to call DoFAccessor::set_active_fe_index()
   on non-active cells. However, this made no sense: Since degrees of
@@ -148,6 +148,14 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Fixed: GridTools::laplace_transform had previously announced in
+  the documentation that one can also set the location of interior points,
+  but this was not in fact what was implemented. This has now been fixed:
+  the code can now do that.
+  <br>
+  (Denis Davydov, Wolfgang Bangerth, 2014/03/23)
+  </li>
+
   <li> Improved: Inhomogeneous tangential and normal flow constraints can
        now be treated via VectorTools::compute_nonzero_normal_flux_constraints
        and VectorTools::compute_nonzero_tangential_flux_constraints.
@@ -174,7 +182,7 @@ inconvenience this causes.
   <br>
   (Markus B&uuml;rg, 2014/03/10)
   </li>
-  
+
   <li> Fixed: ParameterHandler will no longer output an error if the file
   to be read ends with "end" without a newline.
   <br>
index a439b3da7b1122c5b6367b12575f5009a0d94f52..1622a618f11299af71eea612d52fbeb1ee430372 100644 (file)
@@ -236,8 +236,8 @@ namespace GridTools
                Triangulation<2> &triangulation);
 
   /**
-   * Transform the given triangulation smoothly to a different domain where
-   * each of the vertices at the boundary of the triangulation is mapped to
+   * Transform the given triangulation smoothly to a different domain where,
+   * typically, each of the vertices at the boundary of the triangulation is mapped to
    * the corresponding points in the @p new_points map.
    *
    * The way this function works is that it solves a Laplace equation for each
index 954a06b25a2a143480bfa07c47e3303122f42bb4..d20a4acfabde27998154ca51d9dd2ffc21025df1 100644 (file)
@@ -3592,33 +3592,34 @@ namespace GridGenerator
     // set up the boundary values for
     // the laplace problem
     std::vector<std::map<unsigned int,double> > m(dim);
-    typename std::map<unsigned int,Point<dim> >::const_iterator map_iter;
     typename std::map<unsigned int,Point<dim> >::const_iterator map_end=new_points.end();
 
     // fill these maps using the data
     // given by new_points
     typename DoFHandler<dim>::cell_iterator cell=dof_handler.begin_active(),
-                                            endc=dof_handler.end();
-    typename DoFHandler<dim>::face_iterator face;
+        endc=dof_handler.end();
     for (; cell!=endc; ++cell)
       {
-        if (cell->at_boundary())
-          for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
-            {
-              face=cell->face(face_no);
-              if (face->at_boundary())
-                for (unsigned int vertex_no=0;
-                     vertex_no<GeometryInfo<dim>::vertices_per_face; ++vertex_no)
-                  {
-                    const unsigned int vertex_index=face->vertex_index(vertex_no);
-                    map_iter=new_points.find(vertex_index);
+        for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
+          {
+            const typename DoFHandler<dim>::face_iterator face=cell->face(face_no);
 
-                    if (map_iter!=map_end)
-                      for (unsigned int i=0; i<dim; ++i)
-                        m[i].insert(std::pair<unsigned int,double> (
-                                      face->vertex_dof_index(vertex_no, 0), map_iter->second(i)));
-                  }
-            }
+            // loop over all vertices of the cell and see if it is listed in the map
+            // given as first argument of the function
+            for (unsigned int vertex_no=0;
+                vertex_no<GeometryInfo<dim>::vertices_per_face; ++vertex_no)
+              {
+                const unsigned int vertex_index=face->vertex_index(vertex_no);
+
+                const typename std::map<unsigned int,Point<dim> >::const_iterator map_iter
+                = new_points.find(vertex_index);
+
+                if (map_iter!=map_end)
+                  for (unsigned int i=0; i<dim; ++i)
+                    m[i].insert(std::pair<unsigned int,double> (
+                        face->vertex_dof_index(vertex_no, 0), map_iter->second(i)));
+              }
+          }
       }
 
     // solve the dim problems with

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.