From: schrage Date: Mon, 7 Jun 1999 14:12:35 +0000 (+0000) Subject: Update for newer deal.II version, class GridGenerator X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2199bd54f0bbe5863e25c36ac1384ebecbf1b7d5;p=dealii-svn.git Update for newer deal.II version, class GridGenerator git-svn-id: https://svn.dealii.org/trunk@1376 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-1.elements/grid_creation.html b/deal.II/doc/tutorial/chapter-1.elements/grid_creation.html index 438b358d95..633f76d18c 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/grid_creation.html +++ b/deal.II/doc/tutorial/chapter-1.elements/grid_creation.html @@ -20,7 +20,9 @@ Choosing the right kind of grid can be essential for solving your problem. A grid should be chosen to fit your problem space in the best way possible. This chapter describes coarse grids for the triangulation of your domain.

- +

Please remember throughout this chapter: +A triangulation must be void before it is initialized ! +

deal.II offers three fundamental grid types: a hypercube, a hyperball @@ -32,7 +34,7 @@ and a hyper_L. Furthermore it is possible to

A hypercube can be created using the function
-void Triangulation::create_hypercube(const double left=0.,const double right=1.)
+void GridGenerator<dim>::hyper_cube(Triangulation<dim> &tria,const double left=0.,const double right=1.)
The cube created is the tensor product of the left and right edges which default to 0 and 1, creating the unit hypercube. The hypercube will consist of exactly one cell. In two dimensions, this amounts to a unit square, in three, to a unit cube. @@ -53,11 +55,12 @@ function calls needed. Be sure to use them in their appropriate places.

 
 #include <grid/tria.h>
+#include <grid/grid_generator.h>
 
 const unsigned int dim=2;  // Two dimensions; to create a cube set to three
 Triangulation<dim> tr;
 
-tr.create_hypercube(-1,1);
+GridGenerator<dim>::hyper_cube(tr,-1,1);
 
 
@@ -65,7 +68,7 @@ tr.create_hypercube(-1,1);

Hyperball

A hyperball can be created using the function
-void Triangulation::create_hyper_ball(const Point<dim> center=0.,const double radius=1.)
+void GridGenerator<dim>::hyper_ball(Triangulation<dim> &tria,const Point<dim> center=0.,const double radius=1.)
This will create a hyperball of given centre and radius where the location of the centre defaults to the origin and the radius to unity.

@@ -85,13 +88,14 @@ This example will create a hyperball with unit radius centred on (1,0).
 
 #include <grid/tria.h>
+#include <grid/grid_generator.h>
 #include <base/point.h>
 
 const unsigned int dim=2;  // For example
 Triangulation<dim> tr;
 Point<dim> centre(1,0); // Taking (1,0) as the centre of the ball
 
-tr.create_hyperball(centre,1);
+GridGenerator<dim>::hyper_ball(tr,centre,1);
 
 
 
@@ -100,7 +104,7 @@ tr.create_hyperball(centre,1);

Hyper-L

A hyper-L can be created using the function
-void Triangulation::create_hyper_L(const double left=-1.,const double right=1.)
+void GridGenerator::hyper_L(Triangulation<dim> &tria,const double left=-1.,const double right=1.)
This will create a hyper-L consisting of 2dimension-1 cells. The hyper-L is created from the hypercube [left,right]dimension by taking away the hypercube [left+right/2,right]dimension. @@ -131,11 +135,12 @@ This example will create the default hyper-L.

 
 #include <grid/tria.h>
+#include <grid/grid_generator.h>
 
 const unsigned int dim=2;  // For example
 Triangulation<dim> tr;
 
-tr.create_hyper_L(-1,1);
+GridGenerator<dim>::hyper_L(tr,-1,1);