From: Timo Heister Date: Tue, 19 Jul 2022 23:04:48 +0000 (-0400) Subject: matrix-free FEEvaluation: initialize with nan X-Git-Tag: v9.5.0-rc1~1068^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d15a97dd3f28379394d51bcd52736a2bd1da62b;p=dealii.git matrix-free FEEvaluation: initialize with nan Initialize the internal scratch_data of FEEvaluation with signaling_nans in debug mode. --- diff --git a/include/deal.II/matrix_free/fe_evaluation_data.h b/include/deal.II/matrix_free/fe_evaluation_data.h index 230231f44a..da9d22100a 100644 --- a/include/deal.II/matrix_free/fe_evaluation_data.h +++ b/include/deal.II/matrix_free/fe_evaluation_data.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1219,7 +1220,13 @@ FEEvaluationData::set_data_pointers( n_quadrature_points); const unsigned int allocated_size = size_scratch_data + size_data_arrays; +# ifdef DEBUG + scratch_data_array->clear(); + scratch_data_array->resize(allocated_size, + Number(numbers::signaling_nan())); +# else scratch_data_array->resize_fast(allocated_size); +# endif scratch_data.reinit(scratch_data_array->begin() + size_data_arrays, size_scratch_data);