From: Wolfgang Bangerth Date: Thu, 16 Jul 2009 23:00:53 +0000 (+0000) Subject: Make a few static member variables public. This allows for some more X-Git-Tag: v8.0.0~7460 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b441ba5866f873d3ebe4fba6a7ef4c45f75a7ac;p=dealii.git Make a few static member variables public. This allows for some more opportunities to do generic programming. git-svn-id: https://svn.dealii.org/trunk@19102 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index c3a701b9eb..0c09f3af59 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -160,6 +160,43 @@ namespace TriaAccessorExceptions template class TriaAccessorBase { + public: + /** + * Dimension of the space the + * object represented by this + * accessor lives in. For + * example, if this accessor + * represents a quad that is + * part of a two-dimensional + * surface in four-dimensional + * space, then this value is + * four. + */ + static const unsigned int space_dimension = spacedim; + + /** + * Dimensionality of the object + * that the thing represented by + * this accessopr is part of. For + * example, if this accessor + * represents a line that is part + * of a hexahedron, then this + * value will be three. + */ + static const unsigned int dimension = dim; + + /** + * Dimensionality of the current + * object represented by this + * accessor. For example, if it + * is line (irrespective of + * whether it is part of a quad + * or hex, and what dimension we + * are in), then this value + * equals 1. + */ + static const unsigned int structure_dimension = structdim; + protected: /** * Declare the data type that @@ -345,15 +382,6 @@ class TriaAccessorBase private: - /** - * Space dimension of the Accessor - */ - static const unsigned int space_dimension = spacedim; - - static const unsigned int dimension = dim; - - static const unsigned int structure_dimension = structdim; - template friend class TriaRawIterator; template friend class TriaIterator; template friend class TriaActiveIterator; @@ -392,6 +420,43 @@ class TriaAccessorBase template class TriaAccessorBase { + public: + /** + * Dimension of the space the + * object represented by this + * accessor lives in. For + * example, if this accessor + * represents a quad that is + * part of a two-dimensional + * surface in four-dimensional + * space, then this value is + * four. + */ + static const unsigned int space_dimension = spacedim; + + /** + * Dimensionality of the object + * that the thing represented by + * this accessopr is part of. For + * example, if this accessor + * represents a line that is part + * of a hexahedron, then this + * value will be three. + */ + static const unsigned int dimension = dim; + + /** + * Dimensionality of the current + * object represented by this + * accessor. For example, if it + * is line (irrespective of + * whether it is part of a quad + * or hex, and what dimension we + * are in), then this value + * equals 1. + */ + static const unsigned int structure_dimension = dim; + protected: /** * Declare the data type that @@ -580,15 +645,6 @@ class TriaAccessorBase */ const Triangulation *tria; - /** - * Space dimension of the Accessor - */ - static const unsigned int space_dimension = spacedim; - - static const unsigned int dimension = dim; - - static const unsigned int structure_dimension = dim; - private: template friend class TriaRawIterator;