]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Select correct code path for neighbor elements 12966/head
authorMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Tue, 9 Nov 2021 13:37:57 +0000 (14:37 +0100)
committerMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Thu, 18 Nov 2021 16:12:59 +0000 (17:12 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index d2961eaebbd07637e64cb02cad515d351dc1d7a6..75e7f55842b395da5026a6ef734dd0806beb2871 100644 (file)
@@ -444,7 +444,9 @@ protected:
 
   /**
    * Flag holding information whether a face is an interior or exterior face
-   * according to the defined direction of the normal.  Not used for cells.
+   * according to the defined direction of the normal. For cells it defines if
+   * the dof values should be read from the actual cell corresponding to the
+   * interior face or the neighboring cell corresponding to the exterior face.
    */
   bool is_interior_face;
 
@@ -3964,10 +3966,11 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
   for (unsigned int i = 0; i < v_len; ++i)
     cells[i] = numbers::invalid_unsigned_int;
 
-  if (is_face &&
-      this->dof_access_index ==
-        internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
-      this->is_interior_face == false)
+  if ((is_face &&
+       this->dof_access_index ==
+         internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
+       this->is_interior_face == false) ||
+      (!is_face && !this->is_interior_face))
     {
       // cell-based face-loop: plus face
       for (unsigned int i = 0; i < v_len; ++i)
@@ -4929,7 +4932,8 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
       !(is_face &&
         this->dof_access_index ==
           internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
-        this->is_interior_face == false))
+        this->is_interior_face == false) &&
+      !(!is_face && !this->is_interior_face))
     {
       const unsigned int dof_index =
         dof_indices_cont[this->cell * VectorizedArrayType::size()] +
@@ -4963,9 +4967,10 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
     this->dof_info->n_vectorization_lanes_filled[ind][this->cell];
 
   const bool is_ecl =
-    this->dof_access_index ==
-      internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
-    this->is_interior_face == false;
+    (this->dof_access_index ==
+       internal::MatrixFreeFunctions::DoFInfo::dof_access_cell &&
+     this->is_interior_face == false) ||
+    (!is_face && !this->is_interior_face);
 
   if (vectors_sm[0] != nullptr)
     {

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.