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

index bbd3c3e56364739dab259faeab6ee63ab9f57aa7..94c3b673e52cafd5a85743e73a00006f4b3ffa8a 100644 (file)
@@ -25,7 +25,7 @@
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/tria_accessor.h>
 #include <deal.II/grid/tria_iterator.h>
-#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/manifold_lib.h>
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/grid_out.h>
 #include <deal.II/dofs/dof_handler.h>
@@ -77,12 +77,12 @@ namespace Step10
 
     // So first generate a coarse triangulation of the circle and associate a
     // suitable boundary description to it. Note that the default values of
-    // the HyperBallBoundary constructor are a center at the origin and a
-    // radius equals one.
+    // the SphericalManifold constructor is a center at the origin.
     Triangulation<dim> triangulation;
     GridGenerator::hyper_ball (triangulation);
-    static const HyperBallBoundary<dim> boundary;
-    triangulation.set_boundary (0, boundary);
+    static const SphericalManifold<dim> boundary;
+    triangulation.set_all_manifold_ids_on_boundary(0);
+    triangulation.set_manifold (0, boundary);
 
     // Next generate output for this grid and for a once refined grid. Note
     // that we have hidden the mesh refinement in the loop header, which might
@@ -215,8 +215,9 @@ namespace Step10
         Triangulation<dim> triangulation;
         GridGenerator::hyper_ball (triangulation);
 
-        static const HyperBallBoundary<dim> boundary;
-        triangulation.set_boundary (0, boundary);
+        static const SphericalManifold<dim> boundary;
+        triangulation.set_all_manifold_ids_on_boundary (0);
+        triangulation.set_manifold(0, boundary);
 
         const MappingQ<dim> mapping (degree);
 
@@ -351,8 +352,9 @@ namespace Step10
         Triangulation<dim> triangulation;
         GridGenerator::hyper_ball (triangulation);
 
-        static const HyperBallBoundary<dim> boundary;
-        triangulation.set_boundary (0, boundary);
+        static const SphericalManifold<dim> boundary;
+        triangulation.set_all_manifold_ids_on_boundary (0);
+        triangulation.set_manifold (0, boundary);
 
         const MappingQ<dim> mapping (degree);
         const FE_Q<dim>     fe (1);

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.