]> https://gitweb.dealii.org/ - dealii.git/commitdiff
colorize hypercubes
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 23 Jun 2014 09:52:13 +0000 (09:52 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 23 Jun 2014 09:52:13 +0000 (09:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@33079 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/grid/grid_generator.h
deal.II/source/grid/grid_generator.cc
deal.II/source/grid/grid_generator.inst.in

index 957f6ddb4db5212a05167a8bb49a48ad14eb9ed0..c8ca073a36810104d5f89b31c4a62f0ad8ebac7f 100644 (file)
@@ -148,6 +148,12 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Improved: GridGenerator::hyper_cube() accepts a
+  <code>colorize</code> argument.
+  <br>
+  (Guido Kanschat, 2014/06/23)
+  </li>
+  
   <li> New: Functions DoFTools::extract_locally_relevant_dofs(),
   parallel::distributed::refine_and_coarsen_fixed_number() and
   parallel::distributed::refine_and_coarsen_fixed_fraction() are
index 27b5dfee0bc8267f4fd0617be17b54a9b6afc6a7..6918354afdf8b599578054f6b20e3071ed008877 100644 (file)
@@ -54,13 +54,16 @@ template <typename number> class SparseMatrix;
 namespace GridGenerator
 {
   /**
-   * Initialize the given triangulation with a hypercube (line in 1D, square
-   * in 2D, etc) consisting of exactly one cell. The hypercube volume is the
-   * tensor product interval <i>[left,right]<sup>dim</sup></i> in the present
-   * number of dimensions, where the limits are given as arguments. They
-   * default to zero and unity, then producing the unit hypercube. All
-   * boundary indicators are set to zero ("not colorized") for 2d and 3d. In
-   * 1d the indicators are colorized, see hyper_rectangle().
+   * Initialize the given triangulation with a hypercube (line in 1D,
+   * square in 2D, etc) consisting of exactly one cell. The hypercube
+   * volume is the tensor product interval
+   * \f$ [left,right]^{\text{dim}}\f$ in the present number of
+   * dimensions, where the limits are given as arguments. They default
+   * to zero and unity, then producing the unit hypercube. If the
+   * argument `colorize` is false, all boundary indicators are set to
+   * zero ("not colorized") for 2d and 3d. If it is true, the boundary
+   * is colorized as in hyper_rectangle(). In 1d the indicators are
+   * always colorized, see hyper_rectangle().
    *
    * @image html hyper_cubes.png
    *
@@ -73,7 +76,8 @@ namespace GridGenerator
   template <int dim, int spacedim>
   void hyper_cube (Triangulation<dim,spacedim>  &tria,
                    const double                  left = 0.,
-                   const double                  right= 1.);
+                   const double                  right= 1.,
+                  const bool                    colorize= false);
 
   /**
    * Same as hyper_cube(), but with the difference that not only one cell is
index 06a3b147e7a956ae61ef29a0741240fb34626054..7595d5612caad3f60b81f3233a0dea9139a7a7d8 100644 (file)
@@ -421,7 +421,8 @@ namespace GridGenerator
   template <int dim, int spacedim>
   void hyper_cube (Triangulation<dim,spacedim> &tria,
                    const double                 left,
-                   const double                 right)
+                   const double                 right,
+                  const bool                   colorize)
   {
     Assert (left < right,
             ExcMessage ("Invalid left-to-right bounds of hypercube"));
@@ -437,7 +438,7 @@ namespace GridGenerator
         p1(i) = left;
         p2(i) = right;
       }
-    hyper_rectangle (tria, p1, p2);
+    hyper_rectangle (tria, p1, p2, colorize);
   }
 
 
index 913a91ab07ee7061320001b6f64e4791df316516..4101f47e36e4137f59d749ad4fcda33fb3d91bea 100644 (file)
@@ -28,7 +28,7 @@ namespace GridGenerator
     
     template void
       hyper_cube<deal_II_dimension, deal_II_space_dimension> (
-       Triangulation<deal_II_dimension, deal_II_space_dimension> &, const double, const double);
+       Triangulation<deal_II_dimension, deal_II_space_dimension> &, const double, const double, const bool);
     
     template
       void

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.