From: kronbichler Date: Tue, 16 Sep 2008 17:53:10 +0000 (+0000) Subject: There was an error in the constructor for a parallel Epetra_FECrsMatrix that did... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8a4914e02d7d06cb04674845d2e5f170422abcb;p=dealii-svn.git There was an error in the constructor for a parallel Epetra_FECrsMatrix that did not allow us to write off-processor elements properly, which is now fixed. git-svn-id: https://svn.dealii.org/trunk@16840 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/trilinos_sparse_matrix.cc b/deal.II/lac/source/trilinos_sparse_matrix.cc index 3d0c4cb17e..7f2513239e 100755 --- a/deal.II/lac/source/trilinos_sparse_matrix.cc +++ b/deal.II/lac/source/trilinos_sparse_matrix.cc @@ -112,7 +112,7 @@ namespace TrilinosWrappers matrix (std::auto_ptr (new Epetra_FECrsMatrix(Copy, row_map, (int*)const_cast(&(n_entries_per_row[0])), - true))) + false))) {} SparseMatrix::SparseMatrix (const Epetra_Map &InputRowMap, @@ -139,7 +139,7 @@ namespace TrilinosWrappers matrix (std::auto_ptr (new Epetra_FECrsMatrix(Copy, row_map, col_map, (int*)const_cast(&(n_entries_per_row[0])), - true))) + false))) {} @@ -263,7 +263,7 @@ namespace TrilinosWrappers // correct values. matrix = std::auto_ptr (new Epetra_FECrsMatrix(Copy, row_map, - &n_entries_per_row[0], true)); + &n_entries_per_row[0], false)); reinit (sparsity_pattern); } @@ -334,7 +334,7 @@ namespace TrilinosWrappers // correct values. matrix = std::auto_ptr (new Epetra_FECrsMatrix(Copy, row_map, - &n_entries_per_row[0], true)); + &n_entries_per_row[0], false)); std::vector values; std::vector row_indices; diff --git a/deal.II/lac/source/trilinos_vector.cc b/deal.II/lac/source/trilinos_vector.cc index 29d2302c94..1eebe8e5a9 100755 --- a/deal.II/lac/source/trilinos_vector.cc +++ b/deal.II/lac/source/trilinos_vector.cc @@ -129,9 +129,8 @@ namespace TrilinosWrappers // create an object for the data // exchange and then insert all // the data. The first assertion - // is basically there to check - // whether the user knows what - // she is doing. + // is only a check whether the + // user knows what she is doing. else { Assert (fast == false, @@ -146,6 +145,8 @@ namespace TrilinosWrappers const int ierr = vector->Import(*v.vector, data_exchange, Insert); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); + + last_action = Insert; } } @@ -179,6 +180,8 @@ namespace TrilinosWrappers AssertThrow (ierr == 0, ExcTrilinosError(ierr)); + last_action = Insert; + return *this; } @@ -353,6 +356,8 @@ namespace TrilinosWrappers const int ierr = vector->Import(*v.vector, data_exchange, Insert); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); + + last_action = Insert; } } diff --git a/deal.II/lac/source/trilinos_vector_base.cc b/deal.II/lac/source/trilinos_vector_base.cc index dda97c4bca..6f2fd67d23 100644 --- a/deal.II/lac/source/trilinos_vector_base.cc +++ b/deal.II/lac/source/trilinos_vector_base.cc @@ -617,6 +617,8 @@ namespace TrilinosWrappers int ierr = vector->Import(*v.vector, data_exchange, Add); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); + + last_action = Insert; } }