// $Id$
// Version: $Name$
//
-// Copyright (C) 2007 by the deal.II authors
+// Copyright (C) 2007, 2011 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
void test (const BlockIndices& idx)
{
const unsigned int n = idx.size();
- deallog << "blocks " << idx.size() << std::endl
- << "elements " << idx.total_size() << std::endl
- << "block sizes ";
+ deallog << "sizes: " << idx << std::endl;
+ deallog << "start: ";
for (unsigned i=0;i<n;++i)
- deallog << '\t' << idx.block_size(i);
- deallog << std::endl << "Block start ";
- for (unsigned i=0;i<n;++i)
- deallog << '\t' << idx.block_start(i);
+ deallog << ' ' << idx.block_start(i);
deallog << std::endl;
deallog.attach(logfile);
deallog.depth_console(0);
+ BlockIndices bi0;
+ deallog << "empty: " << bi0 << std::endl;
+ bi0.push_back(3);
+ deallog << "push: " << bi0 << std::endl;
+ bi0.push_back(2);
+ deallog << "push: " << bi0 << std::endl;
+
BlockIndices bi1(3);
test(bi1);
bi1.reinit(3,4);
test(bi1);
+ bi1.push_back(2);
+ deallog << "push: " << bi1 << std::endl;
+ bi1.push_back(5);
+ deallog << "push: " << bi1 << std::endl;
+ bi1.push_back(4);
+ test(bi1);
std::vector<unsigned int> v(4);
for (unsigned int i=0;i<v.size();++i)
-DEAL::blocks 3
-DEAL::elements 0
-DEAL::block sizes 0 0 0
-DEAL::Block start 0 0 0
+DEAL::empty: 0:[]->0
+DEAL::push: 1:[3]->3
+DEAL::push: 2:[3 2]->5
+DEAL::sizes: 3:[0 0 0]->0
+DEAL::start: 0 0 0
DEAL::
DEAL::
-DEAL::blocks 3
-DEAL::elements 12
-DEAL::block sizes 4 4 4
-DEAL::Block start 0 4 8
+DEAL::sizes: 3:[4 4 4]->12
+DEAL::start: 0 4 8
DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:1:3 8:2:0 9:2:1 10:2:2 11:2:3
DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:1:3 8:2:0 9:2:1 10:2:2 11:2:3
-DEAL::blocks 4
-DEAL::elements 10
-DEAL::block sizes 4 3 2 1
-DEAL::Block start 0 4 7 9
+DEAL::push: 4:[4 4 4 2]->14
+DEAL::push: 5:[4 4 4 2 5]->19
+DEAL::sizes: 6:[4 4 4 2 5 4]->23
+DEAL::start: 0 4 8 12 14 19
+DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:1:3 8:2:0 9:2:1 10:2:2 11:2:3 12:3:0 13:3:1 14:4:0 15:4:1 16:4:2 17:4:3 18:4:4 19:5:0 20:5:1 21:5:2 22:5:3
+DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:1:3 8:2:0 9:2:1 10:2:2 11:2:3 12:3:0 13:3:1 14:4:0 15:4:1 16:4:2 17:4:3 18:4:4 19:5:0 20:5:1 21:5:2 22:5:3
+DEAL::sizes: 4:[4 3 2 1]->10
+DEAL::start: 0 4 7 9
DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:2:0 8:2:1 9:3:0
DEAL:: 0:0:0 1:0:1 2:0:2 3:0:3 4:1:0 5:1:1 6:1:2 7:2:0 8:2:1 9:3:0