]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate TrilinosWrappers constructors instead of the whole class to silence warnings.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 4 May 2015 14:33:44 +0000 (09:33 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 5 May 2015 19:17:29 +0000 (14:17 -0500)
examples/step-36/step-36.cc
examples/step-41/step-41.cc
include/deal.II/lac/trilinos_block_vector.h
include/deal.II/lac/trilinos_vector.h

index 438ae79a62d732370545d0fe15059c1e4f2171ec..8456556e0868401fcc46b61d69bbcc6b6d74e36a 100644 (file)
@@ -205,11 +205,11 @@ namespace Step36
     // an IndexSet where every valid index is part of the set. Note that this
     // program can only be run sequentially and will throw an exception if used
     // in parallel.
-    IndexSet eigenfunction_partitioning = complete_index_set(dof_handler.n_dofs ());
+    IndexSet eigenfunction_index_set = dof_handler.locally_owned_dofs ();
     eigenfunctions
     .resize (parameters.get_integer ("Number of eigenvalues/eigenfunctions"));
     for (unsigned int i=0; i<eigenfunctions.size (); ++i)
-      eigenfunctions[i].reinit (eigenfunction_partitioning, MPI_COMM_WORLD);
+      eigenfunctions[i].reinit (eigenfunction_index_set, MPI_COMM_WORLD);
 
     eigenvalues.resize (eigenfunctions.size ());
   }
index 14ba2f7cff92501cec92e1ad2a23d9acea7243a5..842d38f2ca8cb3a701153db1f5a1c37653150bcf 100644 (file)
@@ -255,11 +255,11 @@ namespace Step41
     system_matrix.reinit (dsp);
     complete_system_matrix.reinit (dsp);
 
-    IndexSet solution_partitioning = complete_index_set(dof_handler.n_dofs());
-    solution.reinit (solution_partitioning, MPI_COMM_WORLD);
-    system_rhs.reinit (solution_partitioning, MPI_COMM_WORLD);
-    complete_system_rhs.reinit (solution_partitioning, MPI_COMM_WORLD);
-    contact_force.reinit (solution_partitioning, MPI_COMM_WORLD);
+    IndexSet solution_index_set = dof_handler.locally_owned_dofs();
+    solution.reinit (solution_index_set, MPI_COMM_WORLD);
+    system_rhs.reinit (solution_index_set, MPI_COMM_WORLD);
+    complete_system_rhs.reinit (solution_index_set, MPI_COMM_WORLD);
+    contact_force.reinit (solution_index_set, MPI_COMM_WORLD);
 
     // The only other thing to do here is to compute the factors in the $B$
     // matrix which is used to scale the residual. As discussed in the
@@ -269,7 +269,7 @@ namespace Step41
     TrilinosWrappers::SparseMatrix mass_matrix;
     mass_matrix.reinit (dsp);
     assemble_mass_matrix_diagonal (mass_matrix);
-    diagonal_of_mass_matrix.reinit (solution_partitioning);
+    diagonal_of_mass_matrix.reinit (solution_index_set);
     for (unsigned int j=0; j<solution.size (); j++)
       diagonal_of_mass_matrix (j) = mass_matrix.diag_element (j);
   }
index 0d388d7c25338d1b1710b85878c66e38143a756b..dcda81f948e50883e4311b11f53d9641ee228727 100644 (file)
@@ -101,7 +101,7 @@ namespace TrilinosWrappers
      * entries in Input_Maps.  For this non-distributed vector, the %parallel
      * partitioning is not used, just the global size of the partitioner.
      */
-    explicit BlockVector (const std::vector<Epetra_Map> &partitioner);
+    explicit BlockVector (const std::vector<Epetra_Map> &partitioner DEAL_II_DEPRECATED);
 
     /**
      * Constructor. Generate a block vector with as many blocks as there are
@@ -109,26 +109,26 @@ namespace TrilinosWrappers
      * partitioning is not used, just the global size of the partitioner.
      */
     explicit BlockVector (const std::vector<IndexSet> &partitioner,
-                          const MPI_Comm              &communicator = MPI_COMM_WORLD);
+                          const MPI_Comm              &communicator = MPI_COMM_WORLD) DEAL_II_DEPRECATED;
 
     /**
      * Copy-Constructor. Set all the properties of the non-%parallel vector to
      * those of the given %parallel vector and import the elements.
      */
-    BlockVector (const MPI::BlockVector &V);
+    BlockVector (const MPI::BlockVector &V) DEAL_II_DEPRECATED;
 
     /**
      * Copy-Constructor. Set all the properties of the vector to those of the
      * given input vector and copy the elements.
      */
-    BlockVector (const BlockVector  &V);
+    BlockVector (const BlockVector  &V) DEAL_II_DEPRECATED;
 
     /**
      * Creates a block vector consisting of <tt>num_blocks</tt> components,
      * but there is no content in the individual components and the user has
      * to fill appropriate data using a reinit of the blocks.
      */
-    explicit BlockVector (const size_type num_blocks);
+    explicit BlockVector (const size_type num_blocks) DEAL_II_DEPRECATED;
 
     /**
      * Constructor. Set the number of blocks to <tt>n.size()</tt> and
@@ -136,7 +136,7 @@ namespace TrilinosWrappers
      *
      * References BlockVector.reinit().
      */
-    explicit BlockVector (const std::vector<size_type> &N);
+    explicit BlockVector (const std::vector<size_type> &N) DEAL_II_DEPRECATED;
 
     /**
      * Constructor. Set the number of blocks to <tt>n.size()</tt>. Initialize
@@ -149,7 +149,7 @@ namespace TrilinosWrappers
     template <typename InputIterator>
     BlockVector (const std::vector<size_type> &n,
                  const InputIterator           first,
-                 const InputIterator           end);
+                 const InputIterator           end) DEAL_II_DEPRECATED;
 
     /**
      * Destructor. Clears memory
@@ -303,7 +303,7 @@ namespace TrilinosWrappers
                     << "local_size = global_size is a necessary condition, but"
                     << arg1 << " != " << arg2 << " was given!");
 
-  } DEAL_II_DEPRECATED;
+  };
 
 
 
index 447065b813a97ce1240435c2b98425d5d96b05d7..c02d502127b97ac36d9086a5da7639090d836343 100644 (file)
@@ -741,12 +741,12 @@ namespace TrilinosWrappers
      * function <tt>reinit()</tt> will have to give the vector the correct
      * size.
      */
-    Vector ();
+    Vector () DEAL_II_DEPRECATED;
 
     /**
      * This constructor takes as input the number of elements in the vector.
      */
-    explicit Vector (const size_type n);
+    explicit Vector (const size_type n) DEAL_II_DEPRECATED;
 
     /**
      * This constructor takes as input the number of elements in the vector.
@@ -757,7 +757,7 @@ namespace TrilinosWrappers
      * ignored, the only thing that matters is the size of the index space
      * described by this argument.
      */
-    explicit Vector (const Epetra_Map &partitioning);
+    explicit Vector (Const Epetra_Map &partitioning) DEAL_II_DEPRECATED;
 
     /**
      * This constructor takes as input the number of elements in the vector.
@@ -769,20 +769,20 @@ namespace TrilinosWrappers
      * size of the index space described by this argument.
      */
     explicit Vector (const IndexSet &partitioning,
-                     const MPI_Comm &communicator = MPI_COMM_WORLD);
+                     const MPI_Comm &communicator = MPI_COMM_WORLD) DEAL_II_DEPRECATED;
 
     /**
      * This constructor takes a (possibly parallel) Trilinos Vector and
      * generates a localized version of the whole content on each processor.
      */
-    explicit Vector (const VectorBase &V);
+    explicit Vector (const VectorBase &V) DEAL_II_DEPRECATED;
 
     /**
      * Copy-constructor from deal.II vectors. Sets the dimension to that of
      * the given vector, and copies all elements.
      */
     template <typename Number>
-    explicit Vector (const dealii::Vector<Number> &v);
+    explicit Vector (const dealii::Vector<Number> &v) DEAL_II_DEPRECATED;
 
     /**
      * Reinit function that resizes the vector to the size specified by
@@ -870,7 +870,7 @@ namespace TrilinosWrappers
      * thus an empty function.
      */
     void update_ghost_values () const;
-  } DEAL_II_DEPRECATED;
+  };
 
 
 

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.