]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Doc update.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Sep 2002 20:05:12 +0000 (20:05 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Sep 2002 20:05:12 +0000 (20:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@6446 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_vector.h

index 1846876ebff637b5b38ea55879e1e02e2754b287..4bb894ce272f6a389f3b7b498ff1be96941ed2e6 100644 (file)
@@ -607,7 +607,24 @@ namespace BlockVectorIterators
  * working on iterators also work with objects of this class.
  *
  *
- * @sect2{On template instantiations}
+ * @sect3{Accessing individual blocks, and resizing vectors}
+ *
+ * Apart from using this object as a whole, you are free to access
+ * each of the individual blocks using the @p{block} function for
+ * separate operations, both for reading and writing. The only things
+ * that is not allowed is to change the size of an individual block
+ * through the @p{reinit} function of the @ref{Vector} class. This is
+ * due to the fact that the @p{BlockVector} class keeps a cache of
+ * sizes, and this will become invalid when you change one of the
+ * blocks without giving the block vector object the chance to note
+ * this in its internal tables.
+ *
+ * Therefore, changing the size of all, or some of the individual
+ * blocks is only possible through the @p{reinit} function of this
+ * block vector object.
+ * 
+ * 
+ * @sect3{On template instantiations}
  *
  * Member functions of this class are either implemented in this file
  * or in a file of the same name with suffix ``.templates.h''. For the
@@ -731,6 +748,21 @@ class BlockVector
                                      *
                                      * If @p{fast==false}, the vector
                                      * is filled with zeros.
+                                     *
+                                     * Note that you must call this
+                                     * (or the other @p{reinit}
+                                     * functions) function, rather
+                                     * than calling the @p{reinit}
+                                     * functions of an individual
+                                     * block, to allow the block
+                                     * vector to update its caches of
+                                     * vector sizes. If you call
+                                     * @p{reinit} of one of the
+                                     * blocks, then subsequent
+                                     * actions of this object may
+                                     * yield unpredictable results
+                                     * since they may be routed to
+                                     * the wrong block.
                                      */
     void reinit (const unsigned int num_blocks,
                 const unsigned int block_size,
@@ -756,18 +788,50 @@ class BlockVector
                                      *
                                      * If @p{fast==false}, the vector
                                      * is filled with zeros.
+                                     *
+                                     * Note that you must call this
+                                     * (or the other @p{reinit}
+                                     * functions) function, rather
+                                     * than calling the @p{reinit}
+                                     * functions of an individual
+                                     * block, to allow the block
+                                     * vector to update its caches of
+                                     * vector sizes. If you call
+                                     * @p{reinit} of one of the
+                                     * blocks, then subsequent
+                                     * actions of this object may
+                                     * yield unpredictable results
+                                     * since they may be routed to
+                                     * the wrong block.
                                      */ 
     void reinit (const std::vector<unsigned int> &N,
                 const bool                       fast=false);
     
                                     /**
-                                     * Change the dimension to that of the
-                                     * vector @p{V}. The same applies as for
-                                     * the other @p{reinit} function.
+                                     * Change the dimension to that
+                                     * of the vector @p{V}. The same
+                                     * applies as for the other
+                                     * @p{reinit} function.
+                                     *
+                                     * The elements of @p{V} are not
+                                     * copied, i.e.  this function is
+                                     * the same as calling @p{reinit
+                                     * (V.size(), fast)}.
                                      *
-                                     * The elements of @p{V} are not copied, i.e.
-                                     * this function is the same as calling
-                                     * @p{reinit (V.size(), fast)}.
+                                     * Note that you must call this
+                                     * (or the other @p{reinit}
+                                     * functions) function, rather
+                                     * than calling the @p{reinit}
+                                     * functions of an individual
+                                     * block, to allow the block
+                                     * vector to update its caches of
+                                     * vector sizes. If you call
+                                     * @p{reinit} of one of the
+                                     * blocks, then subsequent
+                                     * actions of this object may
+                                     * yield unpredictable results
+                                     * since they may be routed to
+                                     * the wrong block.
                                      */
     template <typename Number2>
     void reinit (const BlockVector<Number2> &V,

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.