From 418cc02e37204f94f7f1934fea89f14fa5c521ed Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 12 Dec 2021 18:26:05 +0100 Subject: [PATCH] Compilation with gcc --- include/deal.II/fe/mapping_q_internal.h | 2 +- .../deal.II/matrix_free/evaluation_kernels.h | 2 +- include/deal.II/matrix_free/fe_evaluation.h | 4 +-- .../matrix_free/mapping_info.templates.h | 32 ++++++++++--------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/include/deal.II/fe/mapping_q_internal.h b/include/deal.II/fe/mapping_q_internal.h index b7069a987f..c2ad7ed262 100644 --- a/include/deal.II/fe/mapping_q_internal.h +++ b/include/deal.II/fe/mapping_q_internal.h @@ -1136,7 +1136,7 @@ namespace internal temp_data.descriptor.resize(1); temp_data.descriptor[0].n_q_points = n_q_points; FEEvaluationData eval( - {&data.shape_info, nullptr, &temp_data, 0, 0}); + std::make_tuple(&data.shape_info, nullptr, &temp_data, 0, 0)); // prepare arrays if (evaluation_flag != EvaluationFlags::nothing) diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index 8352824a5e..149ba87116 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -3265,7 +3265,7 @@ namespace internal const unsigned int subface_index = eval.get_subface_index(); const auto reorientate = [&](const unsigned int v, const unsigned int i) { return (dim < 3 || orientation[v] == nullptr || - subface_index < GeometryInfo::max_children_per_cell) ? + subface_index < Utilities::pow(2, dim)) ? i : orientation[v][i]; }; diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 08a4d4af57..adb254dbb7 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -7719,8 +7719,8 @@ FEFaceEvaluationcell_ids[i] = numbers::invalid_unsigned_int; - this->all_face_numbers[i] = numbers::invalid_unsigned_int; - this->all_face_orientations[i] = numbers::invalid_unsigned_int; + this->all_face_numbers[i] = static_cast(-1); + this->all_face_orientations[i] = static_cast(-1); continue; // invalid face ID: no neighbor on boundary } diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index c5658c9cab..4b52438230 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -1134,7 +1134,7 @@ namespace internal MappingInfoStorage temp_data; temp_data.copy_descriptor(my_data); FEEvaluationData eval( - {&shape_info, nullptr, &temp_data, 0, 0}); + std::make_tuple(&shape_info, nullptr, &temp_data, 0, 0)); AlignedVector evaluation_data; eval.set_data_pointers(&evaluation_data, dim); @@ -2043,9 +2043,9 @@ namespace internal MappingInfoStorage temp_data; temp_data.copy_descriptor(my_data); FEEvaluationData eval_int( - {&shape_info, nullptr, &temp_data, 0, 0}, true); + std::make_tuple(&shape_info, nullptr, &temp_data, 0, 0), true); FEEvaluationData eval_ext( - {&shape_info, nullptr, &temp_data, 0, 0}, false); + std::make_tuple(&shape_info, nullptr, &temp_data, 0, 0), false); AlignedVector evaluation_data, evaluation_data_ext; eval_int.set_data_pointers(&evaluation_data, dim); @@ -2159,13 +2159,14 @@ namespace internal face_type[face] <= affine ? 1 : n_q_points; for (unsigned int q = 0; q < n_points_compute; ++q) { - const unsigned int face_no = faces[face].interior_face_no; + const unsigned int interior_face_no = + faces[face].interior_face_no; Tensor<2, dim, VectorizedDouble> jac; for (unsigned int e = 0; e < dim; ++e) { const unsigned int ee = ExtractFaceHelper::reorder_face_derivative_indices( - face_no, e); + interior_face_no, e); for (unsigned int d = 0; d < dim; ++d) jac[d][ee] = eval_int @@ -2176,7 +2177,7 @@ namespace internal { const unsigned int ee = ExtractFaceHelper::reorder_face_derivative_indices( - face_no, e); + interior_face_no, e); for (unsigned int d = 0; d < dim; ++d) store_vectorized_array( inv_jac[ee][d], @@ -2186,7 +2187,8 @@ namespace internal if (update_flags_faces & update_jacobian_grads) { - compute_jacobian_grad(face_no, 0, q, inv_jac, eval_int); + compute_jacobian_grad( + interior_face_no, 0, q, inv_jac, eval_int); } std::array, dim - 1> @@ -2195,13 +2197,12 @@ namespace internal for (unsigned int e = 0; e < dim; ++e) for (unsigned int f = 0; f < dim; ++f) tangential_vectors[d][e] += - jac[e][f] * - GeometryInfo::unit_tangential_vectors[face_no][d] - [f]; + jac[e][f] * GeometryInfo::unit_tangential_vectors + [interior_face_no][d][f]; Tensor<1, dim, VectorizedDouble> boundary_form; if (dim == 1) - boundary_form[0] = face_no == 0 ? -1. : 1.; + boundary_form[0] = interior_face_no == 0 ? -1. : 1.; else if (dim == 2) boundary_form = cross_product_2d(tangential_vectors[0]); else if (dim == 3) @@ -2261,13 +2262,14 @@ namespace internal for (unsigned int q = 0; q < n_points_compute; ++q) { - const unsigned int face_no = faces[face].exterior_face_no; + const unsigned int exterior_face_no = + faces[face].exterior_face_no; Tensor<2, dim, VectorizedDouble> jac; for (unsigned int e = 0; e < dim; ++e) { const unsigned int ee = ExtractFaceHelper::reorder_face_derivative_indices< - dim>(face_no, e); + dim>(exterior_face_no, e); for (unsigned int d = 0; d < dim; ++d) jac[d][ee] = eval_ext @@ -2279,7 +2281,7 @@ namespace internal { const unsigned int ee = ExtractFaceHelper::reorder_face_derivative_indices< - dim>(face_no, e); + dim>(exterior_face_no, e); for (unsigned int d = 0; d < dim; ++d) store_vectorized_array( inv_jac[ee][d], @@ -2290,7 +2292,7 @@ namespace internal if (update_flags_faces & update_jacobian_grads) { compute_jacobian_grad( - face_no, 1, q, inv_jac, eval_ext); + exterior_face_no, 1, q, inv_jac, eval_ext); } my_data.normals_times_jacobians[1][offset + q] = -- 2.39.5