Reference documentation for deal.II version GIT 69313620a0 2022-11-28 13:00:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
vector_access_internal.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 2022 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 
17 #ifndef dealii_matrix_free_vector_access_internal_h
18 #define dealii_matrix_free_vector_access_internal_h
19 
20 #include <deal.II/base/config.h>
21 
23 
27 
28 #if DEBUG
29 # include <boost/algorithm/string/join.hpp>
30 #endif
31 
33 
34 
35 namespace internal
36 {
37  // below we use type-traits from matrix-free/type_traits.h
38 
39  // access to generic const vectors that have operator ().
40  // FIXME: this is wrong for Trilinos/Petsc MPI vectors
41  // where we should first do Partitioner::local_to_global()
42  template <
43  typename VectorType,
44  std::enable_if_t<!has_local_element<VectorType>, VectorType> * = nullptr>
45  inline typename VectorType::value_type
46  vector_access(const VectorType &vec, const unsigned int entry)
47  {
48  return vec(entry);
49  }
50 
51 
52 
53  // access to generic non-const vectors that have operator ().
54  // FIXME: this is wrong for Trilinos/Petsc MPI vectors
55  // where we should first do Partitioner::local_to_global()
56  template <
57  typename VectorType,
58  std::enable_if_t<!has_local_element<VectorType>, VectorType> * = nullptr>
59  inline typename VectorType::value_type &
60  vector_access(VectorType &vec, const unsigned int entry)
61  {
62  return vec(entry);
63  }
64 
65 
66 
67  // access to distributed MPI vectors that have a local_element(uint)
68  // method to access data in local index space, which is what we use in
69  // DoFInfo and hence in read_dof_values etc.
70  template <
71  typename VectorType,
72  std::enable_if_t<has_local_element<VectorType>, VectorType> * = nullptr>
73  inline typename VectorType::value_type &
74  vector_access(VectorType &vec, const unsigned int entry)
75  {
76  return vec.local_element(entry);
77  }
78 
79 
80 
81  // same for const access
82  template <
83  typename VectorType,
84  std::enable_if_t<has_local_element<VectorType>, VectorType> * = nullptr>
85  inline typename VectorType::value_type
86  vector_access(const VectorType &vec, const unsigned int entry)
87  {
88  return vec.local_element(entry);
89  }
90 
91 
92 
93  template <
94  typename VectorType,
95  std::enable_if_t<has_add_local_element<VectorType>, VectorType> * = nullptr>
96  inline void
97  vector_access_add(VectorType & vec,
98  const unsigned int entry,
99  const typename VectorType::value_type &val)
100  {
101  vec.add_local_element(entry, val);
102  }
103 
104 
105 
106  template <typename VectorType,
107  std::enable_if_t<!has_add_local_element<VectorType>, VectorType> * =
108  nullptr>
109  inline void
110  vector_access_add(VectorType & vec,
111  const unsigned int entry,
112  const typename VectorType::value_type &val)
113  {
114  vector_access(vec, entry) += val;
115  }
116 
117 
118 
119  template <
120  typename VectorType,
121  std::enable_if_t<has_add_local_element<VectorType>, VectorType> * = nullptr>
122  inline void
123  vector_access_add_global(VectorType & vec,
124  const types::global_dof_index entry,
125  const typename VectorType::value_type &val)
126  {
127  vec.add(entry, val);
128  }
129 
130 
131 
132  template <typename VectorType,
133  std::enable_if_t<!has_add_local_element<VectorType>, VectorType> * =
134  nullptr>
135  inline void
136  vector_access_add_global(VectorType & vec,
137  const types::global_dof_index entry,
138  const typename VectorType::value_type &val)
139  {
140  vec(entry) += val;
141  }
142 
143 
144 
145  template <
146  typename VectorType,
147  std::enable_if_t<has_set_local_element<VectorType>, VectorType> * = nullptr>
148  inline void
149  vector_access_set(VectorType & vec,
150  const unsigned int entry,
151  const typename VectorType::value_type &val)
152  {
153  vec.set_local_element(entry, val);
154  }
155 
156 
157 
158  template <typename VectorType,
159  std::enable_if_t<!has_set_local_element<VectorType>, VectorType> * =
160  nullptr>
161  inline void
162  vector_access_set(VectorType & vec,
163  const unsigned int entry,
164  const typename VectorType::value_type &val)
165  {
166  vector_access(vec, entry) = val;
167  }
168 
169 
170 
171  // this is to make sure that the parallel partitioning in VectorType
172  // is really the same as stored in MatrixFree.
173  // version below is when has_partitioners_are_compatible == false
174  // FIXME: this is incorrect for PETSc/Trilinos MPI vectors
175  template <int dim,
176  typename Number,
177  typename VectorizedArrayType,
178  typename VectorType,
179  std::enable_if_t<!has_partitioners_are_compatible<VectorType>,
180  VectorType> * = nullptr>
181  inline void
183  const VectorType & vec,
186  {
187  (void)vec;
188  (void)matrix_free;
189  (void)dof_info;
190 
191  AssertDimension(vec.size(), dof_info.vector_partitioner->size());
192  }
193 
194 
195 
196  // same as above for has_partitioners_are_compatible == true
197  template <int dim,
198  typename Number,
199  typename VectorizedArrayType,
200  typename VectorType,
201  std::enable_if_t<has_partitioners_are_compatible<VectorType>,
202  VectorType> * = nullptr>
203  inline void
205  const VectorType & vec,
208  {
209  (void)vec;
210  (void)matrix_free;
211  (void)dof_info;
212 
213 #if DEBUG
214  if (vec.partitioners_are_compatible(*dof_info.vector_partitioner) == false)
215  {
216  unsigned int dof_index = numbers::invalid_unsigned_int;
217 
218  for (unsigned int i = 0; i < matrix_free.n_components(); ++i)
219  if (&matrix_free.get_dof_info(i) == &dof_info)
220  {
221  dof_index = i;
222  break;
223  }
224 
226 
227  std::vector<std::string> dof_indices_with_compatible_partitioners;
228 
229  for (unsigned int i = 0; i < matrix_free.n_components(); ++i)
230  if (vec.partitioners_are_compatible(
231  *matrix_free.get_dof_info(i).vector_partitioner))
232  dof_indices_with_compatible_partitioners.push_back(
233  std::to_string(i));
234 
235  if (dof_indices_with_compatible_partitioners.empty())
236  {
237  Assert(false,
238  ExcMessage("The parallel layout of the given vector is "
239  "compatible neither with the Partitioner of the "
240  "current FEEvaluation with dof_handler_index=" +
241  std::to_string(dof_index) +
242  " nor with any Partitioner in MatrixFree. A "
243  "potential reason is that you did not use "
244  "MatrixFree::initialize_dof_vector() to get a "
245  "compatible vector."));
246  }
247  else
248  {
249  Assert(
250  false,
251  ExcMessage(
252  "The parallel layout of the given vector is "
253  "not compatible with the Partitioner of the "
254  "current FEEvaluation with dof_handler_index=" +
255  std::to_string(dof_index) +
256  ". However, the underlying "
257  "MatrixFree contains Partitioner objects that are compatible. "
258  "They have the following dof_handler_index values: " +
259  boost::algorithm::join(dof_indices_with_compatible_partitioners,
260  ", ") +
261  ". Did you want to pass any of these values to the "
262  "constructor of the current FEEvaluation object or "
263  "did you not use MatrixFree::initialize_dof_vector() "
264  "with dof_handler_index=" +
265  std::to_string(dof_index) +
266  " to get a "
267  "compatible vector?"));
268  }
269  }
270 #endif
271  }
272 
273 
274 
275  // Below, three classes (VectorReader, VectorSetter,
276  // VectorDistributorLocalToGlobal) implement the same interface and can be
277  // used to to read from vector, set elements of a vector and add to elements
278  // of the vector.
279 
280  // 1. A class to read data from vector
281  template <typename Number, typename VectorizedArrayType>
283  {
284  template <typename VectorType>
285  void
286  process_dof(const unsigned int index,
287  const VectorType & vec,
288  Number & res) const
289  {
290  res = vector_access(vec, index);
291  }
292 
293 
294 
295  template <typename VectorNumberType>
296  void
297  process_dof(const VectorNumberType &global, Number &local) const
298  {
299  local = global;
300  }
301 
302 
303 
304  template <typename VectorType>
305  void
306  process_dofs_vectorized(const unsigned int dofs_per_cell,
307  const unsigned int dof_index,
308  VectorType & vec,
309  VectorizedArrayType *dof_values,
310  std::integral_constant<bool, true>) const
311  {
312 #ifdef DEBUG
313  // in debug mode, run non-vectorized version because this path
314  // has additional checks (e.g., regarding ghosting)
315  process_dofs_vectorized(dofs_per_cell,
316  dof_index,
317  vec,
318  dof_values,
319  std::integral_constant<bool, false>());
320 #else
321  const Number *vec_ptr = vec.begin() + dof_index;
322  for (unsigned int i = 0; i < dofs_per_cell;
323  ++i, vec_ptr += VectorizedArrayType::size())
324  dof_values[i].load(vec_ptr);
325 #endif
326  }
327 
328 
329 
330  template <typename VectorType>
331  void
332  process_dofs_vectorized(const unsigned int dofs_per_cell,
333  const unsigned int dof_index,
334  const VectorType & vec,
335  VectorizedArrayType *dof_values,
336  std::integral_constant<bool, false>) const
337  {
338  for (unsigned int i = 0; i < dofs_per_cell; ++i)
339  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
340  dof_values[i][v] =
341  vector_access(vec, dof_index + v + i * VectorizedArrayType::size());
342  }
343 
344 
345 
346  template <typename VectorType>
347  void
348  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
349  const unsigned int * dof_indices,
350  VectorType & vec,
351  VectorizedArrayType *dof_values,
352  std::integral_constant<bool, true>) const
353  {
354  ::vectorized_load_and_transpose(dofs_per_cell,
355  vec.begin(),
356  dof_indices,
357  dof_values);
358  }
359 
360 
361 
362  template <typename VectorType>
363  void
364  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
365  const unsigned int * dof_indices,
366  const VectorType & vec,
367  VectorizedArrayType *dof_values,
368  std::integral_constant<bool, false>) const
369  {
370  for (unsigned int d = 0; d < dofs_per_cell; ++d)
371  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
372  dof_values[d][v] = vector_access(vec, dof_indices[v] + d);
373  }
374 
375 
376 
377  template <typename Number2>
378  void
380  const unsigned int dofs_per_cell,
381  const std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
382  VectorizedArrayType * dof_values,
383  std::integral_constant<bool, true>) const
384  {
385  ::vectorized_load_and_transpose(dofs_per_cell,
386  global_ptr,
387  dof_values);
388  }
389 
390 
391 
392  template <typename Number2>
393  void
395  const unsigned int,
396  const std::array<Number2 *, VectorizedArrayType::size()> &,
397  VectorizedArrayType *,
398  std::integral_constant<bool, false>) const
399  {
400  Assert(false, ExcNotImplemented());
401  }
402 
403 
404 
405  // variant where VectorType::value_type is the same as Number -> can call
406  // gather
407  template <typename VectorType>
408  void
409  process_dof_gather(const unsigned int * indices,
410  VectorType & vec,
411  const unsigned int constant_offset,
412  VectorizedArrayType &res,
413  std::integral_constant<bool, true>) const
414  {
415 #ifdef DEBUG
416  // in debug mode, run non-vectorized version because this path
417  // has additional checks (e.g., regarding ghosting)
418  process_dof_gather(indices,
419  vec,
420  constant_offset,
421  res,
422  std::integral_constant<bool, false>());
423 #else
424  res.gather(vec.begin() + constant_offset, indices);
425 #endif
426  }
427 
428 
429 
430  // variant where VectorType::value_type is not the same as Number -> must
431  // manually load the data
432  template <typename VectorType>
433  void
434  process_dof_gather(const unsigned int * indices,
435  const VectorType & vec,
436  const unsigned int constant_offset,
437  VectorizedArrayType &res,
438  std::integral_constant<bool, false>) const
439  {
440  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
441  res[v] = vector_access(vec, indices[v] + constant_offset);
442  }
443 
444 
445 
446  template <typename VectorType>
447  void
449  const VectorType & vec,
450  Number & res) const
451  {
452  res = vec(index);
453  }
454 
455 
456 
457  void
458  pre_constraints(const Number &, Number &res) const
459  {
460  res = Number();
461  }
462 
463 
464 
465  template <typename VectorType>
466  void
467  process_constraint(const unsigned int index,
468  const Number weight,
469  const VectorType & vec,
470  Number & res) const
471  {
472  res += weight * vector_access(vec, index);
473  }
474 
475 
476 
477  void
478  post_constraints(const Number &sum, Number &write_pos) const
479  {
480  write_pos = sum;
481  }
482 
483 
484 
485  void
486  process_empty(VectorizedArrayType &res) const
487  {
488  res = VectorizedArrayType();
489  }
490  };
491 
492 
493 
494  // 2. A class to add values to the vector during
495  // FEEvaluation::distribute_local_to_global() call
496  template <typename Number, typename VectorizedArrayType>
498  {
499  template <typename VectorType>
500  void
501  process_dof(const unsigned int index, VectorType &vec, Number &res) const
502  {
503  vector_access_add(vec, index, res);
504  }
505 
506 
507  template <typename VectorNumberType>
508  void
509  process_dof(VectorNumberType &global, Number &local) const
510  {
511  global += local;
512  }
513 
514 
515 
516  template <typename VectorType>
517  void
518  process_dofs_vectorized(const unsigned int dofs_per_cell,
519  const unsigned int dof_index,
520  VectorType & vec,
521  VectorizedArrayType *dof_values,
522  std::integral_constant<bool, true>) const
523  {
524  Number *vec_ptr = vec.begin() + dof_index;
525  for (unsigned int i = 0; i < dofs_per_cell;
526  ++i, vec_ptr += VectorizedArrayType::size())
527  {
528  VectorizedArrayType tmp;
529  tmp.load(vec_ptr);
530  tmp += dof_values[i];
531  tmp.store(vec_ptr);
532  }
533  }
534 
535 
536 
537  template <typename VectorType>
538  void
539  process_dofs_vectorized(const unsigned int dofs_per_cell,
540  const unsigned int dof_index,
541  VectorType & vec,
542  VectorizedArrayType *dof_values,
543  std::integral_constant<bool, false>) const
544  {
545  for (unsigned int i = 0; i < dofs_per_cell; ++i)
546  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
547  vector_access_add(vec,
548  dof_index + v + i * VectorizedArrayType::size(),
549  dof_values[i][v]);
550  }
551 
552 
553 
554  template <typename VectorType>
555  void
556  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
557  const unsigned int * dof_indices,
558  VectorType & vec,
559  VectorizedArrayType *dof_values,
560  std::integral_constant<bool, true>) const
561  {
563  true, dofs_per_cell, dof_values, dof_indices, vec.begin());
564  }
565 
566 
567 
568  template <typename VectorType>
569  void
570  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
571  const unsigned int * dof_indices,
572  VectorType & vec,
573  VectorizedArrayType *dof_values,
574  std::integral_constant<bool, false>) const
575  {
576  for (unsigned int d = 0; d < dofs_per_cell; ++d)
577  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
578  vector_access_add(vec, dof_indices[v] + d, dof_values[d][v]);
579  }
580 
581 
582 
583  template <typename Number2>
584  void
586  const unsigned int dofs_per_cell,
587  std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
588  VectorizedArrayType * dof_values,
589  std::integral_constant<bool, true>) const
590  {
592  dofs_per_cell,
593  dof_values,
594  global_ptr);
595  }
596 
597 
598 
599  template <typename Number2>
600  void
602  const unsigned int,
603  std::array<Number2 *, VectorizedArrayType::size()> &,
604  VectorizedArrayType *,
605  std::integral_constant<bool, false>) const
606  {
607  Assert(false, ExcNotImplemented());
608  }
609 
610 
611 
612  // variant where VectorType::value_type is the same as Number -> can call
613  // scatter
614  template <typename VectorType>
615  void
616  process_dof_gather(const unsigned int * indices,
617  VectorType & vec,
618  const unsigned int constant_offset,
619  VectorizedArrayType &res,
620  std::integral_constant<bool, true>) const
621  {
622 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS < 512
623  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
624  vector_access(vec, indices[v] + constant_offset) += res[v];
625 #else
626  // only use gather in case there is also scatter.
627  VectorizedArrayType tmp;
628  tmp.gather(vec.begin() + constant_offset, indices);
629  tmp += res;
630  tmp.scatter(indices, vec.begin() + constant_offset);
631 #endif
632  }
633 
634 
635 
636  // variant where VectorType::value_type is not the same as Number -> must
637  // manually append all data
638  template <typename VectorType>
639  void
640  process_dof_gather(const unsigned int * indices,
641  VectorType & vec,
642  const unsigned int constant_offset,
643  VectorizedArrayType &res,
644  std::integral_constant<bool, false>) const
645  {
646  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
647  vector_access_add(vec, indices[v] + constant_offset, res[v]);
648  }
649 
650 
651 
652  template <typename VectorType>
653  void
655  VectorType & vec,
656  Number & res) const
657  {
658  vector_access_add_global(vec, index, res);
659  }
660 
661 
662 
663  void
664  pre_constraints(const Number &input, Number &res) const
665  {
666  res = input;
667  }
668 
669 
670 
671  template <typename VectorType>
672  void
673  process_constraint(const unsigned int index,
674  const Number weight,
675  VectorType & vec,
676  Number & res) const
677  {
678  vector_access_add(vec, index, weight * res);
679  }
680 
681 
682 
683  void
684  post_constraints(const Number &, Number &) const
685  {}
686 
687 
688 
689  void
690  process_empty(VectorizedArrayType &) const
691  {}
692  };
693 
694 
695 
696  // 3. A class to set elements of the vector
697  template <typename Number, typename VectorizedArrayType>
699  {
700  template <typename VectorType>
701  void
702  process_dof(const unsigned int index, VectorType &vec, Number &res) const
703  {
704  vector_access(vec, index) = res;
705  }
706 
707 
708 
709  template <typename VectorNumberType>
710  void
711  process_dof(VectorNumberType &global, Number &local) const
712  {
713  global = local;
714  }
715 
716 
717 
718  template <typename VectorType>
719  void
720  process_dofs_vectorized(const unsigned int dofs_per_cell,
721  const unsigned int dof_index,
722  VectorType & vec,
723  VectorizedArrayType *dof_values,
724  std::integral_constant<bool, true>) const
725  {
726  Number *vec_ptr = vec.begin() + dof_index;
727  for (unsigned int i = 0; i < dofs_per_cell;
728  ++i, vec_ptr += VectorizedArrayType::size())
729  dof_values[i].store(vec_ptr);
730  }
731 
732 
733 
734  template <typename VectorType>
735  void
736  process_dofs_vectorized(const unsigned int dofs_per_cell,
737  const unsigned int dof_index,
738  VectorType & vec,
739  VectorizedArrayType *dof_values,
740  std::integral_constant<bool, false>) const
741  {
742  for (unsigned int i = 0; i < dofs_per_cell; ++i)
743  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
744  vector_access(vec, dof_index + v + i * VectorizedArrayType::size()) =
745  dof_values[i][v];
746  }
747 
748 
749 
750  template <typename VectorType>
751  void
752  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
753  const unsigned int * dof_indices,
754  VectorType & vec,
755  VectorizedArrayType *dof_values,
756  std::integral_constant<bool, true>) const
757  {
759  false, dofs_per_cell, dof_values, dof_indices, vec.begin());
760  }
761 
762 
763 
764  template <typename VectorType, bool booltype>
765  void
766  process_dofs_vectorized_transpose(const unsigned int dofs_per_cell,
767  const unsigned int * dof_indices,
768  VectorType & vec,
769  VectorizedArrayType *dof_values,
770  std::integral_constant<bool, false>) const
771  {
772  for (unsigned int i = 0; i < dofs_per_cell; ++i)
773  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
774  vector_access(vec, dof_indices[v] + i) = dof_values[i][v];
775  }
776 
777 
778 
779  template <typename Number2>
780  void
782  const unsigned int dofs_per_cell,
783  std::array<Number2 *, VectorizedArrayType::size()> &global_ptr,
784  VectorizedArrayType * dof_values,
785  std::integral_constant<bool, true>) const
786  {
788  dofs_per_cell,
789  dof_values,
790  global_ptr);
791  }
792 
793 
794 
795  template <typename Number2>
796  void
798  const unsigned int,
799  std::array<Number2 *, VectorizedArrayType::size()> &,
800  VectorizedArrayType *,
801  std::integral_constant<bool, false>) const
802  {
803  Assert(false, ExcNotImplemented());
804  }
805 
806 
807 
808  template <typename VectorType>
809  void
810  process_dof_gather(const unsigned int * indices,
811  VectorType & vec,
812  const unsigned int constant_offset,
813  VectorizedArrayType &res,
814  std::integral_constant<bool, true>) const
815  {
816  res.scatter(indices, vec.begin() + constant_offset);
817  }
818 
819 
820 
821  template <typename VectorType>
822  void
823  process_dof_gather(const unsigned int * indices,
824  VectorType & vec,
825  const unsigned int constant_offset,
826  VectorizedArrayType &res,
827  std::integral_constant<bool, false>) const
828  {
829  for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
830  vector_access(vec, indices[v] + constant_offset) = res[v];
831  }
832 
833 
834 
835  template <typename VectorType>
836  void
838  VectorType & vec,
839  Number & res) const
840  {
841  vec(index) = res;
842  }
843 
844 
845 
846  void
847  pre_constraints(const Number &, Number &) const
848  {}
849 
850 
851 
852  template <typename VectorType>
853  void
854  process_constraint(const unsigned int,
855  const Number,
856  VectorType &,
857  Number &) const
858  {}
859 
860 
861 
862  void
863  post_constraints(const Number &, Number &) const
864  {}
865 
866 
867 
868  void
869  process_empty(VectorizedArrayType &) const
870  {}
871  };
872 } // namespace internal
873 
874 
876 
877 #endif
const internal::MatrixFreeFunctions::DoFInfo & get_dof_info(const unsigned int dof_handler_index_component=0) const
unsigned int n_components() const
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:458
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:459
static ::ExceptionBase & ExcInternalError()
#define Assert(cond, exc)
Definition: exceptions.h:1501
static ::ExceptionBase & ExcNotImplemented()
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1695
static ::ExceptionBase & ExcMessage(std::string arg1)
std::string to_string(const T &t)
Definition: patterns.h:2394
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
T sum(const T &t, const MPI_Comm &mpi_communicator)
void vector_access_add(VectorType &vec, const unsigned int entry, const typename VectorType::value_type &val)
void check_vector_compatibility(const VectorType &vec, const MatrixFree< dim, Number, VectorizedArrayType > &matrix_free, const internal::MatrixFreeFunctions::DoFInfo &dof_info)
void vector_access_add_global(VectorType &vec, const types::global_dof_index entry, const typename VectorType::value_type &val)
VectorType::value_type vector_access(const VectorType &vec, const unsigned int entry)
void vector_access_set(VectorType &vec, const unsigned int entry, const typename VectorType::value_type &val)
static const unsigned int invalid_unsigned_int
Definition: types.h:206
unsigned int global_dof_index
Definition: types.h:81
std::shared_ptr< const Utilities::MPI::Partitioner > vector_partitioner
Definition: dof_info.h:596
void process_dof_gather(const unsigned int *indices, VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, true >) const
void pre_constraints(const Number &input, Number &res) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_dofs_vectorized_transpose(const unsigned int, std::array< Number2 *, VectorizedArrayType::size()> &, VectorizedArrayType *, std::integral_constant< bool, false >) const
void process_empty(VectorizedArrayType &) const
void process_dof(const unsigned int index, VectorType &vec, Number &res) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void post_constraints(const Number &, Number &) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, std::array< Number2 *, VectorizedArrayType::size()> &global_ptr, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_dof_gather(const unsigned int *indices, VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, false >) const
void process_dof(VectorNumberType &global, Number &local) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_constraint(const unsigned int index, const Number weight, VectorType &vec, Number &res) const
void process_dof_global(const types::global_dof_index index, VectorType &vec, Number &res) const
void process_dof_gather(const unsigned int *indices, VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, true >) const
void process_dof_gather(const unsigned int *indices, const VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, false >) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void pre_constraints(const Number &, Number &res) const
void post_constraints(const Number &sum, Number &write_pos) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, const VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_dof_global(const types::global_dof_index index, const VectorType &vec, Number &res) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, const VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_constraint(const unsigned int index, const Number weight, const VectorType &vec, Number &res) const
void process_dof(const VectorNumberType &global, Number &local) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const std::array< Number2 *, VectorizedArrayType::size()> &global_ptr, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_empty(VectorizedArrayType &res) const
void process_dofs_vectorized_transpose(const unsigned int, const std::array< Number2 *, VectorizedArrayType::size()> &, VectorizedArrayType *, std::integral_constant< bool, false >) const
void process_dof(const unsigned int index, const VectorType &vec, Number &res) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_empty(VectorizedArrayType &) const
void process_dofs_vectorized_transpose(const unsigned int, std::array< Number2 *, VectorizedArrayType::size()> &, VectorizedArrayType *, std::integral_constant< bool, false >) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_dof_global(const types::global_dof_index index, VectorType &vec, Number &res) const
void pre_constraints(const Number &, Number &) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, std::array< Number2 *, VectorizedArrayType::size()> &global_ptr, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_dofs_vectorized(const unsigned int dofs_per_cell, const unsigned int dof_index, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, false >) const
void process_dofs_vectorized_transpose(const unsigned int dofs_per_cell, const unsigned int *dof_indices, VectorType &vec, VectorizedArrayType *dof_values, std::integral_constant< bool, true >) const
void process_constraint(const unsigned int, const Number, VectorType &, Number &) const
void process_dof(const unsigned int index, VectorType &vec, Number &res) const
void process_dof_gather(const unsigned int *indices, VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, true >) const
void process_dof_gather(const unsigned int *indices, VectorType &vec, const unsigned int constant_offset, VectorizedArrayType &res, std::integral_constant< bool, false >) const
void post_constraints(const Number &, Number &) const
void process_dof(VectorNumberType &global, Number &local) const
void vectorized_load_and_transpose(const unsigned int n_entries, const Number *in, const unsigned int *offsets, VectorizedArray< Number, width > *out)
void vectorized_transpose_and_store(const bool add_into, const unsigned int n_entries, const VectorizedArray< Number, width > *in, const unsigned int *offsets, Number *out)