]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Boundary->Manifold in step-5.
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 14 Jan 2015 15:02:45 +0000 (16:02 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 15 Jan 2015 21:45:05 +0000 (22:45 +0100)
examples/step-5/step-5.cc

index 1ad804e24de9c76ffbf0e3f48c117ff1003dba34..c80cc74f4e3e6f0562a4a5084e6d2b107851f11b 100644 (file)
@@ -49,7 +49,7 @@
 
 // We will use a circular domain, and the object describing the boundary of it
 // comes from this file:
-#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/manifold_lib.h>
 
 // This is C++ ...
 #include <fstream>
@@ -592,14 +592,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
-  // boundary 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. Note that the HyperBallBoundary constructor takes two
-  // parameters, the center of the ball and the radius, but that their default
-  // (the origin and 1.0) are the ones which we would like to use here.
-  static const HyperBallBoundary<dim> boundary;
-  triangulation.set_boundary (0, 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. 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;
+  triangulation.set_all_manifold_ids_on_boundary(0);
+  triangulation.set_manifold (0, boundary);
 
   for (unsigned int cycle=0; cycle<6; ++cycle)
     {

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.