]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move create_union_triangulation() and extract_boundary_mesh(). 103/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 21 Aug 2014 11:24:06 +0000 (06:24 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 21 Aug 2014 11:24:42 +0000 (06:24 -0500)
These functions were previously in GridTools, but conceptually they create
meshes and so should be in GridGenerator. Move them there but leave the
old functions in GridTools with a note that they are now deprecated.

Also structure the documentation of the functions in GridGenerator better.

31 files changed:
doc/news/changes.h
include/deal.II/grid/grid_generator.h
include/deal.II/grid/grid_tools.h
source/grid/grid_generator.cc
source/grid/grid_generator.inst.in
source/grid/grid_tools.cc
source/grid/grid_tools.inst.in
tests/codim_one/boundary_indicator_01.cc
tests/codim_one/data_out_03.cc
tests/codim_one/direction_flag_01.cc
tests/codim_one/direction_flag_02.cc
tests/codim_one/extract_boundary_mesh_00.cc
tests/codim_one/extract_boundary_mesh_01.cc
tests/codim_one/extract_boundary_mesh_02.cc
tests/codim_one/extract_boundary_mesh_03.cc
tests/codim_one/extract_boundary_mesh_04.cc
tests/codim_one/extract_boundary_mesh_05.cc
tests/codim_one/extract_boundary_mesh_06.cc
tests/codim_one/extract_boundary_mesh_07.cc
tests/codim_one/hanging_nodes_01.cc
tests/codim_one/hanging_nodes_02.cc
tests/codim_one/hanging_nodes_03.cc
tests/codim_one/interpolate_boundary_values_03.cc
tests/codim_one/interpolate_boundary_values_1d_closed_ring.cc
tests/codim_one/mapping_01.cc
tests/codim_one/mapping_02.cc
tests/codim_one/normal_vectors_01.cc
tests/codim_one/transform_01.cc
tests/deal.II/union_triangulation.cc
tests/deal.II/vertex_as_face_09.cc
tests/manifold/spherical_manifold_04.cc

index 859da6936a4bbf3c69131b38f937e24c02b7ea2f..aca712d743f7e2d0c7cf621ea5f90b910ddb85df 100644 (file)
@@ -277,6 +277,16 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Changed: The functions GridTools::extract_boundary_mesh() and
+  GridTools::create_union_triangulation() have been moved to
+  GridGenerator::extract_boundary_mesh() and
+  GridGenerator::create_union_triangulation() since, conceptually, they
+  generate meshes. The old functions have been retained but are now
+  deprecated.
+  <br>
+  (Wolfgang Bangerth, 2014/08/19)
+  </li>
+
   <li> New: TriaAccessor::measure() is now also implemented for faces of
   3d cells as long as the face is planar.
   <br>
index 14ea1a5924e3bcfdf4ea1e930d6095e1d519f311..4bc9a67bbd5d2eecec064a78bfbca32934562185 100644 (file)
@@ -53,6 +53,11 @@ template <typename number> class SparseMatrix;
  */
 namespace GridGenerator
 {
+  /**
+   *  @name Creating meshes for basic geometries
+   */
+  /*@{*/
+
   /**
    * Initialize the given triangulation with a hypercube (line in 1D,
    * square in 2D, etc) consisting of exactly one cell. The hypercube
@@ -640,6 +645,16 @@ namespace GridGenerator
                 const double        R,
                 const double        r);
 
+  /**
+   * @}
+   */
+  /**
+   *  @name Creating meshes from other meshes
+   */
+  /**
+   * @{
+   */
+
   /**
    * Given the two triangulations specified as the first two arguments, create
    * the triangulation that contains the cells of both triangulation and store
@@ -668,7 +683,7 @@ namespace GridGenerator
    *
    * @note For a related operation on refined meshes when both meshes are
    * derived from the same coarse mesh, see
-   * GridTools::create_union_triangulation .
+   * GridGenerator::create_union_triangulation().
    */
   template <int dim, int spacedim>
   void
@@ -676,6 +691,61 @@ namespace GridGenerator
                         const Triangulation<dim, spacedim> &triangulation_2,
                         Triangulation<dim, spacedim>       &result);
 
+  /**
+   * Given the two triangulations
+   * specified as the first two
+   * arguments, create the
+   * triangulation that contains
+   * the finest cells of both
+   * triangulation and store it in
+   * the third parameter. Previous
+   * content of @p result will be
+   * deleted.
+   *
+   * @note This function is intended
+   * to create an adaptively refined
+   * triangulation that contains the
+   * <i>most refined cells</i> from
+   * two input triangulations that
+   * were derived from the <i>same</i>
+   * coarse grid by adaptive refinement.
+   * This is an operation sometimes
+   * needed when one solves for two
+   * variables of a coupled problem
+   * on separately refined meshes on
+   * the same domain (for example
+   * because these variables have
+   * boundary layers in different places)
+   * but then needs to compute something
+   * that involves both variables or
+   * wants to output the result into a
+   * single file. In both cases, in
+   * order not to lose information,
+   * the two solutions can not be
+   * interpolated onto the respectively
+   * other mesh because that may be
+   * coarser than the ones on which
+   * the variable was computed. Rather,
+   * one needs to have a mesh for the
+   * domain that is at least as fine
+   * as each of the two initial meshes.
+   * This function computes such a mesh.
+   *
+   * @note If you want to create
+   * a mesh that is the merger of
+   * two other coarse meshes, for
+   * example in order to compose a mesh
+   * for a complicated geometry from
+   * meshes for simpler geometries,
+   * then this is not the function for you. Instead, consider
+   * GridGenerator::merge_triangulations().
+   */
+  template <int dim, int spacedim>
+  void
+  create_union_triangulation (const Triangulation<dim, spacedim> &triangulation_1,
+                              const Triangulation<dim, spacedim> &triangulation_2,
+                              Triangulation<dim, spacedim>       &result);
+
 
   /**
    * Take a 2d Triangulation that is being extruded in z direction
@@ -722,6 +792,134 @@ namespace GridGenerator
   void flatten_triangulation(const Triangulation<dim,spacedim1> &in_tria,
                             Triangulation<dim,spacedim2> &out_tria);
 
+  /**
+   * @}
+   */
+
+  /**
+   *  @name Creating lower-dimensional meshes from parts of higher-dimensional meshes
+   */
+  /*@{*/
+
+
+#ifdef _MSC_VER
+  // Microsoft's VC++ has a bug where it doesn't want to recognize that
+  // an implementation (definition) of the extract_boundary_mesh function
+  // matches a declaration. This can apparently only be avoided by
+  // doing some contortion with the return type using the following
+  // intermediate type. This is only used when using MS VC++ and uses
+  // the direct way of doing it otherwise
+  template <template <int,int> class Container, int dim, int spacedim>
+  struct ExtractBoundaryMesh
+  {
+      typedef
+          std::map<typename Container<dim-1,spacedim>::cell_iterator,
+              typename Container<dim,spacedim>::face_iterator>
+          return_type;
+  };
+#endif
+
+  /**
+   * This function implements a boundary
+   * subgrid extraction.  Given a
+   * <dim,spacedim>-Triangulation (the
+   * "volume mesh") the function extracts a
+   * subset of its boundary (the "surface
+   * mesh").  The boundary to be extracted
+   * is specified by a list of
+   * boundary_ids.  If none is specified
+   * the whole boundary will be
+   * extracted. The function is used in
+   * step-38.
+   *
+   * The function also builds a mapping linking the
+   * cells on the surface mesh to the
+   * corresponding faces on the volume
+   * one. This mapping is the return value
+   * of the function.
+   *
+   * @note The function builds the surface
+   * mesh by creating a coarse mesh from
+   * the selected faces of the coarse cells
+   * of the volume mesh. It copies the
+   * boundary indicators of these faces to
+   * the cells of the coarse surface
+   * mesh. The surface mesh is then refined
+   * in the same way as the faces of the
+   * volume mesh are. In order to ensure
+   * that the surface mesh has the same
+   * vertices as the volume mesh, it is
+   * therefore important that you assign
+   * appropriate boundary objects through
+   * Triangulation::set_boundary to the
+   * surface mesh object before calling
+   * this function. If you don't, the
+   * refinement will happen under the
+   * assumption that all faces are straight
+   * (i.e using the StraightBoundary class)
+   * rather than any curved boundary object
+   * you may want to use to determine the
+   * location of new vertices.
+   *
+   *
+   * @tparam Container A type that satisfies the
+   * requirements of a mesh container (see @ref GlossMeshAsAContainer).
+   * The map that is returned will
+   * be between cell
+   * iterators pointing into the container describing the surface mesh
+   * and face
+   * iterators of the volume
+   * mesh container. If the Container argument is
+   * DoFHandler of hp::DoFHandler, then
+   * the function will
+   * re-build the triangulation
+   * underlying the second argument
+   * and return a map between
+   * appropriate iterators into the Container arguments. However,
+   * the function will not actually
+   * distribute degrees of freedom
+   * on this newly created surface
+   * mesh.
+   *
+   * @note The algorithm outlined
+   * above assumes that all faces
+   * on higher refinement levels
+   * always have exactly the same
+   * boundary indicator as their
+   * parent face. Consequently, we
+   * can start with coarse level
+   * faces and build the surface
+   * mesh based on that. It would
+   * not be very difficult to
+   * extend the function to also
+   * copy boundary indicators from
+   * finer level faces to their
+   * corresponding surface mesh
+   * cells, for example to
+   * accommodate different geometry
+   * descriptions in the case of
+   * curved boundaries.
+   */
+  template <template <int,int> class Container, int dim, int spacedim>
+#ifndef _MSC_VER
+  std::map<typename Container<dim-1,spacedim>::cell_iterator,
+      typename Container<dim,spacedim>::face_iterator>
+#else
+  typename ExtractBoundaryMesh<Container,dim,spacedim>::return_type
+#endif
+      extract_boundary_mesh (const Container<dim,spacedim> &volume_mesh,
+                             Container<dim-1,spacedim>     &surface_mesh,
+                             const std::set<types::boundary_id> &boundary_ids
+                             = std::set<types::boundary_id>());
+
+  /*@}*/
+
+  /**
+   *  @name Deprecated functions
+   */
+  /**
+   * @{
+   */
 
   /**
    * This function transforms the @p Triangulation @p tria smoothly to a
@@ -751,6 +949,16 @@ namespace GridGenerator
                                const std::map<unsigned int,Point<dim> > &new_points,
                                const Function<dim> *coefficient = 0) DEAL_II_DEPRECATED;
 
+  /**
+   * @}
+   */
+  /**
+   *  @name Exceptions
+   */
+  /**
+   * @{
+   */
+
   /**
    * Exception
    */
index 4355d8984a6d19b290fb1188041650945388e3b3..3dcd5796f474fd9c20e58afc9f6fc5c1e46d26d2 100644 (file)
@@ -861,59 +861,13 @@ namespace GridTools
                          const Container &mesh_2);
 
   /**
-   * Given the two triangulations
-   * specified as the first two
-   * arguments, create the
-   * triangulation that contains
-   * the finest cells of both
-   * triangulation and store it in
-   * the third parameter. Previous
-   * content of @p result will be
-   * deleted.
-   *
-   * @note This function is intended
-   * to create an adaptively refined
-   * triangulation that contains the
-   * <i>most refined cells</i> from
-   * two input triangulations that
-   * were derived from the <i>same</i>
-   * coarse grid by adaptive refinement.
-   * This is an operation sometimes
-   * needed when one solves for two
-   * variables of a coupled problem
-   * on separately refined meshes on
-   * the same domain (for example
-   * because these variables have
-   * boundary layers in different places)
-   * but then needs to compute something
-   * that involves both variables or
-   * wants to output the result into a
-   * single file. In both cases, in
-   * order not to lose information,
-   * the two solutions can not be
-   * interpolated onto the respectively
-   * other mesh because that may be
-   * coarser than the ones on which
-   * the variable was computed. Rather,
-   * one needs to have a mesh for the
-   * domain that is at least as fine
-   * as each of the two initial meshes.
-   * This function computes such a mesh.
-   *
-   * @note If you want to create
-   * a mesh that is the merger of
-   * two other coarse meshes, for
-   * example in order to compose a mesh
-   * for a complicated geometry from
-   * meshes for simpler geometries,
-   * then this is not the function for you. Instead, consider
-   * GridGenerator::merge_triangulations().
+   * @deprecated Use GridGenerator::create_union_triangulation().
    */
   template <int dim, int spacedim>
   void
   create_union_triangulation (const Triangulation<dim, spacedim> &triangulation_1,
                               const Triangulation<dim, spacedim> &triangulation_2,
-                              Triangulation<dim, spacedim>       &result);
+                              Triangulation<dim, spacedim>       &result)  DEAL_II_DEPRECATED;
 
   /*@}*/
   /**
@@ -1027,85 +981,7 @@ namespace GridTools
 #endif
 
   /**
-   * This function implements a boundary
-   * subgrid extraction.  Given a
-   * <dim,spacedim>-Triangulation (the
-   * "volume mesh") the function extracts a
-   * subset of its boundary (the "surface
-   * mesh").  The boundary to be extracted
-   * is specified by a list of
-   * boundary_ids.  If none is specified
-   * the whole boundary will be
-   * extracted. The function is used in
-   * step-38.
-   *
-   * The function also builds a mapping linking the
-   * cells on the surface mesh to the
-   * corresponding faces on the volume
-   * one. This mapping is the return value
-   * of the function.
-   *
-   * @note The function builds the surface
-   * mesh by creating a coarse mesh from
-   * the selected faces of the coarse cells
-   * of the volume mesh. It copies the
-   * boundary indicators of these faces to
-   * the cells of the coarse surface
-   * mesh. The surface mesh is then refined
-   * in the same way as the faces of the
-   * volume mesh are. In order to ensure
-   * that the surface mesh has the same
-   * vertices as the volume mesh, it is
-   * therefore important that you assign
-   * appropriate boundary objects through
-   * Triangulation::set_boundary to the
-   * surface mesh object before calling
-   * this function. If you don't, the
-   * refinement will happen under the
-   * assumption that all faces are straight
-   * (i.e using the StraightBoundary class)
-   * rather than any curved boundary object
-   * you may want to use to determine the
-   * location of new vertices.
-   *
-   *
-   * @tparam Container A type that satisfies the
-   * requirements of a mesh container (see @ref GlossMeshAsAContainer).
-   * The map that is returned will
-   * be between cell
-   * iterators pointing into the container describing the surface mesh
-   * and face
-   * iterators of the volume
-   * mesh container. If the Container argument is
-   * DoFHandler of hp::DoFHandler, then
-   * the function will
-   * re-build the triangulation
-   * underlying the second argument
-   * and return a map between
-   * appropriate iterators into the Container arguments. However,
-   * the function will not actually
-   * distribute degrees of freedom
-   * on this newly created surface
-   * mesh.
-   *
-   * @note The algorithm outlined
-   * above assumes that all faces
-   * on higher refinement levels
-   * always have exactly the same
-   * boundary indicator as their
-   * parent face. Consequently, we
-   * can start with coarse level
-   * faces and build the surface
-   * mesh based on that. It would
-   * not be very difficult to
-   * extend the function to also
-   * copy boundary indicators from
-   * finer level faces to their
-   * corresponding surface mesh
-   * cells, for example to
-   * accommodate different geometry
-   * descriptions in the case of
-   * curved boundaries.
+   * @deprecated Use GridGenerator::extract_boundary_mesh() instead.
    */
   template <template <int,int> class Container, int dim, int spacedim>
 #ifndef _MSC_VER
@@ -1117,7 +993,7 @@ namespace GridTools
       extract_boundary_mesh (const Container<dim,spacedim> &volume_mesh,
                              Container<dim-1,spacedim>     &surface_mesh,
                              const std::set<types::boundary_id> &boundary_ids
-                             = std::set<types::boundary_id>());
+                             = std::set<types::boundary_id>()) DEAL_II_DEPRECATED;
 
   /*@}*/
   /**
index 3eca78a3f7b3db5f9550cbbcbd94a6b2d0f61d3d..4188ca21d9b03a10b13408f9e97857935382d638 100644 (file)
@@ -31,6 +31,7 @@
 #include <deal.II/grid/tria_accessor.h>
 #include <deal.II/grid/tria_iterator.h>
 #include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/intergrid_map.h>
 #include <deal.II/dofs/dof_handler.h>
 #include <deal.II/dofs/dof_accessor.h>
 #include <deal.II/dofs/dof_tools.h>
@@ -3426,6 +3427,56 @@ namespace GridGenerator
   }
 
 
+  template <int dim, int spacedim>
+  void
+  create_union_triangulation (const Triangulation<dim, spacedim> &triangulation_1,
+                              const Triangulation<dim, spacedim> &triangulation_2,
+                              Triangulation<dim, spacedim>       &result)
+  {
+    Assert (GridTools::have_same_coarse_mesh (triangulation_1, triangulation_2),
+            ExcMessage ("The two input triangulations are not derived from "
+                        "the same coarse mesh as required."));
+
+    // first copy triangulation_1, and
+    // then do as many iterations as
+    // there are levels in
+    // triangulation_2 to refine
+    // additional cells. since this is
+    // the maximum number of
+    // refinements to get from the
+    // coarse grid to triangulation_2,
+    // it is clear that this is also
+    // the maximum number of
+    // refinements to get from any cell
+    // on triangulation_1 to
+    // triangulation_2
+    result.clear ();
+    result.copy_triangulation (triangulation_1);
+    for (unsigned int iteration=0; iteration<triangulation_2.n_levels();
+         ++iteration)
+      {
+        InterGridMap<Triangulation<dim, spacedim> > intergrid_map;
+        intergrid_map.make_mapping (result, triangulation_2);
+
+        bool any_cell_flagged = false;
+        for (typename Triangulation<dim, spacedim>::active_cell_iterator
+             result_cell = result.begin_active();
+             result_cell != result.end(); ++result_cell)
+          if (intergrid_map[result_cell]->has_children())
+            {
+              any_cell_flagged = true;
+              result_cell->set_refine_flag ();
+            }
+
+        if (any_cell_flagged == false)
+          break;
+        else
+          result.execute_coarsening_and_refinement();
+      }
+  }
+
+
+
   void
   extrude_triangulation(const Triangulation<2, 2> &input,
                         const unsigned int n_slices,
@@ -3949,6 +4000,174 @@ namespace GridGenerator
     out_tria.create_triangulation(v, cells, subcelldata);
   }
 
+
+
+  // This anonymous namespace contains utility functions to extract the
+  // triangulation from any container such as DoFHandler
+  // and the like
+    namespace
+    {
+      template<int dim, int spacedim>
+      const Triangulation<dim, spacedim> &
+      get_tria(const Triangulation<dim, spacedim> &tria)
+      {
+        return tria;
+      }
+
+      template<int dim, int spacedim>
+      const Triangulation<dim, spacedim> &
+      get_tria(const parallel::distributed::Triangulation<dim, spacedim> &tria)
+      {
+        return tria;
+      }
+
+      template<int dim, template<int, int> class Container, int spacedim>
+      const Triangulation<dim,spacedim> &
+      get_tria(const Container<dim,spacedim> &container)
+      {
+        return container.get_tria();
+      }
+
+
+      template<int dim, int spacedim>
+      Triangulation<dim, spacedim> &
+      get_tria(Triangulation<dim, spacedim> &tria)
+      {
+        return tria;
+      }
+
+      template<int dim, int spacedim>
+      Triangulation<dim, spacedim> &
+      get_tria(parallel::distributed::Triangulation<dim, spacedim> &tria)
+      {
+        return tria;
+      }
+
+      template<int dim, template<int, int> class Container, int spacedim>
+      const Triangulation<dim,spacedim> &
+      get_tria(Container<dim,spacedim> &container)
+      {
+        return container.get_tria();
+      }
+    }
+
+
+
+  template <template <int,int> class Container, int dim, int spacedim>
+#ifndef _MSC_VER
+  std::map<typename Container<dim-1,spacedim>::cell_iterator,
+      typename Container<dim,spacedim>::face_iterator>
+#else
+  typename ExtractBoundaryMesh<Container,dim,spacedim>::return_type
+#endif
+      extract_boundary_mesh (const Container<dim,spacedim> &volume_mesh,
+                             Container<dim-1,spacedim>     &surface_mesh,
+                             const std::set<types::boundary_id> &boundary_ids)
+  {
+// This function works using the following assumption:
+//    Triangulation::create_triangulation(...) will create cells that preserve
+//    the order of cells passed in using the CellData argument; also,
+//    that it will not reorder the vertices.
+
+    std::map<typename Container<dim-1,spacedim>::cell_iterator,
+        typename Container<dim,spacedim>::face_iterator>
+        surface_to_volume_mapping;
+
+    const unsigned int boundary_dim = dim-1; //dimension of the boundary mesh
+
+    // First create surface mesh and mapping
+    // from only level(0) cells of volume_mesh
+    std::vector<typename Container<dim,spacedim>::face_iterator>
+    mapping;  // temporary map for level==0
+
+
+    std::vector< bool > touched (get_tria(volume_mesh).n_vertices(), false);
+    std::vector< CellData< boundary_dim > > cells;
+    std::vector< Point<spacedim> >      vertices;
+
+    std::map<unsigned int,unsigned int> map_vert_index; //volume vertex indices to surf ones
+
+    unsigned int v_index;
+    CellData< boundary_dim > c_data;
+
+    for (typename Container<dim,spacedim>::cell_iterator
+         cell = volume_mesh.begin(0);
+         cell != volume_mesh.end(0);
+         ++cell)
+      for (unsigned int i=0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+        {
+          const typename Container<dim,spacedim>::face_iterator
+          face = cell->face(i);
+
+          if ( face->at_boundary()
+               &&
+               (boundary_ids.empty() ||
+                ( boundary_ids.find(face->boundary_indicator()) != boundary_ids.end())) )
+            {
+              for (unsigned int j=0;
+                   j<GeometryInfo<boundary_dim>::vertices_per_cell; ++j)
+                {
+                  v_index = face->vertex_index(j);
+
+                  if ( !touched[v_index] )
+                    {
+                      vertices.push_back(face->vertex(j));
+                      map_vert_index[v_index] = vertices.size() - 1;
+                      touched[v_index] = true;
+                    }
+
+                  c_data.vertices[j] = map_vert_index[v_index];
+                  c_data.material_id = static_cast<types::material_id>(face->boundary_indicator());
+                }
+
+              cells.push_back(c_data);
+              mapping.push_back(face);
+            }
+        }
+
+    // create level 0 surface triangulation
+    Assert (cells.size() > 0, ExcMessage ("No boundary faces selected"));
+    const_cast<Triangulation<dim-1,spacedim>&>(get_tria(surface_mesh))
+    .create_triangulation (vertices, cells, SubCellData());
+
+    // Make the actual mapping
+    for (typename Container<dim-1,spacedim>::active_cell_iterator
+         cell = surface_mesh.begin(0);
+         cell!=surface_mesh.end(0); ++cell)
+      surface_to_volume_mapping[cell] = mapping.at(cell->index());
+
+    do
+      {
+        bool changed = false;
+
+        for (typename Container<dim-1,spacedim>::active_cell_iterator
+            cell = surface_mesh.begin_active(); cell!=surface_mesh.end(); ++cell)
+          if (surface_to_volume_mapping[cell]->has_children() == true )
+            {
+              cell->set_refine_flag ();
+              changed = true;
+            }
+
+        if (changed)
+          {
+            const_cast<Triangulation<dim-1,spacedim>&>(get_tria(surface_mesh))
+            .execute_coarsening_and_refinement();
+
+            for (typename Container<dim-1,spacedim>::cell_iterator
+                surface_cell = surface_mesh.begin(); surface_cell!=surface_mesh.end(); ++surface_cell)
+              for (unsigned int c=0; c<surface_cell->n_children(); c++)
+                if (surface_to_volume_mapping.find(surface_cell->child(c)) == surface_to_volume_mapping.end())
+                  surface_to_volume_mapping[surface_cell->child(c)]
+                    = surface_to_volume_mapping[surface_cell]->child(c);
+          }
+        else
+          break;
+      }
+    while (true);
+
+    return surface_to_volume_mapping;
+  }
+
 }
 
 // explicit instantiations
index 74600bcddad495f9e4caf1fc8f3ad0e5420da39c..72d8bb047fa8b5e384fa5cda72ff889c2d5da8fd 100644 (file)
@@ -37,11 +37,41 @@ namespace GridGenerator
        const Triangulation<deal_II_dimension,deal_II_space_dimension> &triangulation_2,
        Triangulation<deal_II_dimension,deal_II_space_dimension>       &result);
       
+    template
+      void
+      create_union_triangulation
+      (const Triangulation<deal_II_dimension, deal_II_space_dimension> &triangulation_1,
+       const Triangulation<deal_II_dimension, deal_II_space_dimension> &triangulation_2,
+       Triangulation<deal_II_dimension, deal_II_space_dimension>       &result);
+      
 #endif
 \}  
   }
 
 
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS; Container : TRIANGULATION_AND_DOFHANDLER_TEMPLATES)
+  {
+#if deal_II_dimension <= deal_II_space_dimension
+    namespace GridGenerator \{
+
+#if deal_II_dimension != 1
+      template
+#ifndef _MSC_VER
+      std::map<Container<deal_II_dimension-1,deal_II_space_dimension>::cell_iterator,
+                   Container<deal_II_dimension,deal_II_space_dimension>::face_iterator>
+#else
+      ExtractBoundaryMesh<Container,deal_II_dimension,deal_II_space_dimension>::return_type
+#endif
+      extract_boundary_mesh (const Container<deal_II_dimension, deal_II_space_dimension> &mesh,
+                             Container<deal_II_dimension-1,deal_II_space_dimension>  &boundary_mesh,
+                             const std::set<types::boundary_id> &boundary_ids);
+#endif
+      \}
+#endif
+
+  }
+
+
 for (deal_II_dimension : DIMENSIONS)
 {
 namespace GridGenerator \{  
index 01d3e4e9fcdcd9962b2233e8a8c44bd1ea40cad8..722fd428e5e56e1573ee34d9ea51e053358982ea 100644 (file)
@@ -23,7 +23,6 @@
 #include <deal.II/grid/tria_boundary.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_tools.h>
-#include <deal.II/grid/intergrid_map.h>
 #include <deal.II/lac/sparsity_pattern.h>
 #include <deal.II/lac/sparsity_tools.h>
 #include <deal.II/lac/compressed_sparsity_pattern.h>
@@ -1483,46 +1482,8 @@ next_cell:
                               const Triangulation<dim, spacedim> &triangulation_2,
                               Triangulation<dim, spacedim>       &result)
   {
-    Assert (have_same_coarse_mesh (triangulation_1, triangulation_2),
-            ExcMessage ("The two input triangulations are not derived from "
-                        "the same coarse mesh as required."));
-
-    // first copy triangulation_1, and
-    // then do as many iterations as
-    // there are levels in
-    // triangulation_2 to refine
-    // additional cells. since this is
-    // the maximum number of
-    // refinements to get from the
-    // coarse grid to triangulation_2,
-    // it is clear that this is also
-    // the maximum number of
-    // refinements to get from any cell
-    // on triangulation_1 to
-    // triangulation_2
-    result.clear ();
-    result.copy_triangulation (triangulation_1);
-    for (unsigned int iteration=0; iteration<triangulation_2.n_levels();
-         ++iteration)
-      {
-        InterGridMap<Triangulation<dim, spacedim> > intergrid_map;
-        intergrid_map.make_mapping (result, triangulation_2);
-
-        bool any_cell_flagged = false;
-        for (typename Triangulation<dim, spacedim>::active_cell_iterator
-             result_cell = result.begin_active();
-             result_cell != result.end(); ++result_cell)
-          if (intergrid_map[result_cell]->has_children())
-            {
-              any_cell_flagged = true;
-              result_cell->set_refine_flag ();
-            }
-
-        if (any_cell_flagged == false)
-          break;
-        else
-          result.execute_coarsening_and_refinement();
-      }
+    // this function is deprecated. call the function that replaced it
+    GridGenerator::create_union_triangulation (triangulation_1, triangulation_2, result);
   }
 
 
@@ -2145,108 +2106,8 @@ next_cell:
                              Container<dim-1,spacedim>     &surface_mesh,
                              const std::set<types::boundary_id> &boundary_ids)
   {
-// This function works using the following assumption:
-//    Triangulation::create_triangulation(...) will create cells that preserve
-//    the order of cells passed in using the CellData argument; also,
-//    that it will not reorder the vertices.
-
-    std::map<typename Container<dim-1,spacedim>::cell_iterator,
-        typename Container<dim,spacedim>::face_iterator>
-        surface_to_volume_mapping;
-
-    const unsigned int boundary_dim = dim-1; //dimension of the boundary mesh
-
-    // First create surface mesh and mapping
-    // from only level(0) cells of volume_mesh
-    std::vector<typename Container<dim,spacedim>::face_iterator>
-    mapping;  // temporary map for level==0
-
-
-    std::vector< bool > touched (get_tria(volume_mesh).n_vertices(), false);
-    std::vector< CellData< boundary_dim > > cells;
-    std::vector< Point<spacedim> >      vertices;
-
-    std::map<unsigned int,unsigned int> map_vert_index; //volume vertex indices to surf ones
-
-    unsigned int v_index;
-    CellData< boundary_dim > c_data;
-
-    for (typename Container<dim,spacedim>::cell_iterator
-         cell = volume_mesh.begin(0);
-         cell != volume_mesh.end(0);
-         ++cell)
-      for (unsigned int i=0; i < GeometryInfo<dim>::faces_per_cell; ++i)
-        {
-          const typename Container<dim,spacedim>::face_iterator
-          face = cell->face(i);
-
-          if ( face->at_boundary()
-               &&
-               (boundary_ids.empty() ||
-                ( boundary_ids.find(face->boundary_indicator()) != boundary_ids.end())) )
-            {
-              for (unsigned int j=0;
-                   j<GeometryInfo<boundary_dim>::vertices_per_cell; ++j)
-                {
-                  v_index = face->vertex_index(j);
-
-                  if ( !touched[v_index] )
-                    {
-                      vertices.push_back(face->vertex(j));
-                      map_vert_index[v_index] = vertices.size() - 1;
-                      touched[v_index] = true;
-                    }
-
-                  c_data.vertices[j] = map_vert_index[v_index];
-                  c_data.material_id = static_cast<types::material_id>(face->boundary_indicator());
-                }
-
-              cells.push_back(c_data);
-              mapping.push_back(face);
-            }
-        }
-
-    // create level 0 surface triangulation
-    Assert (cells.size() > 0, ExcMessage ("No boundary faces selected"));
-    const_cast<Triangulation<dim-1,spacedim>&>(get_tria(surface_mesh))
-    .create_triangulation (vertices, cells, SubCellData());
-
-    // Make the actual mapping
-    for (typename Container<dim-1,spacedim>::active_cell_iterator
-         cell = surface_mesh.begin(0);
-         cell!=surface_mesh.end(0); ++cell)
-      surface_to_volume_mapping[cell] = mapping.at(cell->index());
-
-    do
-      {
-        bool changed = false;
-
-        for (typename Container<dim-1,spacedim>::active_cell_iterator
-            cell = surface_mesh.begin_active(); cell!=surface_mesh.end(); ++cell)
-          if (surface_to_volume_mapping[cell]->has_children() == true )
-            {
-              cell->set_refine_flag ();
-              changed = true;
-            }
-
-        if (changed)
-          {
-            const_cast<Triangulation<dim-1,spacedim>&>(get_tria(surface_mesh))
-            .execute_coarsening_and_refinement();
-
-            for (typename Container<dim-1,spacedim>::cell_iterator
-                surface_cell = surface_mesh.begin(); surface_cell!=surface_mesh.end(); ++surface_cell)
-              for (unsigned int c=0; c<surface_cell->n_children(); c++)
-                if (surface_to_volume_mapping.find(surface_cell->child(c)) == surface_to_volume_mapping.end())
-                  surface_to_volume_mapping[surface_cell->child(c)]
-                    = surface_to_volume_mapping[surface_cell]->child(c);
-          }
-        else
-          break;
-      }
-    while (true);
-
-    return surface_to_volume_mapping;
+    // this function is deprecated. call the one that replaced it
+    return GridGenerator::extract_boundary_mesh (volume_mesh, surface_mesh, boundary_ids);
   }
 
 
index 6198f016cb884bd86f02354ce6a2efb261caaa99..f5997deed3c5c26208aacf326b18119d1f760917 100644 (file)
@@ -234,6 +234,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
        const Triangulation<deal_II_dimension, deal_II_space_dimension> &triangulation_1,
        const Triangulation<deal_II_dimension, deal_II_space_dimension> &triangulation_2,
        Triangulation<deal_II_dimension, deal_II_space_dimension>       &result);
+
 #if deal_II_dimension == deal_II_space_dimension
     template
     void
index 5f9d260a38564c6550133d4026577282c3f4edb9..9d0f4c0c9580c2db21775734133c2e84536bdf30 100644 (file)
@@ -91,7 +91,7 @@ int main ()
     // surface faces
     std::set<types::boundary_id> boundary_indicators;
     boundary_indicators.insert (0);
-    GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh,
+    GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh,
                                       boundary_indicators);
     deallog << volume_mesh.n_active_cells () << std::endl;
     deallog << boundary_mesh.n_active_cells () << std::endl;
index b37193f334d545e15adf78667ab8c9d26fa367a6..997c056533521b459887e401a6286353997cdb7a 100644 (file)
@@ -94,7 +94,7 @@ int main ()
   std::set<types::boundary_id> boundary_ids;
   boundary_ids.insert(0);
 
-  GridTools::extract_boundary_mesh (volume_mesh, tria,
+  GridGenerator::extract_boundary_mesh (volume_mesh, tria,
                                     boundary_ids);
 
   // test for the position
index a8e88ebe2ce6cac95e2a72eaa59718b6d4f506c3..2000445d2c8cf5554836dc09006450562ea3ab88 100644 (file)
@@ -36,7 +36,7 @@ void test ()
   Triangulation<dim,spacedim> boundary_mesh;
   Triangulation<spacedim> volume_mesh;
   GridGenerator::hyper_cube(volume_mesh);
-  GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+  GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
   for (Triangulation<dim,spacedim>::active_cell_iterator
        cell = boundary_mesh.begin_active();
        cell != boundary_mesh.end(); ++cell)
index f1274f83fee79ecaf5b1a4fe8156c8bb32d7b99f..e1a92660c83729c4413320850bec04254c46f8d0 100644 (file)
@@ -36,7 +36,7 @@ void test ()
   Triangulation<dim,spacedim> boundary_mesh;
   Triangulation<spacedim> volume_mesh;
   GridGenerator::hyper_cube(volume_mesh);
-  GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+  GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
   for (Triangulation<dim,spacedim>::active_cell_iterator
        cell = boundary_mesh.begin_active();
        cell != boundary_mesh.end(); ++cell)
index 2aa0bcc0b09f7cdb0cb7d872e8f5ea83bc42d213..554ad3f300647c10e643eb762c43d4a5a83eba9e 100644 (file)
@@ -17,7 +17,7 @@
 
 /*
  Code for testing the function
- GridTools::extract_boundary_mesh (...).
+ GridGenerator::extract_boundary_mesh (...).
  We test that the order of cells and the orientation
  of the vertices is consistent between the two meshes.
 
@@ -113,7 +113,7 @@ int main ()
     Triangulation<dim-1,dim> boundary_mesh;
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
     if (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping))
       deallog << "Passed.";
@@ -144,7 +144,7 @@ int main ()
     Triangulation<dim-1,dim> boundary_mesh;
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
     if (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping))
       deallog << "Passed.";
@@ -179,7 +179,7 @@ int main ()
     boundary_ids.insert(0);
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh,
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh,
                                           boundary_ids);
 
     if (test_vertices_orientation(boundary_mesh, surface_to_volume_mapping))
index 1acaf57cb9ab972c3d3434ce6575ece4ece2a4d8..3a84676a964b3f33c8c1f14dbfab18d8f2820eb6 100644 (file)
@@ -17,7 +17,7 @@
 
 /*
  Code for testing the function
- GridTools::extract_boundary_mesh (...).
+ GridGenerator::extract_boundary_mesh (...).
  We test that the order of cells and the orientation
  of the vertices is consistent between the two meshes.
 
@@ -117,7 +117,7 @@ int main ()
     Triangulation<dim-1,dim> boundary_mesh;
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
     if (!test_vertices_orientation(boundary_mesh, surface_to_volume_mapping,2))
       Assert (false, ExcInternalError());
index 573a45066d963b384260874568f3c94e7ee8718d..6e2a471a2fec316679b3d442d3e833a06facc3c0 100644 (file)
@@ -17,7 +17,7 @@
 
 /*
  Code for testing the function
- GridTools::extract_boundary_mesh (...).
+ GridGenerator::extract_boundary_mesh (...).
  We test that the order of cells and the orientation
  of the vertices is consistent between the two meshes.
 
@@ -107,7 +107,7 @@ int main ()
     boundary_mesh.set_boundary (0, surface_description);
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
     deallog << volume_mesh.n_active_cells () << std::endl;
     deallog << boundary_mesh.n_active_cells () << std::endl;
     save_mesh(boundary_mesh);
index b820cb439162a8734e23750515f35919012860a8..eef8308dad13c2fea5201d6bb3b830a76b3d61eb 100644 (file)
@@ -17,7 +17,7 @@
 
 /*
  Code for testing the function
- GridTools::extract_boundary_mesh (...).
+ GridGenerator::extract_boundary_mesh (...).
  We test that the order of cells and the orientation
  of the vertices is consistent between the two meshes.
 
@@ -121,7 +121,7 @@ int main ()
     boundary_mesh.set_boundary (1, surface_description);
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
     deallog << volume_mesh.n_active_cells () << std::endl;
     deallog << boundary_mesh.n_active_cells () << std::endl;
     save_mesh(boundary_mesh);
index 942651a8081818a90211c803546567dc69ee2b40..f9e6c5f1bcd379f12ec674a6eb8637300d54f10c 100644 (file)
@@ -17,7 +17,7 @@
 
 /*
  Code for testing the function
- GridTools::extract_boundary_mesh (...).
+ GridGenerator::extract_boundary_mesh (...).
  We test that the order of cells and the orientation
  of the vertices is consistent between the two meshes.
 
@@ -127,7 +127,7 @@ int main ()
     boundary_ids.insert(1);
 
     surface_to_volume_mapping
-      = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh,
+      = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh,
                                           boundary_ids);
 
     deallog << volume_mesh.n_active_cells () << std::endl;
index 5fe9a377fbdaf163e250715947919e83b911ffa6..916731eaafe670bb5b0f5b9bd2c98dea8f302d3c 100644 (file)
@@ -43,7 +43,7 @@ void test ()
   GridGenerator::hyper_cube(volume_mesh);
 
   surface_to_volume_mapping
-    = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+    = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
   FE_Q <dim-1,dim>  boundary_fe (1);
   DoFHandler<dim-1,dim> boundary_dh(boundary_mesh);
index aa1d17859289b75e78309e41079097d72301310b..2d38994e96849d2aef88ca54984514636c5194bb 100644 (file)
@@ -44,7 +44,7 @@ void test ()
   GridGenerator::hyper_cube(volume_mesh);
   volume_mesh.refine_global(1);
   surface_to_volume_mapping
-    = GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+    = GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
   boundary_mesh.refine_global(1);
 
   for (Triangulation<dim,spacedim>::active_cell_iterator
index e52ae55475ae3ff20f71636dda3d50c4dec6f206..f780a197a487bb885d0b8c5c7e107084d65073a6 100644 (file)
@@ -89,7 +89,7 @@ namespace Step38
     std::map<typename DoFHandler<boundary_dim, spacedim>::cell_iterator,
         typename DoFHandler<spacedim>::face_iterator>
         element_assignment =
-          GridTools::extract_boundary_mesh(space_dof_handler,
+          GridGenerator::extract_boundary_mesh(space_dof_handler,
                                            contact_dof_handler,
                                            boundary_ids);
 
index 3bae622e1f6ed3b591a08b4b17f388552d56487c..05851be81fb0b60e424ef98a268788342ceabe67 100644 (file)
@@ -56,7 +56,7 @@ int main ()
     cell->face(0)->set_all_boundary_indicators (1);
     std::set<types::boundary_id> boundary_ids;
     boundary_ids.insert(0);
-    GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
+    GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
   }
   boundary_mesh.begin_active()->set_refine_flag ();
   boundary_mesh.execute_coarsening_and_refinement ();
index 77024f9eee09d8069c3706e07e6daf7bb1894e5f..36eeb88ff8b4a8f1534f8e632922052875d17101 100644 (file)
@@ -56,7 +56,7 @@ int main ()
     cell->face(0)->set_all_boundary_indicators (1);
     std::set<types::boundary_id> boundary_ids;
     boundary_ids.insert(0);
-    GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
+    GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
   }
   boundary_mesh.begin_active()->set_refine_flag ();
   boundary_mesh.execute_coarsening_and_refinement ();
index 8038dfa5a59babd174c03f5895ff5217659a17a8..eefd3bac7c25ccbd7c3c2fe81783c7c3bc2a557c 100644 (file)
@@ -50,7 +50,7 @@ int main ()
     cell->face(0)->set_all_boundary_indicators (1);
     std::set<types::boundary_id> boundary_ids;
     boundary_ids.insert(0);
-    GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
+    GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh, boundary_ids);
   }
 
   Triangulation<dim,spacedim>::active_cell_iterator
index c6d9d08f6c71e5989e1e816eb4e84fcd035645e7..21773b6d0af38aa2bd4f47f25b748f1cb5da3fa5 100644 (file)
@@ -45,7 +45,7 @@ void test()
   std::set<types::boundary_id> boundary_ids;
   boundary_ids.insert(0);
 
-  GridTools::extract_boundary_mesh (volume_mesh, tria,boundary_ids);
+  GridGenerator::extract_boundary_mesh (volume_mesh, tria,boundary_ids);
 
   deallog << tria.n_active_cells() << " active cells" << std::endl;
 
index 44be1491aad4152a177458953712492ef1680b52..e0fb3b85472601b78d27da642386563271687def 100644 (file)
@@ -55,7 +55,7 @@ void test()
   GridGenerator::hyper_cube(volume_mesh);
 
   surface_to_volume_mapping
-    = GridTools::extract_boundary_mesh (volume_mesh, tria);
+    = GridGenerator::extract_boundary_mesh (volume_mesh, tria);
 
   FE_Q<dim,spacedim> fe(2);
   DoFHandler<dim,spacedim> dof_handler (tria);
index fd527e3d1b6dc6ad2521371a6fada9315af101b4..338ee01fd830d24ea30fcee06035730a0e7a5b75 100644 (file)
@@ -48,7 +48,7 @@ void test ()
   Triangulation<dim-1,dim> boundary_mesh;
   boundary_mesh.set_boundary (0, surface_description);
 
-  GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+  GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
   QGauss<dim-1> quadrature(2);
   MappingQ1<dim-1,dim> mapping;
index 0849d7b8af78e56bf48b0630507991889d0503b0..fe8789583ec08ebfc0cb1e64cae1bf53aa6ecdcf 100644 (file)
@@ -45,7 +45,7 @@ void test ()
   Triangulation<dim-1,dim> boundary_mesh;
   boundary_mesh.set_boundary (0, surface_description);
 
-  GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh);
+  GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
 
   QGauss<dim-1> quadrature(dim == 2 ? 3 : 2);
   MappingQ<dim-1,dim> mapping(2);
index d772846f1b7287c0650b7799863c65ca9fa0787e..29d4eddc853e62fda12fb6db083df41c72e4afcf 100644 (file)
@@ -41,7 +41,7 @@ void test ()
   GridGenerator::hyper_cube(volume_mesh);
 
   Triangulation<dim-1,dim> tria;
-  GridTools::extract_boundary_mesh (volume_mesh, tria);
+  GridGenerator::extract_boundary_mesh (volume_mesh, tria);
 
   FE_Q<dim-1,dim> fe (1);
   DoFHandler<dim-1,dim> dh(tria);
index afaab6487f6c7c05eec040ee5e724e2c027d1d0b..39607f3b699ec55c5856672aa1942e8fa1531359 100644 (file)
@@ -75,7 +75,7 @@ int main ()
   std::set<types::boundary_id> boundary_ids;
   boundary_ids.insert(0);
 
-  GridTools::extract_boundary_mesh (volume_mesh, triangulation,
+  GridGenerator::extract_boundary_mesh (volume_mesh, triangulation,
                                     boundary_ids);
   triangulation.set_boundary (1);
   triangulation.set_boundary (0);
index 96f1c6c228c088388d88b18f08ab3038b49d3f6b..bef231867ed63a833efe66e69b45276cfa6b3c3c 100644 (file)
@@ -1,7 +1,7 @@
 // ---------------------------------------------------------------------
 // $Id$
 //
-// Copyright (C) 2006 - 2013 by the deal.II authors
+// Copyright (C) 2006 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -61,7 +61,7 @@ void test ()
   (++tria_2.begin_active())->set_refine_flag();
   tria_2.execute_coarsening_and_refinement ();
 
-  GridTools::create_union_triangulation (tria_1, tria_2, tria_3);
+  GridGenerator::create_union_triangulation (tria_1, tria_2, tria_3);
 
   GridOut().write_gnuplot (tria_3, logfile);
 
index 226cb65aba8df51bab67a22ba129ec3c153b231b..df93880df3d9414d90605c6e4d1759ac9e731eea 100644 (file)
@@ -37,7 +37,7 @@ void test ()
 
   Triangulation<1,2> tria;
 
-  GridTools::extract_boundary_mesh (volume_mesh, tria);
+  GridGenerator::extract_boundary_mesh (volume_mesh, tria);
 
   deallog << "n_cells = " << tria.n_active_cells() << std::endl;
   deallog << "n_boundary_ids = " << tria.get_boundary_indicators ().size()
index d0241346e106186f36eaf4ab19491ba223bae92f..fc44e8a6ef6947b17a50841c02e43298f0f50567 100644 (file)
@@ -36,7 +36,7 @@ void test(unsigned int ref=1)
   Triangulation<spacedim, spacedim> volume_tria;
   Triangulation<dim, spacedim> tria;
   GridGenerator::hyper_ball (volume_tria);
-  GridTools::extract_boundary_mesh(volume_tria, tria);
+  GridGenerator::extract_boundary_mesh(volume_tria, tria);
 
   typename Triangulation<dim,spacedim>::active_cell_iterator cell;
   

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.