From: Wolfgang Bangerth Date: Tue, 24 Nov 2015 17:15:07 +0000 (-0600) Subject: Initialize mapping and FE output with signaling NaNs. X-Git-Tag: v8.4.0-rc2~191^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4580d5bd6769c851e01f594a8b989699679c707;p=dealii.git Initialize mapping and FE output with signaling NaNs. --- diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index e800b2cdbf..d29d5e9c3a 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -2127,40 +2128,51 @@ namespace internal const UpdateFlags flags) { if (flags & update_quadrature_points) - this->quadrature_points.resize(n_quadrature_points); + this->quadrature_points.resize(n_quadrature_points, + Point(numbers::signaling_nan >())); if (flags & update_JxW_values) - this->JxW_values.resize(n_quadrature_points); + this->JxW_values.resize(n_quadrature_points, + numbers::signaling_nan()); if (flags & update_jacobians) - this->jacobians.resize(n_quadrature_points); + this->jacobians.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_jacobian_grads) - this->jacobian_grads.resize(n_quadrature_points); + this->jacobian_grads.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_jacobian_pushed_forward_grads) - this->jacobian_pushed_forward_grads.resize(n_quadrature_points); + this->jacobian_pushed_forward_grads.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_jacobian_2nd_derivatives) - this->jacobian_2nd_derivatives.resize(n_quadrature_points); + this->jacobian_2nd_derivatives.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_jacobian_pushed_forward_2nd_derivatives) - this->jacobian_pushed_forward_2nd_derivatives.resize(n_quadrature_points); + this->jacobian_pushed_forward_2nd_derivatives.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_jacobian_3rd_derivatives) this->jacobian_3rd_derivatives.resize(n_quadrature_points); if (flags & update_jacobian_pushed_forward_3rd_derivatives) - this->jacobian_pushed_forward_3rd_derivatives.resize(n_quadrature_points); + this->jacobian_pushed_forward_3rd_derivatives.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_inverse_jacobians) - this->inverse_jacobians.resize(n_quadrature_points); + this->inverse_jacobians.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_boundary_forms) - this->boundary_forms.resize(n_quadrature_points); + this->boundary_forms.resize(n_quadrature_points, + numbers::signaling_nan >()); if (flags & update_normal_vectors) - this->normal_vectors.resize(n_quadrature_points); + this->normal_vectors.resize(n_quadrature_points, + numbers::signaling_nan >()); } @@ -2192,18 +2204,14 @@ namespace internal const FiniteElement &fe, const UpdateFlags flags) { - - // initialize the table mapping - // from shape function number to - // the rows in the tables storing - // the data by shape function and + // initialize the table mapping from shape function number to + // the rows in the tables storing the data by shape function and // nonzero component this->shape_function_to_row_table = make_shape_function_to_row_table (fe); - // count the total number of non-zero - // components accumulated over all shape - // functions + // count the total number of non-zero components accumulated + // over all shape functions unsigned int n_nonzero_shape_components = 0; for (unsigned int i=0; ishape_values.reinit(n_nonzero_shape_components, - n_quadrature_points); + { + this->shape_values.reinit(n_nonzero_shape_components, + n_quadrature_points); + this->shape_values.fill(numbers::signaling_nan()); + } if (flags & update_gradients) this->shape_gradients.resize (n_nonzero_shape_components, - std::vector > (n_quadrature_points)); + std::vector > (n_quadrature_points, + numbers::signaling_nan >())); if (flags & update_hessians) this->shape_hessians.resize (n_nonzero_shape_components, - std::vector > (n_quadrature_points)); + std::vector > (n_quadrature_points, + numbers::signaling_nan >())); if (flags & update_3rd_derivatives) this->shape_3rd_derivatives.resize (n_nonzero_shape_components, - std::vector > (n_quadrature_points)); + std::vector > (n_quadrature_points, + numbers::signaling_nan >())); }