]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEEvaluationBase::read_write_operation case 3: enable masking 14085/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 2 Jul 2022 14:47:12 +0000 (16:47 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 2 Jul 2022 14:47:12 +0000 (16:47 +0200)
include/deal.II/matrix_free/fe_evaluation.h

index ed5d5692671d8a490c829d7b0beda92024237221..5e930165256f4ed04b43281a2a3a1a7b17ee7a4e 100644 (file)
@@ -3342,13 +3342,14 @@ FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>::
   // Case 3: standard operation with one index per degree of freedom -> go on
   // here
   constexpr unsigned int n_lanes = VectorizedArrayType::size();
-  Assert(mask.count() == n_lanes,
-         ExcNotImplemented("Masking currently not implemented for "
-                           "non-contiguous DoF storage"));
 
-  const std::array<unsigned int, VectorizedArrayType::size()> &cells =
+  std::array<unsigned int, VectorizedArrayType::size()> cells =
     this->get_cell_ids();
 
+  for (unsigned int v = 0; v < n_lanes; ++v)
+    if (mask[v] == false)
+      cells[v] = numbers::invalid_unsigned_int;
+
   bool has_hn_constraints = false;
 
   if (is_face == false)

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.