1 #ifndef DUNE_PDELAB_BACKEND_INTERFACE_HH 2 #define DUNE_PDELAB_BACKEND_INTERFACE_HH 7 #include <dune/common/deprecated.hh> 19 template<
typename Backend,
typename Gr
idFunctionSpace,
typename FieldType>
20 struct BackendVectorSelectorHelper
23 template<
typename Gr
idFunctionSpace,
typename FieldType>
24 struct BackendVectorSelector
27 typedef typename BackendVectorSelectorHelper<Backend, GridFunctionSpace, FieldType>::Type Type;
30 template<
typename Backend,
typename VU,
typename VV,
typename E>
31 struct BackendMatrixSelector
33 typedef typename Backend::template MatrixHelper<VV,VU,E>::type Type;
53 template<
typename NativeContainer>
58 using native_type = NativeContainer;
61 static auto access_native(U&& u) -> decltype(u.native())
71 "u.native() must return a cv-qualified xvalue of type T" 83 template<
typename Gr
idFunctionSpace,
typename FieldType>
84 using BackendVectorSelector DUNE_DEPRECATED_MSG(
"Direct usage of BackendVectorSelector is deprecated and will be disabled after PDELab 2.4, use Dune::PDELab::Backend::Vector instead") = Backend::impl::BackendVectorSelector<GridFunctionSpace,FieldType>;
86 template<
typename Backend_,
typename VU,
typename VV,
typename E>
87 using BackendMatrixSelector DUNE_DEPRECATED_MSG(
"Direct usage of BackendMatrixSelector is deprecated and will be disabled after PDELab 2.4, use Dune::PDELab::Backend::Matrix instead") = Backend::impl::BackendMatrixSelector<Backend_,VU,VV,E>;
112 template<
typename Gr
idFunctionSpace,
typename FieldType>
113 using Vector =
typename impl::BackendVectorSelector<GridFunctionSpace, FieldType>::Type;
133 template<
typename Backend,
typename VU,
typename VV,
typename E>
134 using Matrix =
typename impl::BackendMatrixSelector<Backend, VU, VV, E>::Type;
161 struct lazy_native_type
167 using type =
typename U::native_type;
172 using type =
typename std::conditional<
176 >::type::template evaluate<T>::type;
183 using Native =
typename native_type<T>::type;
195 typename std::enable_if<
201 return impl::Wrapper<Native<T>>::access_native(t);
206 typename std::enable_if<
207 std::is_base_of<impl::WrapperBase,T>::value,
212 return impl::Wrapper<Native<T>>::access_native(t);
217 typename std::enable_if<
218 !std::is_base_of<impl::WrapperBase,typename std::decay<T>::type>
::value,
219 decltype(std::forward<T>(std::declval<T&&>()))
223 return std::forward<T>(t);
232 #endif // DUNE_PDELAB_BACKEND_INTERFACE_HH std::enable_if< std::is_base_of< impl::WrapperBase, T >::value, Native< T > & >::type native(T &t)
Definition: backend/interface.hh:199
typename impl::BackendMatrixSelector< Backend, VU, VV, E >::Type Matrix
alias of the return type of BackendMatrixSelector
Definition: backend/interface.hh:134
static const unsigned int value
Definition: gridfunctionspace/tags.hh:177
typename native_type< T >::type Native
Alias of the native container type associated with T or T itself if it is not a backend wrapper...
Definition: backend/interface.hh:183
Definition: adaptivity.hh:27
typename impl::BackendVectorSelector< GridFunctionSpace, FieldType >::Type Vector
alias of the return type of BackendVectorSelector
Definition: backend/interface.hh:113
B Backend
Definition: gridfunctionspace.hh:121