]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add constructor with empty blocks
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 20 May 2011 01:57:29 +0000 (01:57 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 20 May 2011 01:57:29 +0000 (01:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@23725 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/block_list.h

index 47fe1c1c6ddd1edb49236df2e3f8d5b05a748ad4..203e5549aa351081fe700cf30235510b82d22c82 100644 (file)
@@ -71,6 +71,12 @@ class BlockList :
     void add(unsigned int block,
             const std::vector<unsigned int>& indices,
             const std::vector<bool>& selected_indices);
+
+                                    /**
+                                     * Just set up the correct size
+                                     * and assign indices to blocks later.
+                                     */
+    void initialize(unsigned int n_blocks);
     
                                     /**
                                      * Set up all index sets using an
@@ -305,6 +311,14 @@ BlockList::add(
 }
 
 
+inline
+void
+BlockList::initialize(unsigned int n_blocks)
+{
+  index_sets.resize(n_blocks);
+}
+
+
 template <typename ITERATOR>
 inline
 void

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.