From: wolf Date: Thu, 18 May 2000 12:14:55 +0000 (+0000) Subject: Allow access to the block indices. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfa82d7e5bb5833ffbd453b3774ed1178108aa82;p=dealii-svn.git Allow access to the block indices. git-svn-id: https://svn.dealii.org/trunk@2888 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_vector.h b/deal.II/lac/include/lac/block_vector.h index a944da4380..bc6400f5e4 100644 --- a/deal.II/lac/include/lac/block_vector.h +++ b/deal.II/lac/include/lac/block_vector.h @@ -183,7 +183,17 @@ class BlockVector /** * Read-only access to a single block. */ - const Vector& block (const unsigned int i) const; + const Vector & + block (const unsigned int i) const; + + /** + * Return a reference on the + * object that describes the + * mapping between block and + * global indices. + */ + const BlockIndices & + get_block_indices () const; /** * $U(0-N) = s$: fill all components. @@ -512,6 +522,8 @@ BlockVector::block(unsigned int i) return components[i]; } + + template inline const Vector& @@ -523,6 +535,16 @@ BlockVector::block(unsigned int i) const } + +template +inline +const BlockIndices& +BlockVector::get_block_indices () const +{ + return block_indices; +} + + /** * Global function #swap# which overloads the default implementation * of the C++ standard library which uses a temporary object. The