From 3b8efaf07135d22cab52c917fd5f570a064bd7b2 Mon Sep 17 00:00:00 2001 From: Maximilian Bergbauer Date: Wed, 31 May 2023 14:38:57 +0200 Subject: [PATCH] Change logic to positive --- .../deal.II/matrix_free/fe_point_evaluation.h | 12 ++++---- .../matrix_free/tensor_product_kernels.h | 30 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/deal.II/matrix_free/fe_point_evaluation.h b/include/deal.II/matrix_free/fe_point_evaluation.h index b96ace8a09..b2e5f20b29 100644 --- a/include/deal.II/matrix_free/fe_point_evaluation.h +++ b/include/deal.II/matrix_free/fe_point_evaluation.h @@ -1767,9 +1767,9 @@ FEPointEvaluation::compute_evaluate_fast( scalar_value_type, VectorizedArrayType, 2, - true>(shapes_faces.data() + qb * n_shapes, - n_shapes, - solution_renumbered.data()); + false>(shapes_faces.data() + qb * n_shapes, + n_shapes, + solution_renumbered.data()); value = interpolated_value[dim - 1]; // reorder derivative from tangential/normal derivatives into tensor in @@ -1821,9 +1821,9 @@ FEPointEvaluation::compute_evaluate_fast( scalar_value_type, VectorizedArrayType, 1, - true>(shapes.data() + qb * n_shapes, - n_shapes, - solution_renumbered.data()); + false>(shapes.data() + qb * n_shapes, + n_shapes, + solution_renumbered.data()); gradient[0] = result[0]; if (dim > 1) gradient[1] = result[1]; diff --git a/include/deal.II/matrix_free/tensor_product_kernels.h b/include/deal.II/matrix_free/tensor_product_kernels.h index 07d32da2fe..9f40b3c100 100644 --- a/include/deal.II/matrix_free/tensor_product_kernels.h +++ b/include/deal.II/matrix_free/tensor_product_kernels.h @@ -3043,7 +3043,7 @@ namespace internal typename Number2, typename Number, int n_values = 1, - bool no_renumber = false> + bool do_renumber = true> inline #ifndef DEBUG DEAL_II_ALWAYS_INLINE @@ -3079,25 +3079,25 @@ namespace internal // Distinguish the inner loop based on whether we have a // renumbering or not - if (no_renumber || renumber.empty()) + if (do_renumber && !renumber.empty()) for (int i0 = 0; i0 < n_shapes; ++i0, ++i) { // gradient - inner_result[0] += shapes[i0][1][0] * values[i]; + inner_result[0] += shapes[i0][1][0] * values[renumber[i]]; // values - inner_result[1] += shapes[i0][0][0] * values[i]; + inner_result[1] += shapes[i0][0][0] * values[renumber[i]]; if (n_values > 1) - inner_result[2] += shapes[i0][0][0] * values_2[i]; + inner_result[2] += shapes[i0][0][0] * values_2[renumber[i]]; } else for (int i0 = 0; i0 < n_shapes; ++i0, ++i) { // gradient - inner_result[0] += shapes[i0][1][0] * values[renumber[i]]; + inner_result[0] += shapes[i0][1][0] * values[i]; // values - inner_result[1] += shapes[i0][0][0] * values[renumber[i]]; + inner_result[1] += shapes[i0][0][0] * values[i]; if (n_values > 1) - inner_result[2] += shapes[i0][0][0] * values_2[renumber[i]]; + inner_result[2] += shapes[i0][0][0] * values_2[i]; } if (dim > 1) @@ -3134,7 +3134,7 @@ namespace internal typename Number, typename Number2, int n_values = 1, - bool no_renumber = false> + bool do_renumber = true> inline std::array::type, dim + n_values> evaluate_tensor_product_value_and_gradient_shapes( @@ -3170,27 +3170,27 @@ namespace internal // cases if (n_shapes == 2) inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); else if (n_shapes == 3) inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); else if (n_shapes == 4) inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); else if (n_shapes == 5) inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); else if (n_shapes == 6) inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); else inner_result = - do_interpolate_xy( + do_interpolate_xy( values, renumber, shapes, n_shapes, i); if (dim == 3) { -- 2.39.5