// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
CompressedBlockSparsityPattern (const unsigned int n_rows,
const unsigned int n_columns);
+
+ /**
+ * Initialize the pattern with
+ * two BlockIndices for the block
+ * structures of matrix rows and
+ * columns. This function is
+ * equivalent to calling the
+ * previous constructor with the
+ * length of the two index vector
+ * and then entering the index
+ * values.
+ */
+ CompressedBlockSparsityPattern (const std::vector<unsigned int>& row_block_sizes,
+ const std::vector<unsigned int>& col_block_sizes);
+
};
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
{}
+CompressedBlockSparsityPattern::
+CompressedBlockSparsityPattern (const std::vector<unsigned int>& row_indices,
+ const std::vector<unsigned int>& col_indices)
+ :
+ BlockSparsityPatternBase<CompressedSparsityPattern>(row_indices.size(),
+ col_indices.size())
+{
+ for (unsigned int i=0;i<row_indices.size();++i)
+ for (unsigned int j=0;j<col_indices.size();++j)
+ this->block(i,j).reinit(row_indices[i],col_indices[j]);
+ this->collect_sizes();
+}
+
+
// Remark: The explicit instantiations for "BlockSparsityPatternBase" were moved
// to the top of this source file. The reason is a slightly buggy version
// of the Apple gcc v.3.3.