]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove usages of PETSC_USE_64BIT_INDICES 4332/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 29 Apr 2017 21:28:21 +0000 (23:28 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 29 Apr 2017 21:39:48 +0000 (23:39 +0200)
source/lac/petsc_vector_base.cc

index 42400bfbefbc97b76905cd3fd24a2ade914778c9..353846f2ecba3428d996127e672e3ae4d06f1617 100644 (file)
@@ -1171,14 +1171,7 @@ namespace PETScWrappers
     // (unlike the above calls)
     if (n_elements != 0)
       {
-#ifdef PETSC_USE_64BIT_INDICES
-        std::vector<PetscInt> petsc_ind (n_elements);
-        for (size_type i=0; i<n_elements; ++i)
-          petsc_ind[i] = indices[i];
-        const PetscInt *petsc_indices = &petsc_ind[0];
-#else
-        const int *petsc_indices = (const int *)indices;
-#endif
+        const PetscInt *petsc_indices = reinterpret_cast<const PetscInt *>(indices);
 
         const InsertMode mode = (add_values ? ADD_VALUES : INSERT_VALUES);
         const PetscErrorCode ierr = VecSetValues (vector, n_elements, petsc_indices,

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.