From da0e57d61b827ad4edb7da31c8114dd0568eb28e Mon Sep 17 00:00:00 2001 From: Krishnakumar Gopalakrishnan Date: Tue, 14 Jan 2020 18:05:30 +0000 Subject: [PATCH] Lots of documentation fixes to Step-49 tutorial aims to wrap create_coarse_grid function in monospace font fixes a minor typo trying to fix the monospace font of step-49.cc file in step 49, simplify the boundary_count loop by directly using active_face_iterators In step-49, updates the transform code to directly correspond 1:1 with the given math formula semantic font use for code in step-49 results/extension Fixes a documentation error. Move extract_boundary_mesh from GridTools to GridGenerator namespace in step-49 semantic font use for code in step-49 results/extension --- examples/step-49/doc/intro.dox | 8 +++----- examples/step-49/doc/results.dox | 10 +++++----- examples/step-49/step-49.cc | 13 ++++--------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/examples/step-49/doc/intro.dox b/examples/step-49/doc/intro.dox index 1bfd7edd3d..b98724c018 100644 --- a/examples/step-49/doc/intro.dox +++ b/examples/step-49/doc/intro.dox @@ -54,7 +54,7 @@ If there is no good fit in the GridGenerator namespace for what you want to do, you can always create a Triangulation in your program "by hand". For that, you need a list of vertices with their coordinates and a list of cells referencing those vertices. You can -find an example in the function create_coarse_grid in step-14. +find an example in the function create_coarse_grid() in step-14. All the functions in GridGenerator are implemented in this fashion. We are happy to accept more functions to be added to GridGenerator. So, if @@ -84,7 +84,7 @@ supported at the time of writing this tutorial (early 2013). In Gmsh, a mesh is described in a text based .geo file, that can contain computations, loops, variables, etc. It is very flexible. The mesh is -generated from a surface representation, which is build from a list of line +generated from a surface representation, which is built from a list of line loops, which is build from a list of lines, which are in turn built from points. The .geo script can be written and edited by hand or it can be generated automatically by creating objects graphically inside Gmsh. In @@ -99,7 +99,7 @@ indicators as well as the mesh discussed further down below): You might want to open the example.geo file in a text editor (it -is located in the same directory as the step-49.cc source file) to +is located in the same directory as the step-49.cc source file) to see how it is structured. You can see how the boundary of the domain is composed of a number of lines and how later on we combine several lines into "physical lines" (or "physical surfaces") that list the logical lines' @@ -277,5 +277,3 @@ refinement. This is not difficult — in fact, there is nothing else to do often not the case if you have a more complex geometry and more steps than just creating the mesh are necessary. We will go over some of these steps in the results section below. - - diff --git a/examples/step-49/doc/results.dox b/examples/step-49/doc/results.dox index e7b1ddab4a..396cbd7ee2 100644 --- a/examples/step-49/doc/results.dox +++ b/examples/step-49/doc/results.dox @@ -344,7 +344,7 @@ cells and their faces and identify the correct faces (for example using `cell->center()` to query the coordinates of the center of a cell as we do in step-1, or using `cell->face(f)->get_boundary_id()` to query the current boundary indicator of the $f$th face of the cell). You can then use -cell->face(f)->set_boundary_id() to set the boundary id to something different. +`cell->face(f)->set_boundary_id()` to set the boundary id to something different. You can take a look back at step-1 how iteration over the meshes is done there.

Extracting a boundary mesh

@@ -354,10 +354,10 @@ mesh embedded into a higher dimensional space. While some can be constructed using the GridGenerator namespace or loaded from a file, it is sometimes useful to extract a surface mesh from a volume mesh. -Use the function GridTools::extract_boundary_mesh() to extract the surface -elements of a mesh. Using the function on a 3d mesh (a Triangulation<3,3>, for -example from grid_4()), this will return a Triangulation<2,3> that you can use -in step-38. Also try extracting the boundary mesh of a Triangulation<2,2>. +Use the function GridGenerator::extract_boundary_mesh() to extract the surface +elements of a mesh. Using the function on a 3d mesh (a `Triangulation<3,3>`, for +example from `grid_4()`), this will return a `Triangulation<2,3>` that you can use +in step-38. Also try extracting the boundary mesh of a `Triangulation<2,2>`.