]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use the 64 bits version of Trilinos 11.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Mar 2013 21:27:09 +0000 (21:27 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Mar 2013 21:27:09 +0000 (21:27 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29030 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/types.h
deal.II/include/deal.II/lac/trilinos_sparse_matrix.h
deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h
deal.II/source/lac/trilinos_sparse_matrix.cc
deal.II/source/lac/trilinos_sparsity_pattern.cc
deal.II/source/lac/trilinos_vector.cc

index 6f29d80955e4bd257ee54145e056c3ccb148dc0f..80c02453df9f4ba8b383f4a16c9fd635c604f4e0 100644 (file)
@@ -145,17 +145,16 @@ namespace TrilinosWrappers
 {
   namespace types
   {
-#define DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
-#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_USE_LARGE_INDEX_TYPE
     /**
      * Declare type of integer used in the Epetra package of Trilinos.
      */
-    typedef int int_type;
+    typedef long long int_type;
 #else
     /**
      * Declare type of integer used in the Epetra package of Trilinos.
      */
-    typedef long long int_type;
+    typedef int int_type;
 #endif
   }
 }
index 40b7aade7f41b9ba82fb0ba1cd66c8be6557b56b..c647fde6f64830412e9ada0979e638552fbcf9b8 100644 (file)
@@ -578,7 +578,7 @@ namespace TrilinosWrappers
      */
     SparseMatrix (const size_type  m,
                   const size_type  n,
-                  const size_type  n_max_entries_per_row);
+                  const unsigned int  n_max_entries_per_row);
 
     /**
      * Generate a matrix that is completely
@@ -590,9 +590,9 @@ namespace TrilinosWrappers
      * specifies the number of entries in
      * each row.
      */
-    SparseMatrix (const size_type               m,
-                  const size_type               n,
-                  const std::vector<size_type> &n_entries_per_row);
+    SparseMatrix (const size_type                  m,
+                  const size_type                  n,
+                  const std::vector<unsigned int> &n_entries_per_row);
 
     /**
      * Generate a matrix from a Trilinos
@@ -761,8 +761,8 @@ namespace TrilinosWrappers
      * SparseMatrix::reinit call
      * considerably faster.
      */
-    SparseMatrix (const Epetra_Map             &parallel_partitioning,
-                  const std::vector<size_type> &n_entries_per_row);
+    SparseMatrix (const Epetra_Map                &parallel_partitioning,
+                  const std::vector<unsigned int> &n_entries_per_row);
 
     /**
      * This constructor is similar to the
@@ -828,7 +828,7 @@ namespace TrilinosWrappers
      */
     SparseMatrix (const Epetra_Map                &row_parallel_partitioning,
                   const Epetra_Map                &col_parallel_partitioning,
-                  const std::vector<size_type> &n_entries_per_row);
+                  const std::vector<unsigned int> &n_entries_per_row);
 
     /**
      * This function is initializes the
@@ -991,9 +991,9 @@ namespace TrilinosWrappers
      * memory prior to use (in the
      * compress() step).
      */
-    SparseMatrix (const IndexSet  &parallel_partitioning,
-                  const MPI_Comm  &communicator = MPI_COMM_WORLD,
-                  const size_type  n_max_entries_per_row = 0);
+    SparseMatrix (const IndexSet    &parallel_partitioning,
+                  const MPI_Comm    &communicator = MPI_COMM_WORLD,
+                  const unsigned int n_max_entries_per_row = 0);
 
     /**
      * Same as before, but now set the
@@ -1009,9 +1009,9 @@ namespace TrilinosWrappers
      * SparseMatrix::reinit call
      * considerably faster.
      */
-    SparseMatrix (const IndexSet               &parallel_partitioning,
-                  const MPI_Comm               &communicator,
-                  const std::vector<size_type> &n_entries_per_row);
+    SparseMatrix (const IndexSet                  &parallel_partitioning,
+                  const MPI_Comm                  &communicator,
+                  const std::vector<unsigned int> &n_entries_per_row);
 
     /**
      * This constructor is similar to the
@@ -1074,10 +1074,10 @@ namespace TrilinosWrappers
      * each row of the newly generated
      * matrix.
      */
-    SparseMatrix (const IndexSet               &row_parallel_partitioning,
-                  const IndexSet               &col_parallel_partitioning,
-                  const MPI_Comm               &communicator,
-                  const std::vector<size_type> &n_entries_per_row);
+    SparseMatrix (const IndexSet                  &row_parallel_partitioning,
+                  const IndexSet                  &col_parallel_partitioning,
+                  const MPI_Comm                  &communicator,
+                  const std::vector<unsigned int> &n_entries_per_row);
 
     /**
      * This function is initializes the
@@ -1249,7 +1249,7 @@ namespace TrilinosWrappers
      * exactly are stored locally,
      * use local_range().
      */
-    size_type local_size () const;
+    unsigned int local_size () const;
 
     /**
      * Return a pair of indices
@@ -3501,7 +3501,7 @@ namespace TrilinosWrappers
           std::cout << col_index_ptr[i] << " ";
         std::cout << std::endl << std::endl;
         std::cout << "Matrix row has the following indices:" << std::endl;
-        TrilinosWrappers::types::int_type n_indices, *indices;
+        int n_indices, *indices;
         trilinos_sparsity_pattern().ExtractMyRowView(row_partitioner().LID(static_cast<TrilinosWrappers::types::int_type>(row)),
                                                      n_indices,
                                                      indices);
@@ -3524,7 +3524,7 @@ namespace TrilinosWrappers
   SparseMatrix::size_type
   SparseMatrix::m () const
   {
-    return matrix -> NumGlobalRows();
+    return matrix -> NumGlobalRows64();
   }
 
 
@@ -3533,13 +3533,13 @@ namespace TrilinosWrappers
   SparseMatrix::size_type
   SparseMatrix::n () const
   {
-    return matrix -> NumGlobalCols();
+    return matrix -> NumGlobalCols64();
   }
 
 
 
   inline
-  SparseMatrix::size_type
+  unsigned int
   SparseMatrix::local_size () const
   {
     return matrix -> NumMyRows();
@@ -3564,7 +3564,7 @@ namespace TrilinosWrappers
   SparseMatrix::size_type
   SparseMatrix::n_nonzero_elements () const
   {
-    return matrix->NumGlobalNonzeros();
+    return matrix->NumGlobalNonzeros64();
   }
 
 
index 494da6f40f06c2d70ce2a418dec33accdc50c6c8..a0b7cb947facceda5c9b940fe42286fe3d49a3dc 100644 (file)
@@ -1038,7 +1038,7 @@ namespace TrilinosWrappers
      * exactly are stored locally,
      * use local_range().
      */
-    size_type local_size () const;
+    int local_size () const;
 
     /**
      * Return a pair of indices
index d90ad93733c20796993df3350754d4f4ded43304..4d97382db3c30db14f6b47db1bfa41da804599f5 100644 (file)
@@ -54,7 +54,7 @@ namespace TrilinosWrappers
 
       // get a representation of the present
       // row
-      TrilinosWrappers::types::int_type ncols;
+      int ncols;
       TrilinosWrappers::types::int_type colnums = matrix->n();
       if (value_cache.get() == 0)
         {
@@ -124,12 +124,12 @@ namespace TrilinosWrappers
 
 
   SparseMatrix::SparseMatrix (const Epetra_Map                &input_map,
-                              const std::vector<size_type> &n_entries_per_row)
+                              const std::vector<unsigned int> &n_entries_per_row)
     :
     column_space_map (new Epetra_Map (input_map)),
     matrix (new Epetra_FECrsMatrix
             (Copy, *column_space_map,
-             (TrilinosWrappers::types::int_type *)const_cast<size_type *>(&(n_entries_per_row[0])),
+             (int *)const_cast<unsigned int *>(&(n_entries_per_row[0])),
              false)),
     last_action (Zero),
     compressed (false)
@@ -152,11 +152,11 @@ namespace TrilinosWrappers
 
   SparseMatrix::SparseMatrix (const Epetra_Map                &input_row_map,
                               const Epetra_Map                &input_col_map,
-                              const std::vector<size_type> &n_entries_per_row)
+                              const std::vector<unsigned int> &n_entries_per_row)
     :
     column_space_map (new Epetra_Map (input_col_map)),
     matrix (new Epetra_FECrsMatrix(Copy, input_row_map,
-                                   (TrilinosWrappers::types::int_type *)const_cast<size_type *>(&(n_entries_per_row[0])),
+                                   (int *)const_cast<unsigned int *>(&(n_entries_per_row[0])),
                                    false)),
     last_action (Zero),
     compressed (false)
@@ -166,7 +166,7 @@ namespace TrilinosWrappers
 
   SparseMatrix::SparseMatrix (const size_type m,
                               const size_type n,
-                              const size_type n_max_entries_per_row)
+                              const unsigned int n_max_entries_per_row)
     :
     column_space_map (new Epetra_Map (static_cast<TrilinosWrappers::types::int_type>(n), 0,
                                       Utilities::Trilinos::comm_self())),
@@ -191,9 +191,9 @@ namespace TrilinosWrappers
 
 
 
-  SparseMatrix::SparseMatrix (const size_type               m,
-                              const size_type               n,
-                              const std::vector<size_type> &n_entries_per_row)
+  SparseMatrix::SparseMatrix (const size_type                  m,
+                              const size_type                  n,
+                              const std::vector<unsigned int> &n_entries_per_row)
     :
     column_space_map (new Epetra_Map (static_cast<TrilinosWrappers::types::int_type>(n), 0,
                                       Utilities::Trilinos::comm_self())),
@@ -201,7 +201,7 @@ namespace TrilinosWrappers
                                    Epetra_Map (static_cast<TrilinosWrappers::types::int_type>(m), 0,
                                                Utilities::Trilinos::comm_self()),
                                    *column_space_map,
-                                   (TrilinosWrappers::types::int_type *)const_cast<size_type *>(&(n_entries_per_row[0])),
+                                   (int *)const_cast<unsigned int *>(&(n_entries_per_row[0])),
                                    false)),
     last_action (Zero),
     compressed (false)
@@ -211,7 +211,7 @@ namespace TrilinosWrappers
 
   SparseMatrix::SparseMatrix (const IndexSet     &parallel_partitioning,
                               const MPI_Comm     &communicator,
-                              const size_type     n_max_entries_per_row)
+                              const unsigned int  n_max_entries_per_row)
     :
     column_space_map (new Epetra_Map(parallel_partitioning.
                                      make_trilinos_map(communicator, false))),
@@ -225,15 +225,15 @@ namespace TrilinosWrappers
 
 
 
-  SparseMatrix::SparseMatrix (const IndexSet     &parallel_partitioning,
-                              const MPI_Comm     &communicator,
-                              const std::vector<size_type> &n_entries_per_row)
+  SparseMatrix::SparseMatrix (const IndexSet                  &parallel_partitioning,
+                              const MPI_Comm                  &communicator,
+                              const std::vector<unsigned int> &n_entries_per_row)
     :
     column_space_map (new Epetra_Map(parallel_partitioning.
                                      make_trilinos_map(communicator, false))),
     matrix (new Epetra_FECrsMatrix(Copy,
                                    *column_space_map,
-                                   (TrilinosWrappers::types::int_type *)const_cast<size_type *>(&(n_entries_per_row[0])),
+                                   (int *)const_cast<unsigned int *>(&(n_entries_per_row[0])),
                                    false)),
     last_action (Zero),
     compressed (false)
@@ -259,17 +259,17 @@ namespace TrilinosWrappers
 
 
 
-  SparseMatrix::SparseMatrix (const IndexSet     &row_parallel_partitioning,
-                              const IndexSet     &col_parallel_partitioning,
-                              const MPI_Comm     &communicator,
-                              const std::vector<size_type> &n_entries_per_row)
+  SparseMatrix::SparseMatrix (const IndexSet                  &row_parallel_partitioning,
+                              const IndexSet                  &col_parallel_partitioning,
+                              const MPI_Comm                  &communicator,
+                              const std::vector<unsigned int> &n_entries_per_row)
     :
     column_space_map (new Epetra_Map(col_parallel_partitioning.
                                      make_trilinos_map(communicator, false))),
     matrix (new Epetra_FECrsMatrix(Copy,
                                    row_parallel_partitioning.
                                    make_trilinos_map(communicator, false),
-                                   (TrilinosWrappers::types::int_type *)const_cast<size_type *>(&(n_entries_per_row[0])),
+                                   (int *)const_cast<unsigned int *>(&(n_entries_per_row[0])),
                                    false)),
     last_action (Zero),
     compressed (false)
@@ -428,7 +428,7 @@ namespace TrilinosWrappers
 
     const size_type first_row = input_row_map.MinMyGID(),
                        last_row = input_row_map.MaxMyGID()+1;
-    std::vector<TrilinosWrappers::types::int_type> n_entries_per_row(last_row-first_row);
+    std::vector<int> n_entries_per_row(last_row-first_row);
 
     for (size_type row=first_row; row<last_row; ++row)
       n_entries_per_row[row-first_row] = sparsity_pattern.row_length(row);
@@ -479,8 +479,7 @@ namespace TrilinosWrappers
     graph->OptimizeStorage();
 
     // check whether we got the number of columns right.
-    AssertDimension (sparsity_pattern.n_cols(),
-                     static_cast<size_type>(graph->NumGlobalCols()));
+    AssertDimension (sparsity_pattern.n_cols(),static_cast<size_type>(graph->NumGlobalCols64()));
 
     // And now finally generate the matrix.
     matrix.reset (new Epetra_FECrsMatrix(Copy, *graph, false));
@@ -720,23 +719,21 @@ namespace TrilinosWrappers
 
     // Only do this on the rows owned
     // locally on this processor.
-    TrilinosWrappers::types::int_type local_row =
+    int local_row =
       matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(row));
     if (local_row >= 0)
       {
         TrilinosScalar *values;
-        TrilinosWrappers::types::int_type *col_indices;
-        TrilinosWrappers::types::int_type num_entries;
+        int *col_indices;
+        int num_entries;
         const int ierr = matrix->ExtractMyRowView(local_row, num_entries,
                                                   values, col_indices);
 
         Assert (ierr == 0,
                 ExcTrilinosError(ierr));
 
-        TrilinosWrappers::types::int_type *diag_find = std::find(col_indices,
-            col_indices+num_entries,local_row);
-        TrilinosWrappers::types::int_type diag_index =
-          (TrilinosWrappers::types::int_type)(diag_find - col_indices);
+        int *diag_find = std::find(col_indices,col_indices+num_entries,local_row);
+        int diag_index = (int)(diag_find - col_indices);
 
         for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
           if (diag_index != j || new_diag_value == 0)
@@ -774,8 +771,8 @@ namespace TrilinosWrappers
   {
     // Extract local indices in
     // the matrix.
-    TrilinosWrappers::types::int_type trilinos_i = matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(i)),
-                                     trilinos_j = matrix->LCID(static_cast<TrilinosWrappers::types::int_type>(j));
+    int trilinos_i = matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(i)),
+      trilinos_j = matrix->LCID(static_cast<TrilinosWrappers::types::int_type>(j));
     TrilinosScalar value = 0.;
 
     // If the data is not on the
@@ -798,14 +795,15 @@ namespace TrilinosWrappers
 
         // Prepare pointers for extraction
         // of a view of the row.
-        TrilinosWrappers::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i);
-        TrilinosWrappers::types::int_type nnz_extracted;
-        TrilinosWrappers::types::int_type *col_indices;
+        int nnz_present = matrix->NumMyEntries(trilinos_i);
+        int nnz_extracted;
+        int *col_indices;
         TrilinosScalar *values;
 
         // Generate the view and make
         // sure that we have not generated
         // an error.
+        // TODO Check that col_indices are int and not long long
         int ierr = matrix->ExtractMyRowView(trilinos_i, nnz_extracted,
                                             values, col_indices);
         Assert (ierr==0, ExcTrilinosError(ierr));
@@ -817,11 +815,9 @@ namespace TrilinosWrappers
         // look for the value, and then
         // finally get it.
 
-        TrilinosWrappers::types::int_type *el_find = std::find(col_indices,
-            col_indices + nnz_present, trilinos_j);
+        int *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j);
 
-        TrilinosWrappers::types::int_type local_col_index =
-          (TrilinosWrappers::types::int_type)(el_find - col_indices);
+        int local_col_index = (int)(el_find - col_indices);
 
         // This is actually the only
         // difference to the el(i,j)
@@ -850,8 +846,7 @@ namespace TrilinosWrappers
   {
     // Extract local indices in
     // the matrix.
-    TrilinosWrappers::types::int_type trilinos_i =
-      matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(i)),
+    int trilinos_i = matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(i)),
       trilinos_j = matrix->LCID(static_cast<TrilinosWrappers::types::int_type>(j));
     TrilinosScalar value = 0.;
 
@@ -873,9 +868,9 @@ namespace TrilinosWrappers
 
         // Prepare pointers for extraction
         // of a view of the row.
-        TrilinosWrappers::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i);
-        TrilinosWrappers::types::int_type nnz_extracted;
-        TrilinosWrappers::types::int_type *col_indices;
+        int nnz_present = matrix->NumMyEntries(trilinos_i);
+        int nnz_extracted;
+        int *col_indices;
         TrilinosScalar *values;
 
         // Generate the view and make
@@ -891,11 +886,9 @@ namespace TrilinosWrappers
         // Search the index where we
         // look for the value, and then
         // finally get it.
-        TrilinosWrappers::types::int_type *el_find = std::find(col_indices,
-            col_indices + nnz_present, trilinos_j);
+        int *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j);
 
-        TrilinosWrappers::types::int_type local_col_index =
-          (TrilinosWrappers::types::int_type)(el_find - col_indices);
+        int local_col_index = (int)(el_find - col_indices);
 
 
         // This is actually the only
@@ -944,9 +937,8 @@ namespace TrilinosWrappers
 
     // get a representation of the
     // present row
-    TrilinosWrappers::types::int_type ncols = -1;
-    TrilinosWrappers::types::int_type local_row =
-      matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(row));
+    int ncols = -1;
+    int local_row = matrix->LRID(static_cast<TrilinosWrappers::types::int_type>(row));
 
     // on the processor who owns this
     // row, we'll have a non-negative
@@ -1014,10 +1006,10 @@ namespace TrilinosWrappers
                   ExcMessage ("Parallel distribution of matrix B and vector V "
                               "does not match."));
 
-          const TrilinosWrappers::types::int_type local_N = inputright.local_size();
-          for (TrilinosWrappers::types::int_type i=0; i<local_N; ++i)
+          const int local_N = inputright.local_size();
+          for (int i=0; i<local_N; ++i)
             {
-              TrilinosWrappers::types::int_type N_entries = -1;
+              int N_entries = -1;
               double *new_data, *B_data;
               mod_B->ExtractMyRowView (i, N_entries, new_data);
               inputright.trilinos_matrix().ExtractMyRowView (i, N_entries, B_data);
@@ -1055,9 +1047,9 @@ namespace TrilinosWrappers
                                                inputleft.range_partitioner());
           Assert (inputleft.domain_partitioner().LinearMap() == true,
                   ExcMessage("Matrix must be partitioned contiguously between procs."));
-          for (size_type i=0; i<inputleft.local_size(); ++i)
+          for (unsigned int i=0; i<inputleft.local_size(); ++i)
             {
-              TrilinosWrappers::types::int_type num_entries, * indices;
+              int num_entries, * indices;
               inputleft.trilinos_sparsity_pattern().ExtractMyRowView(i, num_entries,
                                                                      indices);
               Assert (num_entries >= 0, ExcInternalError());
@@ -1069,9 +1061,9 @@ namespace TrilinosWrappers
 
           sparsity_transposed.compress();
           transposed_mat.reinit (sparsity_transposed);
-          for (size_type i=0; i<inputleft.local_size(); ++i)
+          for (unsigned int i=0; i<inputleft.local_size(); ++i)
             {
-              TrilinosWrappers::types::int_type num_entries, * indices;
+              int num_entries, * indices;
               double *values;
               inputleft.trilinos_matrix().ExtractMyRowView(i, num_entries,
                                                            values, indices);
@@ -1098,7 +1090,7 @@ namespace TrilinosWrappers
       // import data if necessary
       ML_Operator *Btmp, *Ctmp, *Ctmp2, *tptr;
       ML_CommInfoOP *getrow_comm;
-      TrilinosWrappers::types::int_type max_per_proc;
+      int max_per_proc;
       TrilinosWrappers::types::int_type N_input_vector = B_->invec_leng;
       getrow_comm = B_->getrow->pre_comm;
       if ( getrow_comm != NULL)
@@ -1224,7 +1216,7 @@ namespace TrilinosWrappers
 
           const TrilinosWrappers::types::int_type row_local =
             matrix->RowMap().LID(static_cast<TrilinosWrappers::types::int_type>(row));
-          TrilinosWrappers::types::int_type n_entries, rhs_n_entries;
+          int n_entries, rhs_n_entries;
           TrilinosScalar *value_ptr, *rhs_value_ptr;
 
           // In debug mode, we want to check
@@ -1236,7 +1228,7 @@ namespace TrilinosWrappers
           // indices is relatively slow compared to
           // just working with the values.
 #ifdef DEBUG
-          TrilinosWrappers::types::int_type *index_ptr, *rhs_index_ptr;
+          int *index_ptr, *rhs_index_ptr;
           ierr = rhs.matrix->ExtractMyRowView (row_local, rhs_n_entries,
                                                rhs_value_ptr, rhs_index_ptr);
           Assert (ierr == 0, ExcTrilinosError(ierr));
@@ -1270,14 +1262,12 @@ namespace TrilinosWrappers
     // respective add() function.
     else
       {
-        size_type max_row_length = 0;
+        int max_row_length = 0;
         for (size_type row=local_range.first;
              row < local_range.second; ++row)
           max_row_length
-            = std::max (max_row_length,
-                        static_cast<size_type>(rhs.matrix->NumGlobalEntries(row)));
+            = std::max (max_row_length,rhs.matrix->NumGlobalEntries(row));
 
-        std::vector<TrilinosWrappers::types::int_type> column_indices (max_row_length);
         std::vector<TrilinosScalar> values (max_row_length);
 
         if (matrix->Filled() == true && rhs.matrix->Filled() == true &&
@@ -1285,9 +1275,10 @@ namespace TrilinosWrappers
           for (size_type row=local_range.first;
                row < local_range.second; ++row)
             {
-              const TrilinosWrappers::types::int_type row_local =
+              std::vector<int> column_indices (max_row_length);
+              const int row_local =
                 matrix->RowMap().LID(static_cast<TrilinosWrappers::types::int_type>(row));
-              TrilinosWrappers::types::int_type n_entries;
+              int n_entries;
 
               ierr = rhs.matrix->ExtractMyRowCopy (row_local, max_row_length,
                                                    n_entries,
@@ -1306,10 +1297,14 @@ namespace TrilinosWrappers
             }
         else
           {
+            //TODO check that is normal that column_indices in the if is an
+            //int while the column_indices in the else is a
+            //TrilinosWrappers::types::int_type
+            std::vector<TrilinosWrappers::types::int_type> column_indices (max_row_length);
             for (size_type row=local_range.first;
                  row < local_range.second; ++row)
               {
-                TrilinosWrappers::types::int_type n_entries;
+                int n_entries;
                 ierr = rhs.matrix->Epetra_CrsMatrix::ExtractGlobalRowCopy
                        ((TrilinosWrappers::types::int_type)row, max_row_length,
                         n_entries, &values[0], &column_indices[0]);
@@ -1375,10 +1370,10 @@ namespace TrilinosWrappers
     else
       {
         double *values;
-        TrilinosWrappers::types::int_type *indices;
-        TrilinosWrappers::types::int_type num_entries;
+        int *indices;
+        int num_entries;
 
-        for (TrilinosWrappers::types::int_type i=0; i<matrix->NumMyRows(); ++i)
+        for (int i=0; i<matrix->NumMyRows(); ++i)
           {
             matrix->ExtractMyRowView (i, num_entries, values, indices);
             for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
index 814b883399f6c81c0b0d73baedacf1566fb49f5f..5a172195db8dc10a08479136011e942c77858ccd 100644 (file)
@@ -48,8 +48,8 @@ namespace TrilinosWrappers
 
       // get a representation of the present
       // row
-      TrilinosWrappers::types::int_type ncols;
-      TrilinosWrappers::types::int_type colnums = sparsity_pattern->n_cols();
+      int ncols;
+      int colnums = sparsity_pattern->n_cols();
 
       int ierr;
       ierr = sparsity_pattern->graph->ExtractGlobalRowCopy((TrilinosWrappers::types::int_type)this->a_row,
@@ -325,7 +325,7 @@ namespace TrilinosWrappers
 
     const size_type first_row = input_row_map.MinMyGID(),
                        last_row = input_row_map.MaxMyGID()+1;
-    std::vector<TrilinosWrappers::types::int_type> n_entries_per_row(last_row - first_row);
+    std::vector<int> n_entries_per_row(last_row - first_row);
 
     for (size_type row=first_row; row<last_row; ++row)
       n_entries_per_row[row-first_row] = sp.row_length(row);
@@ -461,8 +461,8 @@ namespace TrilinosWrappers
         // local indices.
         if (graph->Filled() == false)
           {
-            TrilinosWrappers::types::int_type nnz_present = graph->NumGlobalIndices(i);
-            TrilinosWrappers::types::int_type nnz_extracted;
+            int nnz_present = graph->NumGlobalIndices(i);
+            int nnz_extracted;
             TrilinosWrappers::types::int_type *col_indices;
 
             // Generate the view and make
@@ -488,26 +488,26 @@ namespace TrilinosWrappers
           {
             // Prepare pointers for extraction
             // of a view of the row.
-            TrilinosWrappers::types::int_type nnz_present = graph->NumGlobalIndices(i);
-            TrilinosWrappers::types::int_type nnz_extracted;
-            TrilinosWrappers::types::int_type *col_indices;
+            int nnz_present = graph->NumGlobalIndices(
+                static_cast<TrilinosWrappers::types::int_type>(i));
+            int nnz_extracted;
+            int *col_indices;
 
             // Generate the view and make
             // sure that we have not generated
             // an error.
-            int ierr = graph->ExtractMyRowView(trilinos_i, nnz_extracted,
-                                               col_indices);
+            int ierr = graph->ExtractMyRowView(static_cast<int>(trilinos_i), 
+                nnz_extracted, col_indices);
             Assert (ierr==0, ExcTrilinosError(ierr));
 
             Assert (nnz_present == nnz_extracted,
                     ExcDimensionMismatch(nnz_present, nnz_extracted));
 
             // Search the index
-            TrilinosWrappers::types::int_type *el_find = std::find(col_indices,
-                col_indices + nnz_present, trilinos_j);
+            int *el_find = std::find(col_indices, col_indices + nnz_present, 
+                static_cast<int>(trilinos_j));
 
-            TrilinosWrappers::types::int_type local_col_index =
-              (TrilinosWrappers::types::int_type)(el_find - col_indices);
+            int local_col_index = (int)(el_find - col_indices);
 
             if (local_col_index == nnz_present)
               return false;
@@ -524,11 +524,11 @@ namespace TrilinosWrappers
   {
     size_type local_b=0;
     TrilinosWrappers::types::int_type global_b=0;
-    for (size_type i=0; i<local_size(); ++i)
+    for (int i=0; i<local_size(); ++i)
       {
-        TrilinosWrappers::types::int_type *indices;
-        TrilinosWrappers::types::int_type num_entries;
-        graph->ExtractMyRowView(i, num_entries, indices);
+        int *indices;
+        int num_entries;
+        graph->ExtractMyRowView(static_cast<int>(i), num_entries, indices);
         for (size_type j=0; j<(size_type)num_entries; ++j)
           {
             if (static_cast<size_type>(std::abs(static_cast<TrilinosWrappers::types::int_type>(i-indices[j]))) > local_b)
@@ -564,10 +564,10 @@ namespace TrilinosWrappers
 
 
 
-  SparsityPattern::size_type
+  int
   SparsityPattern::local_size () const
   {
-    TrilinosWrappers::types::int_type n_rows = graph -> NumMyRows();
+    int n_rows = graph -> NumMyRows();
 
     return n_rows;
   }
@@ -647,10 +647,10 @@ namespace TrilinosWrappers
       out << *graph;
     else
       {
-        TrilinosWrappers::types::int_type *indices;
-        TrilinosWrappers::types::int_type num_entries;
+        int *indices;
+        int num_entries;
 
-        for (TrilinosWrappers::types::int_type i=0; i<graph->NumMyRows(); ++i)
+        for (int i=0; i<graph->NumMyRows(); ++i)
           {
             graph->ExtractMyRowView (i, num_entries, indices);
             for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
@@ -668,10 +668,10 @@ namespace TrilinosWrappers
   SparsityPattern::print_gnuplot (std::ostream &out) const
   {
     Assert (graph->Filled() == true, ExcInternalError());
-    for (size_type row=0; row<local_size(); ++row)
+    for (int row=0; row<local_size(); ++row)
       {
-        TrilinosWrappers::types::int_type *indices;
-        TrilinosWrappers::types::int_type num_entries;
+        int *indices;
+        int num_entries;
         graph->ExtractMyRowView (row, num_entries, indices);
 
         for (size_type j=0; j<(size_type)num_entries; ++j)
index 3085659ecd1578499d0a150534f54036d41ff7e0..807e73630ff9da4cef5dbae777825013b24003fd 100644 (file)
@@ -235,7 +235,7 @@ namespace TrilinosWrappers
       for (size_type block=0; block<v.n_blocks(); ++block)
         {
           TrilinosWrappers::types::int_type *glob_elements = 
-            v.block(block).vector_partitioner().MyGlobalElements();
+            v.block(block).vector_partitioner().MyGlobalElements64();
           for (size_type i=0; i<v.block(block).local_size(); ++i)
             global_ids[added_elements++] = glob_elements[i] + block_offset;
           block_offset += v.block(block).size();

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.