]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove most instances of PETSC_USE_64BIT_INDICES. PetscInt is always right.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Mar 2013 09:11:37 +0000 (09:11 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Mar 2013 09:11:37 +0000 (09:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@28900 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/petsc_matrix_base.h
deal.II/include/deal.II/lac/petsc_solver.h
deal.II/include/deal.II/lac/petsc_vector_base.h

index 7715d722dd3880aaacbcb17502344fc15c35f5ef..0734e3492695e1f36dad78320fc4737c221684fe 100644 (file)
@@ -1285,11 +1285,7 @@ namespace PETScWrappers
      * adding/inserting local data into
      * the (large) sparse matrix.
      */
-#ifdef PETSC_USE_64BIT_INDICES
     std::vector<PetscInt> column_indices;
-#else
-    std::vector<int> column_indices;
-#endif
 
     /**
      * An internal array of double values
@@ -1547,13 +1543,9 @@ namespace PETScWrappers
   {
     prepare_action(LastAction::insert);
 
-#ifdef PETSC_USE_64BIT_INDICES
     const PetscInt petsc_i = row;
     PetscInt *col_index_ptr;
-#else
-    const int petsc_i = row;
-    int *col_index_ptr;
-#endif
+
     PetscScalar const *col_value_ptr;
     int n_columns;
 
@@ -1697,13 +1689,8 @@ namespace PETScWrappers
   {
     prepare_action(LastAction::add);
 
-#ifdef PETSC_USE_64BIT_INDICES
     const PetscInt petsc_i = row;
     PetscInt *col_index_ptr;
-#else
-    const int petsc_i = row;
-    int *col_index_ptr;
-#endif
     PetscScalar const *col_value_ptr;
     int n_columns;
 
@@ -1818,11 +1805,8 @@ namespace PETScWrappers
   bool
   MatrixBase::in_local_range (const unsigned int index) const
   {
-#ifdef PETSC_USE_64BIT_INDICES
     PetscInt begin, end;
-#else
-    int begin, end;
-#endif
+
     const int ierr = MatGetOwnershipRange (static_cast<const Mat &>(matrix),
                                            &begin, &end);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
index 5c4a10a0f4e638e70fb904c7dc5afcb6ae6d634d..4d805ca669baf84f588d8f6bc9c9ad90a1abaf44 100644 (file)
@@ -225,11 +225,7 @@ namespace PETScWrappers
     int
 #endif
     convergence_test (KSP                 ksp,
-#ifdef PETSC_USE_64BIT_INDICES
                       const PetscInt      iteration,
-#else
-                      const int           iteration,
-#endif
                       const PetscReal     residual_norm,
                       KSPConvergedReason *reason,
                       void               *solver_control);
@@ -1226,11 +1222,7 @@ namespace PETScWrappers
     int
 #endif
     convergence_test (KSP                ksp,
-#ifdef PETSC_USE_64BIT_INDICES
                       const PetscInt     iteration,
-#else
-                      const int          iteration,
-#endif
                       const PetscReal    residual_norm,
                       KSPConvergedReason *reason,
                       void               *solver_control);
index 3d22318d1a2a11cd98bd997d6021bd31697970ea..5a5dbd0f588a78e9824e62de10e91857069cd1d0 100644 (file)
@@ -960,11 +960,7 @@ namespace PETScWrappers
 
       Assert (!vector.has_ghost_elements(), ExcGhostsPresent());
 
-#ifdef PETSC_USE_64BIT_INDICES
       const PetscInt petsc_i = index;
-#else
-      const signed int petsc_i = index;
-#endif
 
       const int ierr
         = VecSetValues (vector, 1, &petsc_i, &value, INSERT_VALUES);
@@ -1002,11 +998,7 @@ namespace PETScWrappers
         return *this;
 
       // use the PETSc function to add something
-#ifdef PETSC_USE_64BIT_INDICES
       const PetscInt petsc_i = index;
-#else
-      const signed int petsc_i = index;
-#endif
       const int ierr
         = VecSetValues (vector, 1, &petsc_i, &value, ADD_VALUES);
       AssertThrow (ierr == 0, ExcPETScError(ierr));
@@ -1043,11 +1035,7 @@ namespace PETScWrappers
 
       // use the PETSc function to
       // add something
-#ifdef PETSC_USE_64BIT_INDICES
       const PetscInt petsc_i = index;
-#else
-      const signed int petsc_i = index;
-#endif
       const PetscScalar subtractand = -value;
       const int ierr
         = VecSetValues (vector, 1, &petsc_i, &subtractand, ADD_VALUES);
@@ -1082,12 +1070,7 @@ namespace PETScWrappers
       if (value == 1.)
         return *this;
 
-#ifdef PETSC_USE_64BIT_INDICES
       const PetscInt petsc_i = index;
-#else
-      const signed int petsc_i = index;
-#endif
-
       const PetscScalar new_value
         = static_cast<PetscScalar>(*this) * value;
 
@@ -1124,12 +1107,7 @@ namespace PETScWrappers
       if (value == 1.)
         return *this;
 
-#ifdef PETSC_USE_64BIT_INDICES
       const PetscInt petsc_i = index;
-#else
-      const signed int petsc_i = index;
-#endif
-
       const PetscScalar new_value
         = static_cast<PetscScalar>(*this) / value;
 
@@ -1147,12 +1125,7 @@ namespace PETScWrappers
   bool
   VectorBase::in_local_range (const unsigned int index) const
   {
-#ifdef PETSC_USE_64BIT_INDICES
     PetscInt begin, end;
-#else
-    int begin, end;
-#endif
-
     const int ierr = VecGetOwnershipRange (static_cast<const Vec &>(vector),
                                            &begin, &end);
     AssertThrow (ierr == 0, ExcPETScError(ierr));

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.