From: Luca Heltai Date: Sun, 11 Jan 2015 13:23:31 +0000 (+0100) Subject: Fixed comments, made second arguments const. X-Git-Tag: v8.3.0-rc1~560^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F413%2Fhead;p=dealii.git Fixed comments, made second arguments const. --- diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 1b99809908..fc342de97c 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -1153,18 +1153,14 @@ namespace GridTools /** * Copy boundary ids to manifold ids. The default manifold_id for - * new Triangulation objects is numbers::invalid_manifold_id. When - * refinements occurs, the Triangulation asks where to locate new - * points to the underlying manifold, and if the manifold_id of a - * boundary face is set to numbers::invalid_manifold_id, then - * Triangulation reverts back boundary_id (this was the behavior of - * deal.II < 8.2). This function copies the boundary_ids of the - * boundary faces to the manifold_ids of the same faces, allowing - * the user to change the boundary_ids and use them for boundary - * conditions regardless of the geometry, which will use - * manifold_ids to create new points. Only active cells will be - * iterated over. This is a function you'd typically call when there - * is only one active level on your Triangulation. + * new Triangulation objects is numbers::invalid_manifold_id. This + * function copies the boundary_ids of the boundary faces to the + * manifold_ids of the same faces, allowing the user to change the + * boundary_ids and use them for boundary conditions regardless of + * the geometry, which will use manifold_ids to create new + * points. Only active cells will be iterated over. This is a + * function you'd typically call when there is only one active level + * on your Triangulation. * * The optional parameter @p reset_boundary_ids, indicates wether * this function should reset the boundary_ids of the Triangulation @@ -1178,7 +1174,7 @@ namespace GridTools */ template void copy_boundary_to_manifold_id(Triangulation &tria, - bool reset_boundary_ids=false); + const bool reset_boundary_ids=false); /** * Copy material ids to manifold ids. The default manifold_id for @@ -1187,10 +1183,11 @@ namespace GridTools * points to the underlying manifold. * * When reading a Triangulation from a supported input format, - * tipical informations that can be stored in a file are boundary - * conditions (which we store in boundary_ids), material types - * (which we store in material_ids) and in some cases subdomain ids - * (which we store in subdomain_ids). + * typical informations that can be stored in a file are boundary + * conditions for boundary faces (which we store in the boundary_id + * of the faces), material types for cells (which we store in the + * material_id of the cells) and in some cases subdomain ids for + * cells (which we store in the subdomain_id of the cell). * * If you read one of these grids into a Triangulation, you might * still want to use the material_id specified in the input file as @@ -1214,7 +1211,7 @@ namespace GridTools */ template void copy_material_to_manifold_id(Triangulation &tria, - bool compute_face_ids=false); + const bool compute_face_ids=false); /*@}*/ diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 9f0a5b9b91..3285cc8476 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2896,7 +2896,7 @@ next_cell: template void copy_boundary_to_manifold_id(Triangulation &tria, - bool reset_boundary_ids) + const bool reset_boundary_ids) { typename Triangulation::active_cell_iterator @@ -2915,7 +2915,7 @@ next_cell: template void copy_material_to_manifold_id(Triangulation &tria, - bool compute_face_ids) + const bool compute_face_ids) { typename Triangulation::active_cell_iterator cell=tria.begin_active(), endc=tria.end(); @@ -2927,11 +2927,12 @@ next_cell: { for (unsigned int f=0; f::faces_per_cell; ++f) { - cell->face(f)->set_manifold_id(cell->material_id()); if (cell->neighbor(f) != endc) cell->face(f)->set_manifold_id (std::min(cell->material_id(), cell->neighbor(f)->material_id())); + else + cell->face(f)->set_manifold_id(cell->material_id()); } } } diff --git a/source/grid/grid_tools.inst.in b/source/grid/grid_tools.inst.in index 246dcd76fd..717981f487 100644 --- a/source/grid/grid_tools.inst.in +++ b/source/grid/grid_tools.inst.in @@ -393,9 +393,9 @@ for (deal_II_dimension : DIMENSIONS ; deal_II_space_dimension : SPACE_DIMENSIONS #if deal_II_space_dimension >= deal_II_dimension namespace GridTools \{ template void copy_boundary_to_manifold_id - (Triangulation &, bool); + (Triangulation &, const bool); template void copy_material_to_manifold_id - (Triangulation &, bool); + (Triangulation &, const bool); \} #endif