2019.09.16 Step-1 Study
The “step-1” is very fundamental one in the deal.ii tutorials. It is about how to generate grids. Two grids were generated. They are rectangular and ring-shape grids. The rectangular grid (mesh) is an uniform mesh, while the ring shape grid has been locally refined along the inner circle.
The code has been adapted to 3D by only changing the number in each template from <2> to <3>. We can get the 3D meshes which are shown as follows,
However, we can see that the grids (2D and 3D) in the above right figures are not good. Even there are some elements having been refined, they only locate at the vertexes. This problem is caused by the selection of cells to be refined.
According to the judging criterion for selection cell for refining, which is as highlighted in the following picture, only when one cell has a vertex that is located on the inner surface of the shell (the distance tolerance is very small, 1E-10), the cell will be flagged with “set_refine_flag” and will be refined later. However, as we can see from the top right figure, some of the refined cells that are generated in the first two refining processes will have no vertex close enough to the inner surface of the shell. Therefore, the following grid refining processes will not include those cells. Only the cells including the vertexes of the original coarse grid will keep being refined. This make the final grid look like uneven and fine cells concentrate at several points.
The problem could be resolved by force the vertexes generated after each refining process to lay on the inner surface of the shell so that they can be selected in the following refining processes. For achieving this purpose, the “manifold” has been used, which coincidentally can make the new generated vertexes lay on the inner surface.
The manifold has been attached to the triangulation through adding the highlighted four lines.
Now the result becomes better. (the 2D can be achieved similarly.)
From this example, we can see that “manifold” is really important concept in deal.II.
The official tutorial document is as follows,
https://www.dealii.org/current/doxygen/deal.II/step_1.html
The explanation from Dr. Xinbo Qi can be viewed from this link,
http://qixinbo.info/2016/08/02/dealii-learn-step1/
The tutorial about how to set up deal.II in Eclipse IDE can be found:
https://github.com/dealii/dealii/wiki/Eclipse