From: kronbichler Date: Tue, 4 Nov 2008 16:16:32 +0000 (+0000) Subject: Changed some more things to make the class more consistent with the deal.II block... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e81e40127855a2d0714b47c3dd8170befd23cdb;p=dealii-svn.git Changed some more things to make the class more consistent with the deal.II block matrix class. git-svn-id: https://svn.dealii.org/trunk@17471 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/trilinos_block_sparse_matrix.cc b/deal.II/lac/source/trilinos_block_sparse_matrix.cc index ecb2efeac3..2faa07ecd7 100644 --- a/deal.II/lac/source/trilinos_block_sparse_matrix.cc +++ b/deal.II/lac/source/trilinos_block_sparse_matrix.cc @@ -37,7 +37,6 @@ namespace TrilinosWrappers this->sub_objects[r][c] = 0; delete p; } - } @@ -122,19 +121,23 @@ namespace TrilinosWrappers ExcDimensionMismatch (n_block_rows, block_sparsity_pattern.n_block_cols())); - // Call the other basic reinit function... - reinit (n_block_rows, n_block_rows); + + // Call the other basic reinit function, ... + reinit (block_sparsity_pattern.n_block_rows(), + block_sparsity_pattern.n_block_cols()); + + // ... set the correct sizes, ... + this->row_block_indices = block_sparsity_pattern.get_row_indices(); + this->column_block_indices = block_sparsity_pattern.get_column_indices(); // ... and then assign the correct // data to the blocks. for (unsigned int r=0; rn_block_rows(); ++r) for (unsigned int c=0; cn_block_cols(); ++c) { - this->block(r,c).reinit(input_maps[r],input_maps[c], - block_sparsity_pattern.block(r,c)); + this->sub_objects[r][c]->reinit (input_maps[r], input_maps[c], + block_sparsity_pattern.block(r,c)); } - - collect_sizes(); } @@ -195,9 +198,9 @@ namespace TrilinosWrappers for (unsigned int r=0; rn_block_rows(); ++r) for (unsigned int c=0; cn_block_cols(); ++c) { - this->block(r,c).reinit(input_maps[r],input_maps[c], - dealii_block_sparse_matrix.block(r,c), - drop_tolerance); + this->sub_objects[r][c]->reinit(input_maps[r],input_maps[c], + dealii_block_sparse_matrix.block(r,c), + drop_tolerance); } collect_sizes();