From: Daniel Arndt Date: Mon, 7 Aug 2023 12:54:15 +0000 (-0400) Subject: Fix compiling with PETSc with complex scalar type X-Git-Tag: v9.5.2~5^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15856%2Fhead;p=dealii.git Fix compiling with PETSc with complex scalar type --- diff --git a/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index b39b919b34..1c4b3ab967 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -277,8 +277,8 @@ namespace PETScWrappers // numbers back as integers later on, we get the same thing. for (PetscInt i = 0; i < end_index - ghost_start_index; i++) { - Assert(static_cast(static_cast( - ghost_start_index + i)) == (ghost_start_index + i), + Assert(static_cast(std::real(static_cast( + ghost_start_index + i))) == (ghost_start_index + i), ExcInternalError()); array[i] = ghost_start_index + i; }