]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix use of incorrect Epetra function.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Apr 2024 19:46:07 +0000 (13:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 17 Apr 2024 19:46:07 +0000 (13:46 -0600)
source/lac/trilinos_epetra_vector.cc
source/lac/trilinos_vector.cc

index 54556de525656cc40010e84007bcc55cc5bd2c0f..0fce03c6d81fd5d195de73344906e173009261f1 100644 (file)
@@ -52,11 +52,19 @@ namespace LinearAlgebra
           vector.vector->Map().LID(
             static_cast<TrilinosWrappers::types::int_type>(index));
 
+#    ifndef DEAL_II_WITH_64BIT_INDICES
         Assert(local_index >= 0,
                ExcAccessToNonLocalElement(index,
                                           vector.vector->Map().NumMyElements(),
                                           vector.vector->Map().MinMyGID(),
                                           vector.vector->Map().MaxMyGID()));
+#    else
+        Assert(local_index >= 0,
+               ExcAccessToNonLocalElement(index,
+                                          vector.vector->Map().NumMyElements(),
+                                          vector.vector->Map().MinMyGID64(),
+                                          vector.vector->Map().MaxMyGID64()));
+#    endif
 
         return (*(vector.vector))[0][local_index];
       }
index 47885f0879c6f5afce59a19f5ed862821a4662ad..f3404b72cbdb95d3152a02619e9f8f7626287126 100644 (file)
@@ -52,12 +52,21 @@ namespace TrilinosWrappers
       const TrilinosWrappers::types::int_type local_index =
         vector.vector->Map().LID(
           static_cast<TrilinosWrappers::types::int_type>(index));
+#    ifndef DEAL_II_WITH_64BIT_INDICES
       Assert(local_index >= 0,
              MPI::Vector::ExcAccessToNonLocalElement(
                index,
                vector.vector->Map().NumMyElements(),
                vector.vector->Map().MinMyGID(),
                vector.vector->Map().MaxMyGID()));
+#    else
+      Assert(local_index >= 0,
+             MPI::Vector::ExcAccessToNonLocalElement(
+               index,
+               vector.vector->Map().NumMyElements(),
+               vector.vector->Map().MinMyGID64(),
+               vector.vector->Map().MaxMyGID64()));
+#    endif
 
 
       return (*(vector.vector))[0][local_index];
@@ -690,11 +699,19 @@ namespace TrilinosWrappers
       // continue. This is the main difference to the el() function.
       if (trilinos_i == -1)
         {
+#  ifndef DEAL_II_WITH_64BIT_INDICES
           Assert(false,
                  ExcAccessToNonLocalElement(index,
                                             vector->Map().NumMyElements(),
                                             vector->Map().MinMyGID(),
                                             vector->Map().MaxMyGID()));
+#  else
+          Assert(false,
+                 ExcAccessToNonLocalElement(index,
+                                            vector->Map().NumMyElements(),
+                                            vector->Map().MinMyGID64(),
+                                            vector->Map().MaxMyGID64()));
+#  endif
         }
       else
         value = (*vector)[0][trilinos_i];

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.