From e18e73f2ce2b729c6fe416f5b83aadcccfa175fa Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 14 Aug 2024 22:00:29 -0600 Subject: [PATCH] Fix compiling SolutionTransfer with complex values --- source/numerics/solution_transfer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 3f5e26856f..0cd0ded5d5 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -261,9 +261,11 @@ SolutionTransfer::interpolate( ExcMessage( "You can only call interpolate() once per SolutionTransfer object.")); + using Number = typename VectorType::value_type; + if (average_values) for (auto *const vec : all_out) - *vec = 0.0; + *vec = Number(); VectorType valence; @@ -284,7 +286,6 @@ SolutionTransfer::interpolate( if (average_values) { // finalize valence: compress and invert - using Number = typename VectorType::value_type; valence.compress(VectorOperation::add); for (const auto i : valence.locally_owned_elements()) valence[i] = (static_cast(valence[i]) == Number() ? -- 2.39.5