From 8d64cf0fbfaeb8569b27f3980bdbdd8b7aab47c1 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 2 Apr 2020 07:52:43 +0200 Subject: [PATCH] Shortcut tensor product path in case of collocation --- source/fe/mapping_q_generic.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index b466aef730..973275b151 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -1517,6 +1517,19 @@ namespace internal Assert(!evaluate_hessians || n_q_points == jacobian_grads.size(), ExcDimensionMismatch(n_q_points, jacobian_grads.size())); + // shortcut in case we have an identity interpolation and only request + // the quadrature points + if (evaluate_values && !evaluate_gradients & !evaluate_hessians && + data.shape_info.element_type == + internal::MatrixFreeFunctions::tensor_symmetric_collocation) + { + for (unsigned int q = 0; q < n_q_points; ++q) + quadrature_points[q] = + data.mapping_support_points[data.shape_info + .lexicographic_numbering[q]]; + return; + } + // prepare arrays if (evaluate_values || evaluate_gradients || evaluate_hessians) { -- 2.39.5