Reference documentation for deal.II version 9.3.2
\(\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\}}\)
evaluation_template_factory.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2020 - 2021 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_evaluation_template_factory_h
18 #define dealii_matrix_free_evaluation_template_factory_h
19 
20 
21 #include <deal.II/base/config.h>
22 
26 
27 
29 
30 
31 template <int, typename, bool, typename>
33 
34 
35 namespace internal
36 {
37  template <int dim,
38  typename Number,
39  typename VectorizedArrayType = VectorizedArray<Number>>
41  {
42  static void
44  const unsigned int n_components,
45  const EvaluationFlags::EvaluationFlags evaluation_flag,
47  VectorizedArrayType *values_dofs_actual,
48  VectorizedArrayType *values_quad,
49  VectorizedArrayType *gradients_quad,
50  VectorizedArrayType *hessians_quad,
51  VectorizedArrayType *scratch_data);
52 
53  static void
55  const unsigned int n_components,
56  const EvaluationFlags::EvaluationFlags integration_flag,
58  VectorizedArrayType *values_dofs_actual,
59  VectorizedArrayType *values_quad,
60  VectorizedArrayType *gradients_quad,
61  VectorizedArrayType *scratch_data,
62  const bool sum_into_values_array);
63 
64  static bool
65  fast_evaluation_supported(const unsigned int given_degree,
66  const unsigned int n_q_points_1d);
67  };
68 
69 
70 
71  template <int dim,
72  typename Number,
73  typename VectorizedArrayType = VectorizedArray<Number>>
75  {
76  static void
77  evaluate(const unsigned int n_components,
79  const VectorizedArrayType * values_array,
80  VectorizedArrayType * values_quad,
81  VectorizedArrayType * gradients_quad,
82  VectorizedArrayType * scratch_data,
83  const bool evaluate_values,
84  const bool evaluate_gradients,
85  const unsigned int face_no,
86  const unsigned int subface_index,
87  const unsigned int face_orientation,
88  const Table<2, unsigned int> &orientation_map);
89 
90  static void
91  integrate(const unsigned int n_components,
93  VectorizedArrayType * values_array,
94  VectorizedArrayType * values_quad,
95  VectorizedArrayType * gradients_quad,
96  VectorizedArrayType * scratch_data,
97  const bool integrate_values,
98  const bool integrate_gradients,
99  const unsigned int face_no,
100  const unsigned int subface_index,
101  const unsigned int face_orientation,
102  const Table<2, unsigned int> &orientation_map);
103 
104  static bool
106  const unsigned int n_components,
107  const std::size_t n_face_orientations,
108  const Number * src_ptr,
109  const std::vector<ArrayView<const Number>> *sm_ptr,
111  const MatrixFreeFunctions::DoFInfo & dof_info,
112  VectorizedArrayType * values_quad,
113  VectorizedArrayType * gradients_quad,
114  VectorizedArrayType * scratch_data,
115  const bool evaluate_values,
116  const bool evaluate_gradients,
117  const unsigned int active_fe_index,
118  const unsigned int first_selected_component,
119  const std::array<unsigned int, VectorizedArrayType::size()> cells,
120  const std::array<unsigned int, VectorizedArrayType::size()> face_nos,
121  const unsigned int subface_index,
122  const MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index,
123  const std::array<unsigned int, VectorizedArrayType::size()>
124  face_orientations,
125  const Table<2, unsigned int> &orientation_map);
126 
127  static bool
129  const unsigned int n_components,
130  const std::size_t n_face_orientations,
131  Number * dst_ptr,
132  const std::vector<ArrayView<const Number>> *sm_ptr,
134  const MatrixFreeFunctions::DoFInfo & dof_info,
135  VectorizedArrayType * values_array,
136  VectorizedArrayType * values_quad,
137  VectorizedArrayType * gradients_quad,
138  VectorizedArrayType * scratch_data,
139  const bool integrate_values,
140  const bool integrate_gradients,
141  const unsigned int active_fe_index,
142  const unsigned int first_selected_component,
143  const std::array<unsigned int, VectorizedArrayType::size()> cells,
144  const std::array<unsigned int, VectorizedArrayType::size()> face_nos,
145  const unsigned int subface_index,
146  const MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index,
147  const std::array<unsigned int, VectorizedArrayType::size()>
148  face_orientations,
149  const Table<2, unsigned int> &orientation_map);
150 
151  static bool
152  fast_evaluation_supported(const unsigned int given_degree,
153  const unsigned int n_q_points_1d);
154  };
155 
156 
157 
158  template <int dim,
159  typename Number,
160  typename VectorizedArrayType = VectorizedArray<Number>>
162  {
163  static void
164  apply(const unsigned int n_components,
165  const unsigned int fe_degree,
167  & fe_eval,
168  const VectorizedArrayType *in_array,
169  VectorizedArrayType * out_array);
170 
171  static void
172  apply(const unsigned int n_components,
173  const unsigned int fe_degree,
174  const AlignedVector<VectorizedArrayType> &inverse_shape,
175  const AlignedVector<VectorizedArrayType> &inverse_coefficients,
176  const VectorizedArrayType * in_array,
177  VectorizedArrayType * out_array);
178 
179  static void
181  const unsigned int n_components,
182  const unsigned int fe_degree,
183  const AlignedVector<VectorizedArrayType> &inverse_shape,
184  const VectorizedArrayType * in_array,
185  VectorizedArrayType * out_array);
186  };
187 
188 } // end of namespace internal
189 
191 
192 #endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:396
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:397
EvaluationFlags
The EvaluationFlags enum.
static void transform_from_q_points_to_basis(const unsigned int n_components, const unsigned int fe_degree, const AlignedVector< VectorizedArrayType > &inverse_shape, const VectorizedArrayType *in_array, VectorizedArrayType *out_array)
static void apply(const unsigned int n_components, const unsigned int fe_degree, const FEEvaluationBaseData< dim, Number, false, VectorizedArrayType > &fe_eval, const VectorizedArrayType *in_array, VectorizedArrayType *out_array)
static void apply(const unsigned int n_components, const unsigned int fe_degree, const AlignedVector< VectorizedArrayType > &inverse_shape, const AlignedVector< VectorizedArrayType > &inverse_coefficients, const VectorizedArrayType *in_array, VectorizedArrayType *out_array)
static bool fast_evaluation_supported(const unsigned int given_degree, const unsigned int n_q_points_1d)
static void evaluate(const unsigned int n_components, const EvaluationFlags::EvaluationFlags evaluation_flag, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &shape_info, VectorizedArrayType *values_dofs_actual, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *hessians_quad, VectorizedArrayType *scratch_data)
static void integrate(const unsigned int n_components, const EvaluationFlags::EvaluationFlags integration_flag, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &shape_info, VectorizedArrayType *values_dofs_actual, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *scratch_data, const bool sum_into_values_array)
static bool integrate_scatter(const unsigned int n_components, const std::size_t n_face_orientations, Number *dst_ptr, const std::vector< ArrayView< const Number >> *sm_ptr, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &data, const MatrixFreeFunctions::DoFInfo &dof_info, VectorizedArrayType *values_array, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *scratch_data, const bool integrate_values, const bool integrate_gradients, const unsigned int active_fe_index, const unsigned int first_selected_component, const std::array< unsigned int, VectorizedArrayType::size()> cells, const std::array< unsigned int, VectorizedArrayType::size()> face_nos, const unsigned int subface_index, const MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index, const std::array< unsigned int, VectorizedArrayType::size()> face_orientations, const Table< 2, unsigned int > &orientation_map)
static bool fast_evaluation_supported(const unsigned int given_degree, const unsigned int n_q_points_1d)
static bool gather_evaluate(const unsigned int n_components, const std::size_t n_face_orientations, const Number *src_ptr, const std::vector< ArrayView< const Number >> *sm_ptr, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &data, const MatrixFreeFunctions::DoFInfo &dof_info, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *scratch_data, const bool evaluate_values, const bool evaluate_gradients, const unsigned int active_fe_index, const unsigned int first_selected_component, const std::array< unsigned int, VectorizedArrayType::size()> cells, const std::array< unsigned int, VectorizedArrayType::size()> face_nos, const unsigned int subface_index, const MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index, const std::array< unsigned int, VectorizedArrayType::size()> face_orientations, const Table< 2, unsigned int > &orientation_map)
static void evaluate(const unsigned int n_components, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &data, const VectorizedArrayType *values_array, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *scratch_data, const bool evaluate_values, const bool evaluate_gradients, const unsigned int face_no, const unsigned int subface_index, const unsigned int face_orientation, const Table< 2, unsigned int > &orientation_map)
static void integrate(const unsigned int n_components, const MatrixFreeFunctions::ShapeInfo< VectorizedArrayType > &data, VectorizedArrayType *values_array, VectorizedArrayType *values_quad, VectorizedArrayType *gradients_quad, VectorizedArrayType *scratch_data, const bool integrate_values, const bool integrate_gradients, const unsigned int face_no, const unsigned int subface_index, const unsigned int face_orientation, const Table< 2, unsigned int > &orientation_map)