From 1f965c0ecc777e01a1fe54706b986bbd41ace2fd 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 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; } -- 2.39.5