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: relicensing~609^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1c9b5c977e6c91c8b2318b99820e8e39c2e611a;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 c8e0946464..df82e50bdf 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; }