From: kanschat Date: Sun, 28 Jan 2007 06:38:12 +0000 (+0000) Subject: provide a simpler constructor for ComressedBlockSparsityPattern X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab7f3809cd2732fc84b811b718af0f4f6a2b5992;p=dealii-svn.git provide a simpler constructor for ComressedBlockSparsityPattern git-svn-id: https://svn.dealii.org/trunk@14390 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_sparsity_pattern.h b/deal.II/lac/include/lac/block_sparsity_pattern.h index dcb66eb511..b582e58c48 100644 --- a/deal.II/lac/include/lac/block_sparsity_pattern.h +++ b/deal.II/lac/include/lac/block_sparsity_pattern.h @@ -2,7 +2,7 @@ // $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 @@ -562,6 +562,21 @@ class CompressedBlockSparsityPattern : public BlockSparsityPatternBase& row_block_sizes, + const std::vector& col_block_sizes); + }; diff --git a/deal.II/lac/source/block_sparsity_pattern.cc b/deal.II/lac/source/block_sparsity_pattern.cc index 0a43712a30..7ce640d011 100644 --- a/deal.II/lac/source/block_sparsity_pattern.cc +++ b/deal.II/lac/source/block_sparsity_pattern.cc @@ -2,7 +2,7 @@ // $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 @@ -387,6 +387,20 @@ CompressedBlockSparsityPattern (const unsigned int n_rows, {} +CompressedBlockSparsityPattern:: +CompressedBlockSparsityPattern (const std::vector& row_indices, + const std::vector& col_indices) + : + BlockSparsityPatternBase(row_indices.size(), + col_indices.size()) +{ + for (unsigned int i=0;iblock(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.