]> https://gitweb.dealii.org/ - dealii.git/commitdiff
shortened and adapted changelog entry, changed function argument type of mask to...
authorSvenja Schoeder <schoeder@lnm.mw.tum.de>
Sun, 2 Sep 2018 09:40:19 +0000 (11:40 +0200)
committerSvenja Schoeder <schoeder@lnm.mw.tum.de>
Sun, 2 Sep 2018 09:40:19 +0000 (11:40 +0200)
doc/news/changes/minor/20180821SvenjaSchoeder
include/deal.II/matrix_free/fe_evaluation.h

index 40745a7954d8257ca9b4e20bd39e6febeba74df8..626e749beab1d9e653c8db9d4bd0c2c3a48e09b9 100644 (file)
@@ -1,5 +1,3 @@
 New: Add a mask argument to filter out some vector lanes in FEEvaluationBase
-Complemented by a test, which is almost the same as advect_1d but the distribute_local_to_global is called with the mask argument and each entry is written separately, yielding the same results as the original test.
-This commit is required for local time stepping using the MatrixFree framework, because some cells of batches must be excluded from read/write operations when operating on different time steps compared to their neighbor cells.
-<br>
+This is required for local time stepping using the MatrixFree framework, because some cells of batches must be excluded from read/write operations when operating on different time steps compared to their neighbor cells.
 (Svenja Schoeder, 2018/08/21)
index 7b509d085e37ccacd33257381abe6203d348e78a..ddfd44fb50d09074669c920268cbad16e5dea935 100644 (file)
@@ -247,7 +247,7 @@ public:
   distribute_local_to_global(
     VectorType &       dst,
     const unsigned int first_index = 0,
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask =
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask =
       std::bitset<VectorizedArray<Number>::n_array_elements>().flip()) const;
 
   /**
@@ -285,7 +285,7 @@ public:
   set_dof_values(
     VectorType &       dst,
     const unsigned int first_index = 0,
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask =
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask =
       std::bitset<VectorizedArray<Number>::n_array_elements>().flip()) const;
 
   //@}
@@ -802,9 +802,9 @@ protected:
   template <typename VectorType, typename VectorOperation>
   void
   read_write_operation(
-    const VectorOperation &                                      operation,
-    VectorType *                                                 vectors[],
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask,
+    const VectorOperation &                                       operation,
+    VectorType *                                                  vectors[],
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask,
     const bool apply_constraints = true) const;
 
   /**
@@ -817,9 +817,9 @@ protected:
   template <typename VectorType, typename VectorOperation>
   void
   read_write_operation_contiguous(
-    const VectorOperation &                                      operation,
-    VectorType *                                                 vectors[],
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask) const;
+    const VectorOperation &                                       operation,
+    VectorType *                                                  vectors[],
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask) const;
 
   /**
    * A unified function to read from and write into vectors based on the given
@@ -3946,9 +3946,9 @@ template <int dim, int n_components_, typename Number, bool is_face>
 template <typename VectorType, typename VectorOperation>
 inline void
 FEEvaluationBase<dim, n_components_, Number, is_face>::read_write_operation(
-  const VectorOperation &                                      operation,
-  VectorType *                                                 src[],
-  const std::bitset<VectorizedArray<Number>::n_array_elements> mask,
+  const VectorOperation &                                       operation,
+  VectorType *                                                  src[],
+  const std::bitset<VectorizedArray<Number>::n_array_elements> &mask,
   const bool apply_constraints) const
 {
   // Case 1: No MatrixFree object given, simple case because we do not need to
@@ -4395,9 +4395,9 @@ template <typename VectorType, typename VectorOperation>
 inline void
 FEEvaluationBase<dim, n_components_, Number, is_face>::
   read_write_operation_contiguous(
-    const VectorOperation &                                      operation,
-    VectorType *                                                 src[],
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask) const
+    const VectorOperation &                                       operation,
+    VectorType *                                                  src[],
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask) const
 {
   // This functions processes the functions read_dof_values,
   // distribute_local_to_global, and set_dof_values with the same code for
@@ -4704,9 +4704,9 @@ template <typename VectorType>
 inline void
 FEEvaluationBase<dim, n_components_, Number, is_face>::
   distribute_local_to_global(
-    VectorType &                                                 dst,
-    const unsigned int                                           first_index,
-    const std::bitset<VectorizedArray<Number>::n_array_elements> mask) const
+    VectorType &                                                  dst,
+    const unsigned int                                            first_index,
+    const std::bitset<VectorizedArray<Number>::n_array_elements> &mask) const
 {
   Assert(dof_values_initialized == true,
          internal::ExcAccessToUninitializedField());
@@ -4732,9 +4732,9 @@ template <int dim, int n_components_, typename Number, bool is_face>
 template <typename VectorType>
 inline void
 FEEvaluationBase<dim, n_components_, Number, is_face>::set_dof_values(
-  VectorType &                                                 dst,
-  const unsigned int                                           first_index,
-  const std::bitset<VectorizedArray<Number>::n_array_elements> mask) const
+  VectorType &                                                  dst,
+  const unsigned int                                            first_index,
+  const std::bitset<VectorizedArray<Number>::n_array_elements> &mask) const
 {
   Assert(dof_values_initialized == true,
          internal::ExcAccessToUninitializedField());

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.