16#ifndef dealii_matrix_free_type_traits_h
17#define dealii_matrix_free_type_traits_h
41 using local_element_t =
decltype(std::declval<const T>().local_element(0));
51 using add_local_element_t =
52 decltype(std::declval<T>().add_local_element(0,
typename T::value_type()));
55 constexpr bool has_add_local_element =
63 using set_local_element_t =
64 decltype(std::declval<T>().set_local_element(0,
typename T::value_type()));
67 constexpr bool has_set_local_element =
75 using partitioners_are_compatible_t =
76 decltype(std::declval<const T>().partitioners_are_compatible(
77 std::declval<Utilities::MPI::Partitioner>()));
80 constexpr bool has_partitioners_are_compatible =
88 using begin_t =
decltype(std::declval<const T>().begin());
98 using shared_vector_data_t =
99 decltype(std::declval<const T>().shared_vector_data());
101 template <
typename T>
102 constexpr bool has_shared_vector_data =
117 template <
typename T>
118 using update_ghost_values_start_t =
119 decltype(std::declval<const T>().update_ghost_values_start(0));
121 template <
typename T>
122 constexpr bool has_update_ghost_values_start =
129 template <
typename T>
130 using compress_start_t =
133 template <
typename T>
134 constexpr bool has_compress_start =
143 template <
typename T>
144 constexpr bool has_exchange_on_subset =
145 has_begin<T> && has_local_element<T> && has_partitioners_are_compatible<T>;
151 template <
typename T>
152 using assignment_operator_t =
153 decltype(std::declval<T>().operator=(
typename T::value_type()));
155 template <
typename T>
156 constexpr bool has_assignment_operator =
163 template <
typename T>
164 using communication_block_size_t =
decltype(T::communication_block_size);
166 template <
typename T>
167 constexpr bool has_communication_block_size =
175 template <
typename VectorType>
176 using is_vector_type =
decltype(is_serial_vector<VectorType>::value);
182 template <
typename VectorType>
183 using is_serial_vector_type =
184 decltype(std::enable_if_t<is_serial_vector<VectorType>::value,
int>());
191 template <
typename VectorType>
192 constexpr bool is_not_parallel_vector =
202 template <
typename VectorType>
203 struct is_serial_vector_or_array
205 static const bool value =
206 is_supported_operation<is_serial_vector_type, VectorType>;
213 template <
typename Number>
214 struct is_serial_vector_or_array<::ArrayView<Number>>
216 static const bool value =
true;
220 template <
typename VectorType>
221 const bool is_serial_vector_or_array<VectorType>::value;
230 template <
typename T,
typename Number>
231 struct is_vectorizable
233 static const bool value =
235 (has_local_element<T> || is_serial_vector_or_array<T>::value) &&
236 std::is_same_v<typename T::value_type, Number>;
240 template <
typename T,
typename Number>
241 const bool is_vectorizable<T, Number>::value;
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
const bool IsBlockVector< VectorType >::value
constexpr bool is_supported_operation