]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use unique_ptr instead of auto_ptr to make clear the intent that this is not copyable.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 7 Aug 2009 16:51:30 +0000 (16:51 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 7 Aug 2009 16:51:30 +0000 (16:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@19198 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/constraint_matrix.h
deal.II/lac/source/constraint_matrix.cc

index 8cb639138c7348f2b58580d67d67b92dcc1056d8..975016e0927eaba411b55aa767d4abebe55bab73 100644 (file)
@@ -19,6 +19,7 @@
 #include <base/subscriptor.h>
 #include <base/table.h>
 #include <base/template_constraints.h>
+#include <base/std_cxx1x/shared_ptr.h>
 
 #include <lac/trilinos_vector.h>
 
@@ -1529,11 +1530,12 @@ class ConstraintMatrix : public Subscriptor
                                 internal::bool2type<true>) 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<TrilinosWrappers::MPI::Vector> vec_distribute;
+    mutable std_cxx1x::unique_ptr<TrilinosWrappers::MPI::Vector> vec_distribute;
 #endif
 };
 
index 87d00d487cae7d94bbdf69f36b3d6b678e752509..0acdfcb5cd69b576a27c9bbb34532c8fc7aaa3f4 100644 (file)
@@ -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<TrilinosWrappers::MPI::Vector> 
-       (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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.