]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a static manifold. 6364/head
authorDavid Wells <wellsd2@rpi.edu>
Fri, 27 Apr 2018 17:39:37 +0000 (13:39 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 27 Apr 2018 17:41:48 +0000 (13:41 -0400)
examples/step-5/step-5.cc

index 9c57640edaf1aa40c4896234296c674a19cb24dc..ef62241bc96efb9f31c1acd21d2b7eaefe482949 100644 (file)
@@ -441,12 +441,14 @@ void Step5<dim>::run ()
   // <code>GridIn</code> class to find out what input formats are presently
   // supported.)
 
-  // The grid in the file describes a circle. Therefore we have to use
-  // a manifold object which tells the triangulation where to put new
-  // points on the boundary when the grid is refined. This works in
-  // the same way as in the first example, but in this case we only
-  // set the manifold ids of the boundary.
-  static const SphericalManifold<dim> boundary;
+  // The grid in the file describes a circle. Therefore we have to use a
+  // manifold object which tells the triangulation where to put new points on
+  // the boundary when the grid is refined. Unlike step-1, since GridIn does
+  // not know that the domain has a circular boundary (unlike
+  // GridGenerator::hyper_shell) we have to explicitly attach a manifold to
+  // the boundary after creating the triangulation to get the correct result
+  // when we refine the mesh.
+  const SphericalManifold<dim> boundary;
   triangulation.set_all_manifold_ids_on_boundary(0);
   triangulation.set_manifold (0, boundary);
 

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.