]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make Trilinos wrappers compatible with gcc 4.5
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 May 2010 13:34:33 +0000 (13:34 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 May 2010 13:34:33 +0000 (13:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@21128 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/lac/include/lac/trilinos_precondition.h
deal.II/lac/include/lac/trilinos_solver.h
deal.II/lac/include/lac/trilinos_sparse_matrix.h
deal.II/lac/include/lac/trilinos_sparsity_pattern.h
deal.II/lac/include/lac/trilinos_vector.h
deal.II/lac/include/lac/trilinos_vector_base.h
deal.II/lac/source/petsc_solver.cc
deal.II/lac/source/trilinos_precondition.cc
deal.II/lac/source/trilinos_sparse_matrix.cc
deal.II/lac/source/trilinos_sparsity_pattern.cc
deal.II/lac/source/trilinos_vector.cc
deal.II/lac/source/trilinos_vector_base.cc

index be551684dedbe5340c74a2478311d33b5af9c3af..430203128aba7fee7071e01f58338ac527b063bb 100644 (file)
@@ -158,7 +158,7 @@ namespace TrilinosWrappers
                                        * case the matrix needs to be
                                        * copied from deal.II format.
                                        */
-      std::auto_ptr<Epetra_Map>   vector_distributor;
+      std_cxx1x::shared_ptr<Epetra_Map>   vector_distributor;
   };
 
 
index 59bf20bb30c621b4d9e8698f0c3b9729949c0dbe..852b925f48a71c6a8b7b403c23e582aee6735e33 100644 (file)
@@ -219,7 +219,7 @@ namespace TrilinosWrappers
                                        * which is passed down to the
                                        * Trilinos solver.
                                        */
-      std::auto_ptr<Epetra_LinearProblem> linear_problem;
+      std_cxx1x::shared_ptr<Epetra_LinearProblem> linear_problem;
 
                                        /**
                                         * A structure that contains
@@ -637,14 +637,14 @@ namespace TrilinosWrappers
                                        * which is passed down to the
                                        * Trilinos solver.
                                        */
-      std::auto_ptr<Epetra_LinearProblem> linear_problem;
+      std_cxx1x::shared_ptr<Epetra_LinearProblem> linear_problem;
 
                                        /**
                                         * A structure that contains
                                         * the Trilinos solver and
                                         * preconditioner objects.
                                         */
-      std::auto_ptr<Amesos_BaseSolver> solver;
+      std_cxx1x::shared_ptr<Amesos_BaseSolver> solver;
 
                                        /**
                                         * Store a copy of the flags for this
index 2fabc8216eaa14bae2fe7e814ce5d16a3d195688..e60fff121cbd2a80c05c324d89e131325f04e112 100644 (file)
@@ -2225,7 +2225,7 @@ namespace TrilinosWrappers
                                        * assigns parts of the matrix
                                        * to the individual processes.
                                        */
-      std::auto_ptr<Epetra_Map> column_space_map;
+      std_cxx1x::shared_ptr<Epetra_Map> column_space_map;
 
                                        /**
                                         * A sparse matrix object in
@@ -2237,7 +2237,7 @@ namespace TrilinosWrappers
                                         * a sparse matrix, is set in
                                         * the constructor.
                                         */
-      std::auto_ptr<Epetra_FECrsMatrix> matrix;
+      std_cxx1x::shared_ptr<Epetra_FECrsMatrix> matrix;
 
                                        /**
                                         * Trilinos doesn't allow to mix
index 7c26f2fadabe4dec76a7604270b4ace982e176b4..627b175abb7f425beee5eeb0b4a7fc2e74d4de61 100644 (file)
@@ -1343,7 +1343,7 @@ namespace TrilinosWrappers
                                        * assigns parts of the matrix
                                        * to the individual processes.
                                        */
-      std::auto_ptr<Epetra_Map> column_space_map;
+      std_cxx1x::shared_ptr<Epetra_Map> column_space_map;
 
                                       /**
                                        * A boolean variable to hold
@@ -1359,7 +1359,7 @@ namespace TrilinosWrappers
                                         * allows for adding non-local
                                         * elements to the pattern.
                                         */
-      std::auto_ptr<Epetra_FECrsGraph> graph;
+      std_cxx1x::shared_ptr<Epetra_FECrsGraph> graph;
 
       friend class SparsityPatternIterators::const_iterator;
       friend class SparsityPatternIterators::const_iterator::Accessor;
index ae24942466b7f42cd7560f7f80df667073131105..be23cbea55165ba866f0a95be534c59905e2e5cf 100644 (file)
@@ -504,7 +504,7 @@ namespace TrilinosWrappers
                         const dealii::Vector<number> &v)
     {
       if (&*vector != 0 && vector->Map().SameAs(parallel_partitioner))
-       vector = std::auto_ptr<Epetra_FEVector>
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector>
          (new Epetra_FEVector(parallel_partitioner));
 
       const int size = parallel_partitioner.NumMyElements();
@@ -533,7 +533,7 @@ namespace TrilinosWrappers
     {
       if (size() != v.size())
        {
-         vector = std::auto_ptr<Epetra_FEVector>
+         vector = std_cxx1x::shared_ptr<Epetra_FEVector>
          (new Epetra_FEVector(Epetra_Map (v.size(), 0,
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
                                           Epetra_MpiComm(MPI_COMM_SELF)
@@ -753,7 +753,7 @@ namespace TrilinosWrappers
   Vector::Vector (const dealii::Vector<number> &v)
   {
     Epetra_LocalMap map ((int)v.size(), 0, Utilities::Trilinos::comm_self());
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
     *this = v;
   }
 
@@ -776,11 +776,11 @@ namespace TrilinosWrappers
   {
     if (size() != v.size())
       {
-       vector.release();
+       vector.reset();
 
        Epetra_LocalMap map ((int)v.size(), 0,
                             Utilities::Trilinos::comm_self());
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
       }
 
     const Epetra_Map & map = vector_partitioner();
index 938cf3650745f23e39144e66724cc00eb93cfd55..8302aee9552a6006987e3d97ae2b4c2bac45c98a 100644 (file)
@@ -960,7 +960,7 @@ namespace TrilinosWrappers
                                         * type. Requires an existing
                                         * Epetra_Map for storing data.
                                         */
-      std::auto_ptr<Epetra_FEVector> vector;
+      std_cxx1x::shared_ptr<Epetra_FEVector> vector;
 
 
                                        /**
@@ -1112,7 +1112,7 @@ namespace TrilinosWrappers
            ExcMessage("Vector has not been constructed properly."));
 
     if (fast == false || local_range() != v.local_range())
-      vector = std::auto_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
+      vector = std_cxx1x::shared_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
   }
 
 
index cb4aa99173abdda987d66f2380e31462505190f0..85f5a809424f4591693596bdbadb4140e6b3902b 100644 (file)
@@ -133,7 +133,7 @@ namespace PETScWrappers
 
                                      // first create a solver object if this
                                      // is necessary
-    if (solver_data == 0)
+    if (&*solver_data == 0)
       {
         solver_data.reset (new SolverData());
 
index 0cade2dda57463541f3cdfb17b240dae0accdca6..e1f2b06155f735ee5f5671b53ba754f86a04090e 100644 (file)
@@ -656,7 +656,7 @@ namespace TrilinosWrappers
                                        // elements.
     vector_distributor.reset (new Epetra_Map(n_rows, 0, communicator));
 
-    if (Matrix==0)
+    if (&*Matrix==0)
       Matrix = std_cxx1x::shared_ptr<SparseMatrix> (new SparseMatrix());
 
     Matrix->reinit (*vector_distributor, *vector_distributor,
@@ -680,7 +680,7 @@ namespace TrilinosWrappers
 
                                // todo: find a way to read out ML's data
                                // sizes
-    if (Matrix != 0)
+    if (&*Matrix != 0)
       memory += Matrix->memory_consumption();
     return memory;
   }
index 6b484e328d325c7965372ea50ce74dc03e351457..3b6654ab9afa123ec2b889f9bb85fcd8b177abb9 100644 (file)
@@ -100,10 +100,10 @@ namespace TrilinosWrappers
                                  // interface.
   SparseMatrix::SparseMatrix ()
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (0, 0,
                                                     Utilities::Trilinos::comm_self()))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(View, *column_space_map,
                                                  *column_space_map, 0))),
                  last_action (Zero),
@@ -117,9 +117,9 @@ namespace TrilinosWrappers
   SparseMatrix::SparseMatrix (const Epetra_Map  &input_map,
                              const unsigned int n_max_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (input_map))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                                (new Epetra_FECrsMatrix(Copy, *column_space_map,
                                                        int(n_max_entries_per_row), false))),
                  last_action (Zero),
@@ -131,9 +131,9 @@ namespace TrilinosWrappers
   SparseMatrix::SparseMatrix (const Epetra_Map                &input_map,
                              const std::vector<unsigned int> &n_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (input_map))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                                (new Epetra_FECrsMatrix(Copy, *column_space_map,
                      (int*)const_cast<unsigned int*>(&(n_entries_per_row[0])),
                                                        false))),
@@ -147,9 +147,9 @@ namespace TrilinosWrappers
                              const Epetra_Map  &input_col_map,
                              const unsigned int n_max_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (input_col_map))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                                (new Epetra_FECrsMatrix(Copy, input_row_map,
                                                        int(n_max_entries_per_row), false))),
                  last_action (Zero),
@@ -162,9 +162,9 @@ namespace TrilinosWrappers
                              const Epetra_Map                &input_col_map,
                              const std::vector<unsigned int> &n_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (input_col_map))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                                (new Epetra_FECrsMatrix(Copy, input_row_map,
                      (int*)const_cast<unsigned int*>(&(n_entries_per_row[0])),
                                                        false))),
@@ -178,7 +178,7 @@ namespace TrilinosWrappers
                              const unsigned int n,
                              const unsigned int n_max_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (n, 0,
                                                     Utilities::Trilinos::comm_self()))),
 
@@ -190,7 +190,7 @@ namespace TrilinosWrappers
                                   // can't do so in parallel, where the
                                   // information from columns is only
                                   // available when entries have been added
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  Epetra_Map (m, 0,
                                                              Utilities::Trilinos::comm_self()),
@@ -207,10 +207,10 @@ namespace TrilinosWrappers
                              const unsigned int               n,
                              const std::vector<unsigned int> &n_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (n, 0,
                                                     Utilities::Trilinos::comm_self()))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  Epetra_Map (m, 0,
                                                              Utilities::Trilinos::comm_self()),
@@ -227,10 +227,10 @@ namespace TrilinosWrappers
                              const MPI_Comm     &communicator,
                              const unsigned int n_max_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map(parallel_partitioning.
                                                    make_trilinos_map(communicator, false)))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  *column_space_map,
                                                  n_max_entries_per_row,
@@ -245,10 +245,10 @@ namespace TrilinosWrappers
                              const MPI_Comm     &communicator,
                              const std::vector<unsigned int> &n_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map(parallel_partitioning.
                                                    make_trilinos_map(communicator, false)))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  *column_space_map,
                           (int*)const_cast<unsigned int*>(&(n_entries_per_row[0])),
@@ -264,10 +264,10 @@ namespace TrilinosWrappers
                              const MPI_Comm     &communicator,
                              const unsigned int n_max_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map(col_parallel_partitioning.
                                                    make_trilinos_map(communicator, false)))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  row_parallel_partitioning.
                                                  make_trilinos_map(communicator, false),
@@ -284,10 +284,10 @@ namespace TrilinosWrappers
                              const MPI_Comm     &communicator,
                              const std::vector<unsigned int> &n_entries_per_row)
                  :
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map(col_parallel_partitioning.
                                                    make_trilinos_map(communicator, false)))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  row_parallel_partitioning.
                                                  make_trilinos_map(communicator, false),
@@ -301,9 +301,9 @@ namespace TrilinosWrappers
 
   SparseMatrix::SparseMatrix (const SparsityPattern &sparsity_pattern)
                  :
-                 column_space_map (std::auto_ptr<Epetra_Map>
+                 column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (sparsity_pattern.domain_partitioner()))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(Copy,
                                                  sparsity_pattern.trilinos_sparsity_pattern(),
                                                  false))),
@@ -320,9 +320,9 @@ namespace TrilinosWrappers
   SparseMatrix::SparseMatrix (const SparseMatrix &input_matrix)
                  :
                   Subscriptor(),
-                 column_space_map (std::auto_ptr<Epetra_Map>
+                 column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map (input_matrix.domain_partitioner()))),
-                 matrix (std::auto_ptr<Epetra_FECrsMatrix>
+                 matrix (std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                          (new Epetra_FECrsMatrix(*input_matrix.matrix))),
                  last_action (Zero),
                  compressed (true)
@@ -347,9 +347,9 @@ namespace TrilinosWrappers
       *matrix = *m.matrix;
     else
       {
-       column_space_map = std::auto_ptr<Epetra_Map>
+       column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
          (new Epetra_Map (m.domain_partitioner()));
-       matrix = std::auto_ptr<Epetra_FECrsMatrix>
+       matrix = std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
          (new Epetra_FECrsMatrix(*m.matrix));
       }
 
@@ -407,7 +407,7 @@ namespace TrilinosWrappers
                                      sparsity_pattern.n_cols()));
       }
 
-    column_space_map = std::auto_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
 
     std::vector<int> n_entries_per_row(n_rows);
 
@@ -437,13 +437,13 @@ namespace TrilinosWrappers
                                   // processor, we can directly assign the
                                   // columns as well. Compare this with bug
                                   // # 4123 in the Sandia Bugzilla.
-    std::auto_ptr<Epetra_CrsGraph> graph;
+    std_cxx1x::shared_ptr<Epetra_CrsGraph> graph;
     if (input_row_map.Comm().NumProc() > 1)
-      graph = std::auto_ptr<Epetra_CrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_CrsGraph>
        (new Epetra_CrsGraph (Copy, input_row_map,
                              &n_entries_per_row[input_row_map.MinMyGID()], true));
     else
-      graph = std::auto_ptr<Epetra_CrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_CrsGraph>
        (new Epetra_CrsGraph (Copy, input_row_map, input_col_map,
                              &n_entries_per_row[input_row_map.MinMyGID()], true));
 
@@ -488,7 +488,7 @@ namespace TrilinosWrappers
                                  sparsity_pattern.n_cols()));
 
                                  // And now finally generate the matrix.
-    matrix =  std::auto_ptr<Epetra_FECrsMatrix>
+    matrix =  std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                        (new Epetra_FECrsMatrix(Copy, *graph, false));
 
     last_action = Zero;
@@ -523,9 +523,9 @@ namespace TrilinosWrappers
                                   // sparsity pattern.
     matrix.reset();
 
-    column_space_map = std::auto_ptr<Epetra_Map>
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
       (new Epetra_Map (sparsity_pattern.domain_partitioner()));
-    matrix = std::auto_ptr<Epetra_FECrsMatrix>
+    matrix = std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
       (new Epetra_FECrsMatrix(Copy, sparsity_pattern.trilinos_sparsity_pattern(),
                              false));
     compress();
@@ -538,10 +538,10 @@ namespace TrilinosWrappers
   {
     matrix.reset();
 
-    column_space_map = std::auto_ptr<Epetra_Map>
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
       (new Epetra_Map (sparse_matrix.domain_partitioner()));
 
-    matrix = std::auto_ptr<Epetra_FECrsMatrix>
+    matrix = std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
       (new Epetra_FECrsMatrix(Copy, sparse_matrix.trilinos_sparsity_pattern(),
                              false));
 
@@ -623,8 +623,8 @@ namespace TrilinosWrappers
       goto set_matrix_values;
 
     {
-      std::auto_ptr<SparsityPattern> trilinos_sparsity;
-      trilinos_sparsity = std::auto_ptr<SparsityPattern> (new SparsityPattern());
+      std_cxx1x::shared_ptr<SparsityPattern> trilinos_sparsity;
+      trilinos_sparsity = std_cxx1x::shared_ptr<SparsityPattern> (new SparsityPattern());
       trilinos_sparsity->reinit (input_row_map, input_col_map, sparsity_pattern);
       reinit (*trilinos_sparsity);
     }
@@ -699,12 +699,12 @@ namespace TrilinosWrappers
     Assert (input_matrix.Filled()==true,
            ExcMessage("Input CrsMatrix has not called FillComplete()!"));
 
-    column_space_map = std::auto_ptr<Epetra_Map>
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
       (new Epetra_Map (input_matrix.DomainMap()));
 
     const Epetra_CrsGraph *graph = &input_matrix.Graph();
 
-    matrix = std::auto_ptr<Epetra_FECrsMatrix>
+    matrix = std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
                       (new Epetra_FECrsMatrix(Copy, *graph, false));
 
     matrix->FillComplete (*column_space_map, input_matrix.RangeMap(), true);
@@ -732,9 +732,9 @@ namespace TrilinosWrappers
     matrix.reset();
     column_space_map.reset();
 
-    column_space_map = std::auto_ptr<Epetra_Map>
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
       (new Epetra_Map (0, 0, Utilities::Trilinos::comm_self()));
-    matrix = std::auto_ptr<Epetra_FECrsMatrix>
+    matrix = std_cxx1x::shared_ptr<Epetra_FECrsMatrix>
              (new Epetra_FECrsMatrix(View, *column_space_map, 0));
 
     matrix->FillComplete();
index 172d0859de35fa75e0b16f2a2a41b052b5701685..71bf649124afdc7b2ce6f451165b5c4d4f2011bd 100644 (file)
@@ -86,9 +86,9 @@ namespace TrilinosWrappers
                  :
                  compressed (true)
   {
-    column_space_map = std::auto_ptr<Epetra_Map>
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
       (new Epetra_Map (0, 0, Utilities::Trilinos::comm_self()));
-    graph = std::auto_ptr<Epetra_FECrsGraph>
+    graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
       (new Epetra_FECrsGraph(View, *column_space_map, *column_space_map, 0));
     graph->FillComplete();
   }
@@ -150,10 +150,10 @@ namespace TrilinosWrappers
   SparsityPattern::SparsityPattern (const SparsityPattern &input_sparsity)
                  :
                   Subscriptor(),
-                  column_space_map (std::auto_ptr<Epetra_Map>
+                  column_space_map (std_cxx1x::shared_ptr<Epetra_Map>
                                    (new Epetra_Map(0, 0, Utilities::Trilinos::comm_self()))),
                   compressed (false),
-                  graph (std::auto_ptr<Epetra_FECrsGraph>
+                  graph (std_cxx1x::shared_ptr<Epetra_FECrsGraph>
                         (new Epetra_FECrsGraph(View, *column_space_map,
                                                *column_space_map, 0)))
   {
@@ -193,7 +193,7 @@ namespace TrilinosWrappers
                           const Epetra_Map   &input_col_map,
                           const unsigned int  n_entries_per_row)
   {
-    column_space_map = std::auto_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
     graph.reset();
     compressed = false;
 
@@ -208,10 +208,10 @@ namespace TrilinosWrappers
                                   // processor, we can directly assign the
                                   // columns as well.
     if (input_row_map.Comm().NumProc() > 1)
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map, n_entries_per_row, false));
     else
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map, input_col_map,
                               n_entries_per_row, false));
   }
@@ -250,17 +250,17 @@ namespace TrilinosWrappers
            ExcDimensionMismatch (n_entries_per_row.size(),
                                  input_row_map.NumGlobalElements()));
 
-    column_space_map = std::auto_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
     graph.reset();
     compressed = false;
 
     if (input_row_map.Comm().NumProc() > 1)
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map,
                               n_entries_per_row[input_row_map.MinMyGID()],
                               false));
     else
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map, input_col_map,
                               n_entries_per_row[input_row_map.MinMyGID()],
                               false));
@@ -295,7 +295,7 @@ namespace TrilinosWrappers
            ExcDimensionMismatch (sp.n_cols(),
                                  input_col_map.NumGlobalElements()));
 
-    column_space_map = std::auto_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
+    column_space_map = std_cxx1x::shared_ptr<Epetra_Map> (new Epetra_Map (input_col_map));
     graph.reset();
     compressed = false;
 
@@ -311,12 +311,12 @@ namespace TrilinosWrappers
       n_entries_per_row[row-input_row_map.MinMyGID()] = sp.row_length(row);
 
     if (input_row_map.Comm().NumProc() > 1)
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map,
                               n_entries_per_row[0],
                               false));
     else
-      graph = std::auto_ptr<Epetra_FECrsGraph>
+      graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
        (new Epetra_FECrsGraph(Copy, input_row_map, input_col_map,
                               n_entries_per_row[0],
                               false));
@@ -399,9 +399,9 @@ namespace TrilinosWrappers
     column_space_map.reset();
     graph.reset();
 
-     column_space_map = std::auto_ptr<Epetra_Map>
+     column_space_map = std_cxx1x::shared_ptr<Epetra_Map>
        (new Epetra_Map (0, 0, Utilities::Trilinos::comm_self()));
-    graph = std::auto_ptr<Epetra_FECrsGraph>
+    graph = std_cxx1x::shared_ptr<Epetra_FECrsGraph>
       (new Epetra_FECrsGraph(View, *column_space_map, *column_space_map, 0));
     graph->FillComplete();
 
index ed08c205eaf585251b7bd4b47aebf0323552c5ce..e3db1a6edeb13bd6274f1fc9056fafccc504a1bb 100644 (file)
@@ -34,7 +34,7 @@ namespace TrilinosWrappers
     Vector::Vector ()
     {
       last_action = Zero;
-      vector = std::auto_ptr<Epetra_FEVector>
+      vector = std_cxx1x::shared_ptr<Epetra_FEVector>
        (new Epetra_FEVector(Epetra_Map(0,0,0,Utilities::Trilinos::comm_self())));
     }
 
@@ -60,7 +60,7 @@ namespace TrilinosWrappers
                     VectorBase()
     {
       last_action = Zero;
-      vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(*v.vector));
+      vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(*v.vector));
     }
 
 
@@ -77,10 +77,10 @@ namespace TrilinosWrappers
       last_action = Zero;
 
       if (input_map.SameAs(v.vector->Map()) == true)
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(*v.vector));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(*v.vector));
       else
        {
-         vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(input_map));
+         vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(input_map));
          reinit (v, false, true);
        }
     }
@@ -99,7 +99,7 @@ namespace TrilinosWrappers
 
       last_action = Zero;
 
-      vector = std::auto_ptr<Epetra_FEVector>
+      vector = std_cxx1x::shared_ptr<Epetra_FEVector>
        (new Epetra_FEVector(parallel_partitioner.make_trilinos_map(communicator,
                                                                    true)));
       reinit (v, false, true);
@@ -117,7 +117,7 @@ namespace TrilinosWrappers
                    const bool        fast)
     {
       if (!vector->Map().SameAs(input_map))
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(input_map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(input_map));
       else if (fast == false)
        {
          const int ierr = vector->PutScalar(0.);
@@ -159,7 +159,7 @@ namespace TrilinosWrappers
            {
              vector.reset();
 
-             vector = std::auto_ptr<Epetra_FEVector>
+             vector = std_cxx1x::shared_ptr<Epetra_FEVector>
                (new Epetra_FEVector(v.vector->Map()));
              last_action = Zero;
            }
@@ -245,7 +245,7 @@ namespace TrilinosWrappers
                          v.block(0).vector_partitioner().Comm());
 
       if (import_data == false)
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector (new_map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector (new_map));
 
       Teuchos::RCP<Epetra_FEVector> actual_vec = (import_data == true) ? 
        Teuchos::rcp (new Epetra_FEVector (new_map), true) : 
@@ -329,7 +329,7 @@ namespace TrilinosWrappers
       else
        {
          vector.reset();
-         vector = std::auto_ptr<Epetra_FEVector>
+         vector = std_cxx1x::shared_ptr<Epetra_FEVector>
                            (new Epetra_FEVector(*v.vector));
          last_action = Zero;
        }
@@ -370,7 +370,7 @@ namespace TrilinosWrappers
       if (vector->Map().SameAs(m.col_partitioner()) == false)
        {
          Epetra_Map map = m.col_partitioner();
-         vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+         vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
        }
 
       Epetra_Import data_exchange (vector->Map(), v.vector->Map());
@@ -390,7 +390,7 @@ namespace TrilinosWrappers
   {
     last_action = Zero;
     Epetra_LocalMap map (0, 0, Utilities::Trilinos::comm_self());
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
   }
 
 
@@ -399,7 +399,7 @@ namespace TrilinosWrappers
   {
     last_action = Zero;
     Epetra_LocalMap map ((int)n, 0, Utilities::Trilinos::comm_self());
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
   }
 
 
@@ -410,7 +410,7 @@ namespace TrilinosWrappers
     Epetra_LocalMap map (input_map.NumGlobalElements(),
                         input_map.IndexBase(),
                         input_map.Comm());
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
   }
 
 
@@ -427,7 +427,7 @@ namespace TrilinosWrappers
                          Epetra_SerialComm());
     (void)communicator;
 #endif
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
   }
 
 
@@ -438,7 +438,7 @@ namespace TrilinosWrappers
     Epetra_LocalMap map (v.vector->Map().NumGlobalElements(),
                         v.vector->Map().IndexBase(),
                         v.vector->Map().Comm());
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
 
     if (vector->Map().SameAs(v.vector->Map()) == true)
       {
@@ -462,7 +462,7 @@ namespace TrilinosWrappers
 
        Epetra_LocalMap map ((int)n, 0,
                             Utilities::Trilinos::comm_self());
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
       }
     else if (fast == false)
       {
@@ -489,7 +489,7 @@ namespace TrilinosWrappers
        Epetra_LocalMap map (input_map.NumGlobalElements(),
                             input_map.IndexBase(),
                             input_map.Comm());
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector (map));
       }
     else if (fast == false)
       {
@@ -523,7 +523,7 @@ namespace TrilinosWrappers
                              Epetra_SerialComm());
         (void)communicator;
 #endif
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
       }
     else if (fast == false)
       {
@@ -560,7 +560,7 @@ namespace TrilinosWrappers
            Epetra_LocalMap map (v.vector->GlobalLength(),
                                 v.vector->Map().IndexBase(),
                                 v.vector->Comm());
-           vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+           vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
          }
        else
          {
@@ -616,7 +616,7 @@ namespace TrilinosWrappers
        Epetra_LocalMap map (v.vector->Map().NumGlobalElements(),
                             v.vector->Map().IndexBase(),
                             v.vector->Comm());
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
       }
 
     reinit (v, false, true);
@@ -633,7 +633,7 @@ namespace TrilinosWrappers
        Epetra_LocalMap map (v.vector->Map().NumGlobalElements(),
                             v.vector->Map().IndexBase(),
                             v.vector->Comm());
-       vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
       }
 
     const int ierr = vector->Update(1.0, *v.vector, 0.0);
index 2cfee040e69794ca3ec83adb2549ec2b117783e3..0bb6e2591b293deb60ef75c036963adfa1bb239e 100644 (file)
@@ -57,11 +57,11 @@ namespace TrilinosWrappers
                         last_action (Zero),
                        compressed  (true),
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
-                       vector(std::auto_ptr<Epetra_FEVector>
+                       vector(std_cxx1x::shared_ptr<Epetra_FEVector>
                          (new Epetra_FEVector(
                                 Epetra_Map(0,0,Epetra_MpiComm(MPI_COMM_SELF)))))
 #else
-                       vector(std::auto_ptr<Epetra_FEVector>
+                       vector(std_cxx1x::shared_ptr<Epetra_FEVector>
                           (new Epetra_FEVector(
                                 Epetra_Map(0,0,Epetra_SerialComm()))))
 #endif
@@ -74,7 +74,7 @@ namespace TrilinosWrappers
                        Subscriptor(),
                        last_action (Zero),
                        compressed (true),
-                       vector(std::auto_ptr<Epetra_FEVector>
+                       vector(std_cxx1x::shared_ptr<Epetra_FEVector>
                               (new Epetra_FEVector(*v.vector)))
   {}
 
@@ -99,7 +99,7 @@ namespace TrilinosWrappers
     Epetra_Map map (0, 0, Epetra_SerialComm());
 #endif
 
-    vector = std::auto_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
+    vector = std_cxx1x::shared_ptr<Epetra_FEVector> (new Epetra_FEVector(map));
     last_action = Zero;
   }
 
@@ -115,7 +115,7 @@ namespace TrilinosWrappers
       {
        vector.reset();
        last_action = Zero;
-       vector = std::auto_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
+       vector = std_cxx1x::shared_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
       }
     else
       {

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.