From 89d1b0b71263439865146804eacc56f18d92939e Mon Sep 17 00:00:00 2001 From: heister Date: Sun, 16 Jun 2013 19:46:54 +0000 Subject: [PATCH] document bug git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29823 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/lac/block_sparsity_pattern_03.cc | 60 +++++++++++++++++++ .../lac/block_sparsity_pattern_03/cmp/generic | 2 + 2 files changed, 62 insertions(+) create mode 100644 tests/lac/block_sparsity_pattern_03.cc create mode 100644 tests/lac/block_sparsity_pattern_03/cmp/generic diff --git a/tests/lac/block_sparsity_pattern_03.cc b/tests/lac/block_sparsity_pattern_03.cc new file mode 100644 index 0000000000..49335bae79 --- /dev/null +++ b/tests/lac/block_sparsity_pattern_03.cc @@ -0,0 +1,60 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006, 2008, 2010 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// BlockSparsityPattern::column_number is broken + +#include "../tests.h" +#include +#include + +#include +#include + +int main() +{ + initlog(__FILE__); + + std::vector row_blocks(2); + row_blocks[0] = 10; + row_blocks[1] = 5; + + BlockCompressedSimpleSparsityPattern csp (row_blocks, row_blocks); + + csp.reinit(2,2); + csp.block(0,0).reinit(10,10); + csp.block(0,1).reinit(10,5); + csp.block(1,0).reinit(5,10); + csp.block(1,1).reinit(5,5); + csp.collect_sizes(); + csp.add(5,5); + csp.add(12,12); + csp.add(5,11); + csp.add(11,3); + + csp.print(deallog.get_file_stream()); + + + for (types::global_dof_index row=0; row