]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Function::dimension
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Sep 2003 20:42:47 +0000 (20:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Sep 2003 20:42:47 +0000 (20:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@7981 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/function.h
deal.II/base/source/function.cc
deal.II/doc/news/c-4-0.html

index b0d925b8d1b13eedd94cf587b34c3d254a59be73..1f4627967b3e1df3e93baa0552540bf6b7609f59 100644 (file)
@@ -100,6 +100,15 @@ class Function : public FunctionTime,
                 public Subscriptor
 {
   public:
+                                    /**
+                                     * Export the value of the
+                                     * template parameter as a static
+                                     * member constant. Sometimes
+                                     * useful for some expression
+                                     * template programming.
+                                     */
+    static const unsigned int dimension = dim;
+    
                                     /**
                                      * Number of vector components.
                                      */
index fdad456fd2f34ce9300fdd164299840a8a90d2c8..d5cccf91a493ff7cae3d8f86c33516a1a4dfa8d3 100644 (file)
 #include <vector>
 
 
+template <int dim>
+const unsigned int Function<dim>::dimension;
+
+
 template <int dim>
 Function<dim>::Function (const unsigned int n_components,
                         const double       initial_time)
index 6cc87122e4da8edb96e339ba7a07e751ad3e09f9..b63fcd672ba74b472f7353358aa0008a639f1dbd 100644 (file)
@@ -98,6 +98,13 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>base</h3>
 
 <ol>
+  <li> <p> New: The <code class="class">Function</code> class now
+       exports the value of its template argument through the static
+       member variable <code class="member">dimension</code>.
+       <br>
+       (WB 2002/09/15)
+       </p>
+
   <li> <p> Changed: The <code
        class="member">ParameterHandler::declare_entry</code> function
        now allows to redeclare an entry that has already been

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.