From: wolf Date: Sun, 1 Nov 1998 22:23:49 +0000 (+0000) Subject: Change the way we want to enquire the dimension of a point. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83504502fcc4784235b17f13166198dc6e175746;p=dealii-svn.git Change the way we want to enquire the dimension of a point. git-svn-id: https://svn.dealii.org/trunk@619 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/point.h b/deal.II/deal.II/include/grid/point.h index 2d76838a93..28ad47a0e5 100644 --- a/deal.II/deal.II/include/grid/point.h +++ b/deal.II/deal.II/include/grid/point.h @@ -34,7 +34,22 @@ template class Point { public: /** - * Constructor. Initialize all entries + * Provide a way to get the dimension of + * an object without explicit knowledge + * of it's data type. Implementation is + * this way instead of providing a function + * #dimension()# because now it is possible + * to get the dimension at compile time + * without the expansion and preevaluation + * of an inlined function; the compiler may + * therefore produce more efficient code + * and you may use this value to declare + * other data types. + */ + static const unsigned int dimension = dim; + + /** + * Constructor. Initialize all entries * to zero. */ explicit Point (); @@ -67,12 +82,6 @@ class Point { */ Point (const Point &); - /** - * Return the dimension of the space this - * point is living in. - */ - unsigned int dimension() const { return dim; }; - /** * Read access to the #index#th coordinate. */