From c1c9b5c977e6c91c8b2318b99820e8e39c2e611a Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 7 Aug 2023 08:54:15 -0400 Subject: [PATCH] Fix compiling with PETSc with complex scalar type --- source/lac/petsc_vector_base.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5