From: kronbichler Date: Sat, 27 Sep 2008 11:07:24 +0000 (+0000) Subject: Fixed an error that was caused by a different constructor in the new Trilinos 9.0... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a4cace8936c03b5aa69e81aba47f8f24ca20d9e;p=dealii-svn.git Fixed an error that was caused by a different constructor in the new Trilinos 9.0.0 version. git-svn-id: https://svn.dealii.org/trunk@17017 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/trilinos_precondition.h b/deal.II/lac/include/lac/trilinos_precondition.h index dafff8725b..ac8def9bca 100755 --- a/deal.II/lac/include/lac/trilinos_precondition.h +++ b/deal.II/lac/include/lac/trilinos_precondition.h @@ -80,12 +80,13 @@ namespace TrilinosWrappers */ DeclException1 (ExcNonMatchingMaps, std::string, - << "The sparse matrix that the preconditioner is based " - << "on a map that is not compatible to the one in vector " + << "The sparse matrix the preconditioner is based on " + << "uses a map that is not compatible to the one in vector " << arg1 << ". Check preconditioner and matrix setup."); friend class SolverBase; + friend class SolverSaddlePoint; protected: /** diff --git a/deal.II/lac/include/lac/trilinos_precondition_amg.h b/deal.II/lac/include/lac/trilinos_precondition_amg.h index 936d80da30..c361615ba1 100755 --- a/deal.II/lac/include/lac/trilinos_precondition_amg.h +++ b/deal.II/lac/include/lac/trilinos_precondition_amg.h @@ -178,8 +178,8 @@ namespace TrilinosWrappers */ DeclException1 (ExcNonMatchingMaps, std::string, - << "The sparse matrix that the preconditioner is based " - << "on a map that is not compatible to the one in vector" + << "The sparse matrix the preconditioner is based on " + << "uses a map that is not compatible to the one in vector" << arg1 << ". Check preconditioner and matrix setup."); @@ -218,6 +218,7 @@ namespace TrilinosWrappers boost::shared_ptr Matrix; friend class SolverBase; + friend class SolverSaddlePoint; }; } diff --git a/deal.II/lac/source/trilinos_sparse_matrix.cc b/deal.II/lac/source/trilinos_sparse_matrix.cc index d77c84b2fb..0f8a43f187 100755 --- a/deal.II/lac/source/trilinos_sparse_matrix.cc +++ b/deal.II/lac/source/trilinos_sparse_matrix.cc @@ -87,7 +87,7 @@ namespace TrilinosWrappers last_action (Zero), compressed (true), matrix (std::auto_ptr - (new Epetra_FECrsMatrix(Copy, row_map, 0))) + (new Epetra_FECrsMatrix(View, row_map, 0))) {} SparseMatrix::SparseMatrix (const Epetra_Map &InputMap, @@ -394,7 +394,8 @@ namespace TrilinosWrappers col_map = row_map; matrix = std::auto_ptr - (new Epetra_FECrsMatrix(Copy, row_map, 0)); + (new Epetra_FECrsMatrix(View, row_map, 0)); + compressed = true; } diff --git a/deal.II/lac/source/trilinos_vector.cc b/deal.II/lac/source/trilinos_vector.cc index c6ef3310cf..3501c88181 100755 --- a/deal.II/lac/source/trilinos_vector.cc +++ b/deal.II/lac/source/trilinos_vector.cc @@ -38,7 +38,7 @@ namespace TrilinosWrappers #endif { last_action = Zero; - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } @@ -48,7 +48,7 @@ namespace TrilinosWrappers map (InputMap) { last_action = Zero; - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } @@ -80,7 +80,7 @@ namespace TrilinosWrappers vector = std::auto_ptr (new Epetra_FEVector(*v.vector)); else { - vector = std::auto_ptr (new Epetra_FEVector(map, false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); reinit (v, false, true); } @@ -96,7 +96,7 @@ namespace TrilinosWrappers map = input_map; (void)fast; - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); last_action = Zero; } @@ -120,7 +120,7 @@ namespace TrilinosWrappers if (map.SameAs(v.vector->Map()) == false) map = Epetra_Map(v.vector->GlobalLength(),0,v.vector->Comm()); - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); last_action = Zero; } @@ -195,7 +195,7 @@ namespace TrilinosWrappers Assert (size() == v.size(), ExcDimensionMismatch(size(), v.size())); - vector = std::auto_ptr (new Epetra_FEVector(map, false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); const int min_my_id = map.MinMyGID(); const unsigned int size = map.NumMyElements(); @@ -229,8 +229,7 @@ namespace TrilinosWrappers #endif { last_action = Zero; - vector = std::auto_ptr - (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } @@ -253,8 +252,7 @@ namespace TrilinosWrappers map (InputMap.NumGlobalElements(), 0, InputMap.Comm()) { last_action = Zero; - vector = std::auto_ptr - (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } @@ -264,7 +262,7 @@ namespace TrilinosWrappers map (v.vector->Map().NumGlobalElements(), 0, v.vector->Comm()) { last_action = Zero; - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); if (vector->Map().SameAs(v.vector->Map()) == true) *vector = *v.vector; @@ -291,7 +289,7 @@ namespace TrilinosWrappers last_action = Zero; - vector = std::auto_ptr (new Epetra_FEVector (map,false)); + vector = std::auto_ptr (new Epetra_FEVector (map)); } @@ -311,7 +309,7 @@ namespace TrilinosWrappers last_action = Zero; (void)fast; - vector = std::auto_ptr (new Epetra_FEVector (map, false)); + vector = std::auto_ptr (new Epetra_FEVector (map)); } @@ -334,7 +332,7 @@ namespace TrilinosWrappers if (map.SameAs(v.vector->Map()) == false) map = Epetra_LocalMap (v.vector->GlobalLength(),0,v.vector->Comm()); - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); last_action = Zero; } @@ -373,7 +371,7 @@ namespace TrilinosWrappers { map = Epetra_LocalMap (v.vector->Map().NumGlobalElements(), 0, v.vector->Comm()); - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } reinit (v, false, true); @@ -389,7 +387,7 @@ namespace TrilinosWrappers { map = Epetra_LocalMap (v.vector->Map().NumGlobalElements(), 0, v.vector->Comm()); - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } *vector = *v.vector; @@ -406,7 +404,7 @@ namespace TrilinosWrappers if (size() != v.size()) { map = LocalMap (v.size(), 0, vector->Comm()); - vector = std::auto_ptr (new Epetra_FEVector(map,false)); + vector = std::auto_ptr (new Epetra_FEVector(map)); } std::vector indices (v.size());