// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+// Copyright (C) 2008 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
void reinit (const std::vector<Epetra_Map> &input_maps,
const bool fast = false);
+ /**
+ * Reinitialize the BlockVector to
+ * contain as many blocks as there
+ * are elements in the first
+ * argument, and with the respective
+ * sizes. Since no distribution map
+ * is given, all vectors are local
+ * vectors.
+ *
+ * If <tt>fast==false</tt>, the vector
+ * is filled with zeros.
+ */
+ void reinit (const std::vector<unsigned int> &N,
+ const bool fast=false);
+
/**
* Reinit the function
* according to a distributed
BlockVector::reinit (const std::vector<Epetra_Map> &input_maps,
const bool fast)
{
- unsigned int no_blocks = input_maps.size();
+ const unsigned int no_blocks = input_maps.size();
std::vector<unsigned int> block_sizes (no_blocks);
for (unsigned int i=0; i<no_blocks; ++i)
+ void
+ BlockVector::reinit (const std::vector<unsigned int> &block_sizes,
+ const bool /*fast*/)
+ {
+ this->block_indices.reinit (block_sizes);
+ if (components.size() != n_blocks())
+ components.resize(n_blocks());
+
+ for (unsigned int i=0; i<n_blocks(); ++i)
+//TODO: use the 'fast' argument here...
+ components[i].reinit(block_sizes[i]);
+
+ collect_sizes();
+ }
+
+
+
void
BlockVector::reinit (const MPI::BlockVector &v)
{