From: Wolfgang Bangerth Date: Mon, 15 Sep 2003 20:42:47 +0000 (+0000) Subject: Function::dimension X-Git-Tag: v8.0.0~16229 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1caa981aa3da0c0b1bd499128986c65d0924c365;p=dealii.git Function::dimension git-svn-id: https://svn.dealii.org/trunk@7981 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/function.h b/deal.II/base/include/base/function.h index b0d925b8d1..1f4627967b 100644 --- a/deal.II/base/include/base/function.h +++ b/deal.II/base/include/base/function.h @@ -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. */ diff --git a/deal.II/base/source/function.cc b/deal.II/base/source/function.cc index fdad456fd2..d5cccf91a4 100644 --- a/deal.II/base/source/function.cc +++ b/deal.II/base/source/function.cc @@ -18,6 +18,10 @@ #include +template +const unsigned int Function::dimension; + + template Function::Function (const unsigned int n_components, const double initial_time) diff --git a/deal.II/doc/news/c-4-0.html b/deal.II/doc/news/c-4-0.html index 6cc87122e4..b63fcd672b 100644 --- a/deal.II/doc/news/c-4-0.html +++ b/deal.II/doc/news/c-4-0.html @@ -98,6 +98,13 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK

base

    +
  1. New: The Function class now + exports the value of its template argument through the static + member variable dimension. +
    + (WB 2002/09/15) +

    +
  2. Changed: The ParameterHandler::declare_entry function now allows to redeclare an entry that has already been