]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add dimension variable.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 27 Feb 2006 16:22:03 +0000 (16:22 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 27 Feb 2006 16:22:03 +0000 (16:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@12511 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/persistent_tria.h
deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/include/multigrid/mg_dof_handler.h
deal.II/deal.II/source/dofs/dof_handler.cc
deal.II/deal.II/source/dofs/hp_dof_handler.cc
deal.II/deal.II/source/grid/persistent_tria.cc
deal.II/deal.II/source/grid/tria.cc
deal.II/deal.II/source/multigrid/mg_dof_handler.cc

index 38034f3b573dbd8122c41ee0a4c6e044e7a07027..a56fd4bdb3fdf3acc037303d038594976111f665 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 template <int dim>
 class PersistentTriangulation : public Triangulation<dim> 
 {
-  public:
+  public:    
+                                    /**
+                                     * Make the dimension available
+                                     * in function templates.
+                                     */
+    static const unsigned int dimension = dim;
+    
                                     /**
                                      * Build up the triangulation from the
                                      * coarse grid in future. Copy smoothing
index ecdafae4c2d72d7d178baaba90d5832caad575cd..d55b9361d97d45fb5e95072b7595791dafbab7b1 100644 (file)
@@ -1277,6 +1277,12 @@ class Triangulation : public Subscriptor
         post_refinement_notification (const Triangulation<dim> &tria);
     };
     
+                                    /**
+                                     * Make the dimension available
+                                     * in function templates.
+                                     */
+    static const unsigned int dimension = dim;
+
                                     /**
                                      *  Create a triangulation and create
                                      *  the first level of the hierarchy.
index 8812e485860e732768e16f6017f8e8a45b34b5e8..a1194cd0938e889374a3c28ae57e14d902af47f1 100644 (file)
@@ -230,6 +230,12 @@ class MGDoFHandler : public DoFHandler<dim>
     typedef typename MGDoFDimensionInfo<dim>::face_iterator face_iterator;
     typedef typename MGDoFDimensionInfo<dim>::active_face_iterator active_face_iterator;
 
+                                    /**
+                                     * Make the dimension available
+                                     * in function templates.
+                                     */
+    static const unsigned int dimension = dim;
+
                                     /**
                                      * Constructor. Take @p tria as
                                      * the triangulation to work on.
index 048d67d507a905587d780a1d099a1c00956699e2..be621d115c59e8aac7e5ea6037b877a14a86c45b 100644 (file)
@@ -27,6 +27,8 @@
 #include <algorithm>
 
 
+template <int dim>
+const unsigned int DoFHandler<dim>::dimension;
 
 template <int dim>
 const unsigned int DoFHandler<dim>::invalid_dof_index;
index 8e90572e3694637cc629aeeb831b279f26a0b24d..09d09a39ab2abbcea21d81faf9562c26792ff5e5 100644 (file)
@@ -31,6 +31,8 @@
 namespace hp
 {
   
+  template <int dim>
+  const unsigned int DoFHandler<dim>::dimension;
 
   template <int dim>
   const unsigned int DoFHandler<dim>::invalid_dof_index;
index 0201f2da38028c408baba6075c13f025ede5f637..cd3bd6ac690ea56a7ed436346d98d4d42c213e65 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <iostream>
 
 
+template <int dim>
+const unsigned int
+Triangulation<dim>::dimension;
+
 
 template <int dim>
 PersistentTriangulation<dim>::
index c2a402a5bd7d8fd9bbf33357addfa51553a96ca5..61f41a99316793a91a5864fc92a4c12de55e46fe 100644 (file)
@@ -43,6 +43,9 @@ template <int dim>
 const StraightBoundary<dim> *
 Triangulation<dim>::straight_boundary = &dummy_straight_boundary;
 
+template <int dim>
+const unsigned int
+Triangulation<dim>::dimension;
 
 
 template <int dim>
index 8c30bc45e5134b65917803fc160f891cf88a87ca..d3f040cb393d49fced361e4ceae43e5bc7a5cf42 100644 (file)
@@ -103,6 +103,10 @@ unsigned int MGDoFHandler<dim>::MGVertexDoFs::get_finest_level () const {
 
 /* ------------------------ MGDoFHandler ------------------------------------- */
 
+template <int dim>
+const unsigned int MGDoFHandler<dim>::dimension;
+
+
 template <int dim>
 MGDoFHandler<dim>::MGDoFHandler (const Triangulation<dim> &tria) :
                DoFHandler<dim> (tria)

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.