From d1029d86a4f8e15da5adc05ad444ba6954fa201e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 24 Mar 2014 03:13:45 +0000 Subject: [PATCH] Adjust implementation of laplace_transform to what had been documented. git-svn-id: https://svn.dealii.org/trunk@32684 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 16 +++++++--- deal.II/include/deal.II/grid/grid_tools.h | 4 +-- deal.II/source/grid/grid_generator.cc | 39 ++++++++++++----------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 4f58f53eee..c45afc16b7 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -56,7 +56,7 @@ inconvenience this causes. longer supported. Comparing for equality is done using '==' instead of '='.
(Timo Heister, 2014/02/10) - +
  • 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.
    1. Changed: The functionparser library bundled with deal.II got replaced - by the muparser library. + by the muparser library.
      (Timo Heister, 2014/02/10) -
    2. +
    3. 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.

      Specific improvements

        +
      1. 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. +
        + (Denis Davydov, Wolfgang Bangerth, 2014/03/23) +
      2. +
      3. 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.
        (Markus Bürg, 2014/03/10)
      4. - +
      5. Fixed: ParameterHandler will no longer output an error if the file to be read ends with "end" without a newline.
        diff --git a/deal.II/include/deal.II/grid/grid_tools.h b/deal.II/include/deal.II/grid/grid_tools.h index a439b3da7b..1622a618f1 100644 --- a/deal.II/include/deal.II/grid/grid_tools.h +++ b/deal.II/include/deal.II/grid/grid_tools.h @@ -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 diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index 954a06b25a..d20a4acfab 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -3592,33 +3592,34 @@ namespace GridGenerator // set up the boundary values for // the laplace problem std::vector > m(dim); - typename std::map >::const_iterator map_iter; typename std::map >::const_iterator map_end=new_points.end(); // fill these maps using the data // given by new_points typename DoFHandler::cell_iterator cell=dof_handler.begin_active(), - endc=dof_handler.end(); - typename DoFHandler::face_iterator face; + endc=dof_handler.end(); for (; cell!=endc; ++cell) { - if (cell->at_boundary()) - for (unsigned int face_no=0; face_no::faces_per_cell; ++face_no) - { - face=cell->face(face_no); - if (face->at_boundary()) - for (unsigned int vertex_no=0; - vertex_no::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::faces_per_cell; ++face_no) + { + const typename DoFHandler::face_iterator face=cell->face(face_no); - if (map_iter!=map_end) - for (unsigned int i=0; i ( - 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::vertices_per_face; ++vertex_no) + { + const unsigned int vertex_index=face->vertex_index(vertex_no); + + const typename std::map >::const_iterator map_iter + = new_points.find(vertex_index); + + if (map_iter!=map_end) + for (unsigned int i=0; i ( + face->vertex_dof_index(vertex_no, 0), map_iter->second(i))); + } + } } // solve the dim problems with -- 2.39.5