]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove some specializations for 1d since the generic code now also works for 1d.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 2 Sep 2011 23:48:30 +0000 (23:48 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 2 Sep 2011 23:48:30 +0000 (23:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@24243 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/grid_tools.h
deal.II/source/grid/grid_tools.cc
deal.II/source/grid/grid_tools.inst.in

index cacf76a6333261b6fe02ada5a06370417487ee08..c57c608c9c7b13b1cc1a7e87e269eb8e26e9c749 100644 (file)
@@ -62,18 +62,7 @@ class GridTools
     template <int dim, int spacedim>
     static
     double diameter (const Triangulation<dim, spacedim> &tria);
-
-                                    /**
-                                     * Same function, but for 1d.
-                                     */
-    static
-    double diameter (const Triangulation<1> &tria);
-                                    /**
-                                     * Same function, but for 1d, 2sd.
-                                     */
-    static
-    double diameter (const Triangulation<1,2> &tria);
-
+    
                                     /**
                                      * Given a list of vertices (typically
                                      * obtained using
index 991167b6197b3a7b961070b1a3402e8bc2bfb08a..08131de96a51f06f4e23aa66277854ef6816d7e1 100644 (file)
@@ -126,23 +126,6 @@ GridTools::diameter (const Triangulation<dim, spacedim> &tria)
 
 
 
-double
-GridTools::diameter (const Triangulation<1> &tria)
-{
-                                  // for 1d, simply check the
-                                  // vertices of the left- and
-                                  // rightmost coarse grid cell
-  Triangulation<1>::cell_iterator leftmost  = tria.begin(0);
-  Triangulation<1>::cell_iterator rightmost = tria.begin(0);
-
-  while (!leftmost->at_boundary(0))  leftmost  = leftmost->neighbor(0);
-  while (!rightmost->at_boundary(1)) rightmost = rightmost->neighbor(1);
-
-  return std::sqrt((leftmost->vertex(0) - rightmost->vertex(1)).square());
-}
-
-
-
 template <>
 double
 GridTools::cell_measure<3>(const std::vector<Point<3> > &all_vertices,
index 8fcdd37d8e9a6003c1f7edb5ed0642c4a10af991..9d0533cd67e5e6eae22ecda108d74b778e281314 100644 (file)
@@ -52,14 +52,11 @@ for (X : TRIANGULATION_AND_DOFHANDLERS; deal_II_dimension : DIMENSIONS)
 
 for (deal_II_dimension : DIMENSIONS)
   {
-
-#if deal_II_dimension != 1
     template
       double
       GridTools::diameter<deal_II_dimension> (const Triangulation<deal_II_dimension> &);
-#endif
 
-#if deal_II_dimension == 2
+#if deal_II_dimension < 3
     template
       double
       GridTools::diameter<deal_II_dimension, deal_II_dimension+1> (const Triangulation<deal_II_dimension, deal_II_dimension+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.