]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEPolyTensor: Only request dof_sign_change if necessary
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 7 Sep 2023 18:45:57 +0000 (20:45 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 7 Sep 2023 18:49:58 +0000 (20:49 +0200)
source/fe/fe_poly_tensor.cc

index bd89f996ae80ce3fe8bc7f339760b0c87726c6d0..97b8e8d8ec19cd21e15e36e51263afbc18105b64 100644 (file)
@@ -466,19 +466,19 @@ FE_PolyTensor<dim, spacedim>::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<dim, spacedim>::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<dim, spacedim>::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();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.