From: wolf Date: Mon, 21 Oct 2002 14:32:44 +0000 (+0000) Subject: Use Table of vector of vectors where possible. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b785e54c17f06374605a7c77eafd58f4c88e962c;p=dealii-svn.git Use Table of vector of vectors where possible. git-svn-id: https://svn.dealii.org/trunk@6695 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_sparse_matrix.h b/deal.II/lac/include/lac/block_sparse_matrix.h index c76366bcad..7c631f9036 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.h @@ -15,6 +15,7 @@ #include +#include #include #include #include @@ -546,7 +547,7 @@ class BlockSparseMatrix : public Subscriptor /** * Array of sub-matrices. */ - std::vector > > > sub_objects; + Table<2,SmartPointer > > sub_objects; }; diff --git a/deal.II/lac/include/lac/block_sparse_matrix.templates.h b/deal.II/lac/include/lac/block_sparse_matrix.templates.h index 403ef71ea9..306110ffca 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.templates.h @@ -107,8 +107,7 @@ reinit (const BlockSparsityPattern &sparsity) sparsity_pattern = &sparsity; rows = sparsity.n_block_rows(); columns = sparsity.n_block_cols(); - sub_objects = std::vector > > > - (rows, std::vector > > (columns, 0)); + sub_objects.reinit (rows, columns); // and reinitialize the blocks for (unsigned int r=0; r #include +#include #include #include #include @@ -357,7 +358,7 @@ class BlockSparsityPatternBase : public Subscriptor /** * Array of sparsity patterns. */ - std::vector > > sub_objects; + Table<2,SmartPointer > sub_objects; /** * Object storing and managing diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index 3522c6bd31..83cf5e01af 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -487,8 +487,7 @@ SparseBlockVanka::compute_dof_masks (const SparseMatrix &M, // Lagrange dofs of each // block access the different // dofs - std::vector > - access_count (n_blocks, std::vector(M.m(), 0)); + Table<2,unsigned int> access_count (n_blocks, M.m()); // set-up the map that will // be used to store the diff --git a/deal.II/lac/source/block_sparsity_pattern.cc b/deal.II/lac/source/block_sparsity_pattern.cc index 3550bea921..404940c31b 100644 --- a/deal.II/lac/source/block_sparsity_pattern.cc +++ b/deal.II/lac/source/block_sparsity_pattern.cc @@ -79,7 +79,7 @@ BlockSparsityPatternBase::reinit (const unsigned int r, // set new sizes rows = r; columns = c; - sub_objects.resize (rows, std::vector > (columns)); + sub_objects.reinit (rows, columns); // allocate new objects for (unsigned int i=0; i