From 6cb0edab724ec678744dea3096c877e5ba410e9a Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 7 Sep 2023 20:45:57 +0200 Subject: [PATCH] FEPolyTensor: Only request dof_sign_change if necessary --- source/fe/fe_poly_tensor.cc | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index bd89f996ae..97b8e8d8ec 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -466,19 +466,19 @@ FE_PolyTensor::fill_fe_values( std::fill(fe_data.dof_sign_change.begin(), fe_data.dof_sign_change.end(), 1.0); - internal::FE_PolyTensor::get_dof_sign_change_nedelec(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_nedelec( + cell, *this, this->mapping_kind, fe_data.dof_sign_change); // TODO: This, similarly to the Nedelec case, is just a legacy function in 2d // and affects only face_dofs of H(div) conformal FEs. It does nothing in 1d. // Also nothing in 3d since we take care of it by using the // adjust_quad_dof_sign_for_face_orientation_table. - internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, + *this, + this->mapping_kind, + fe_data.dof_sign_change); // What is the first dof_index on a quad? const unsigned int first_quad_index = this->get_first_quad_index(); @@ -1095,19 +1095,19 @@ FE_PolyTensor::fill_fe_face_values( std::fill(fe_data.dof_sign_change.begin(), fe_data.dof_sign_change.end(), 1.0); - internal::FE_PolyTensor::get_dof_sign_change_nedelec(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_nedelec( + cell, *this, this->mapping_kind, fe_data.dof_sign_change); // TODO: This, similarly to the Nedelec case, is just a legacy function in 2d // and affects only face_dofs of H(div) conformal FEs. It does nothing in 1d. // Also nothing in 3d since we take care of it by using the // adjust_quad_dof_sign_for_face_orientation_table. - internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, + *this, + this->mapping_kind, + fe_data.dof_sign_change); // What is the first dof_index on a quad? const unsigned int first_quad_index = this->get_first_quad_index(); @@ -1780,19 +1780,19 @@ FE_PolyTensor::fill_fe_subface_values( std::fill(fe_data.dof_sign_change.begin(), fe_data.dof_sign_change.end(), 1.0); - internal::FE_PolyTensor::get_dof_sign_change_nedelec(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_nedelec( + cell, *this, this->mapping_kind, fe_data.dof_sign_change); // TODO: This, similarly to the Nedelec case, is just a legacy function in 2d // and affects only face_dofs of H(div) conformal FEs. It does nothing in 1d. // Also nothing in 3d since we take care of it by using the // adjust_quad_dof_sign_for_face_orientation_table. - internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, - *this, - this->mapping_kind, - fe_data.dof_sign_change); + if (fe_data.update_each & update_values) + internal::FE_PolyTensor::get_dof_sign_change_h_div(cell, + *this, + this->mapping_kind, + fe_data.dof_sign_change); // What is the first dof_index on a quad? const unsigned int first_quad_index = this->get_first_quad_index(); -- 2.39.5