From 745d278e8bac24680589f11ce8409bb52f72add1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 7 Aug 2009 16:51:30 +0000 Subject: [PATCH] Use unique_ptr instead of auto_ptr to make clear the intent that this is not copyable. git-svn-id: https://svn.dealii.org/trunk@19198 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/constraint_matrix.h | 4 +++- deal.II/lac/source/constraint_matrix.cc | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/deal.II/lac/include/lac/constraint_matrix.h b/deal.II/lac/include/lac/constraint_matrix.h index 8cb639138c..975016e092 100644 --- a/deal.II/lac/include/lac/constraint_matrix.h +++ b/deal.II/lac/include/lac/constraint_matrix.h @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -1529,11 +1530,12 @@ class ConstraintMatrix : public Subscriptor internal::bool2type) const; #ifdef DEAL_II_USE_TRILINOS +//TODO: Make use of the following member thread safe /** * This vector is used to import data * within the distribute function. */ - mutable std::auto_ptr vec_distribute; + mutable std_cxx1x::unique_ptr vec_distribute; #endif }; diff --git a/deal.II/lac/source/constraint_matrix.cc b/deal.II/lac/source/constraint_matrix.cc index 87d00d487c..0acdfcb5cd 100644 --- a/deal.II/lac/source/constraint_matrix.cc +++ b/deal.II/lac/source/constraint_matrix.cc @@ -1916,9 +1916,10 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const my_indices.resize(index2); - Epetra_Map map_exchange = Epetra_Map(-1,index2,(int*)&my_indices[0],0,vec.trilinos_vector().Comm()); - vec_distribute = std::auto_ptr - (new TrilinosWrappers::MPI::Vector(map_exchange)); + Epetra_Map map_exchange + = Epetra_Map(-1,index2,(int*)&my_indices[0],0, + vec.trilinos_vector().Comm()); + vec_distribute.reset (new TrilinosWrappers::MPI::Vector(map_exchange)); } // here we import the data vec_distribute->reinit(vec,false,true); -- 2.39.5