13#ifndef dealii_template_constraints_h
14#define dealii_template_constraints_h
41 namespace SupportsOperation
52 template <
class Default,
54 template <
class...>
class Op,
74 template <
class Default,
template <
class...>
class Op,
class... Args>
101 template <
class Default,
template <
class...>
class Op,
class... Args>
104 template <
template <
class...>
class Op,
class... Args>
107 template <
template <
class...>
class Op,
class... Args>
110 template <
class Default,
template <
class...>
class Op,
class... Args>
113 template <
class Expected,
template <
class...>
class Op,
class... Args>
116 template <
class To,
template <
class...>
class Op,
class... Args>
118 std::is_convertible<
detected_t<Op, Args...>, To>;
156 template <
template <
class...>
class Op,
class... Args>
165 namespace TemplateConstraints
175 template <
bool... Values>
178 static constexpr bool value = (Values && ...);
186 template <
bool... Values>
189 static constexpr bool value = (Values || ...);
200template <
class Base,
class... Derived>
204 std::is_base_of_v<Base, Derived>...>
::value;
215template <
typename Type,
class... Types>
219 std::is_same_v<Type, Types>...>
::value;
230template <
typename Type,
class... Types>
234 std::is_same_v<Type, Types>...>
::value;
264template <
bool... Values>
266 : std::enable_if<internal::TemplateConstraints::all_true<Values...>::value>
296template <
bool... Values>
307 decltype(std::begin(std::declval<T>()), std::end(std::declval<T>()));
311 internal::is_supported_operation<begin_and_end_t, T>;
319template <
typename ArgType,
typename ValueType>
354 template <
typename T>
368 template <
typename T,
typename U>
390 template <
typename T,
typename U>
393 using type =
decltype(std::declval<T>() * std::declval<U>());
446template <
typename T,
typename U>
460 template <
typename T>
466 template <
typename T,
typename U>
469 using type = std::complex<typename ProductType<T, U>::type>;
472 template <
typename U>
475 using type = std::complex<typename ProductType<double, U>::type>;
478 template <
typename T>
481 using type = std::complex<typename ProductType<T, double>::type>;
484 template <
typename U>
487 using type = std::complex<typename ProductType<float, U>::type>;
490 template <
typename T>
493 using type = std::complex<typename ProductType<T, float>::type>;
597template <
typename Number>
600template <
typename Number>
605 template <
typename Number>
608 namespace distributed
610 template <
typename Number,
typename MemorySpace>
613 template <
typename Number,
typename MemorySpace>
618#ifdef DEAL_II_WITH_PETSC
636#ifdef DEAL_II_WITH_TRILINOS
637# if defined(DEAL_II_TRILINOS_WITH_EPETRA)
649 namespace EpetraWrappers
656# ifdef DEAL_II_TRILINOS_WITH_TPETRA
659 namespace TpetraWrappers
661 template <
typename Number,
typename MemorySpace>
664 template <
typename Number,
typename MemorySpace>
679#if defined(DEAL_II_HAVE_CXX20) || defined(DOXYGEN)
690 template <
typename C>
706 template <
int dim,
int spacedim>
708 (dim >= 1 && spacedim <= 3 && dim <= spacedim);
718 template <
typename T>
721 template <
typename Number>
724 template <
typename Number>
728 template <
typename Number>
729 inline constexpr bool
733 template <
typename Number,
typename MemorySpace>
737 template <
typename Number,
typename MemorySpace>
742# ifdef DEAL_II_WITH_PETSC
748 inline constexpr bool
752 inline constexpr bool
756 inline constexpr bool
760# ifdef DEAL_II_WITH_TRILINOS
761# if defined(DEAL_II_TRILINOS_WITH_EPETRA)
763 inline constexpr bool
767 inline constexpr bool
771 inline constexpr bool
776# ifdef DEAL_II_TRILINOS_WITH_TPETRA
777 template <
typename Number,
typename MemorySpace>
782 template <
typename Number,
typename MemorySpace>
797 template <
typename T>
800# ifdef DEAL_II_WITH_PETSC
802 inline constexpr bool
806 inline constexpr bool
810 inline constexpr bool
814 inline constexpr bool
818 inline constexpr bool
831 template <
typename T>
834# ifdef DEAL_II_WITH_PETSC
836 inline constexpr bool
858 template <
typename VectorType>
860 internal::is_dealii_vector_type<std::remove_cv_t<VectorType>>;
871 template <
typename VectorType>
883 template <
typename VectorType>
885 internal::is_dealii_petsc_vector_type<VectorType>;
895 template <
typename VectorType>
897 internal::is_dealii_petsc_matrix_type<VectorType>;
902template <
int dim,
int spacedim>
906template <
int dim,
int spacedim>
912 namespace distributed
914 template <
int dim,
int spacedim>
920 template <
int dim,
int spacedim>
924 namespace fullydistributed
926 template <
int dim,
int spacedim>
947 template <
typename Number,
typename MemorySpace>
951 template <
typename Number,
typename MemorySpace>
956#ifdef DEAL_II_TRILINOS_WITH_EPETRA
958 inline constexpr bool
959 is_distributed_vector_type<::TrilinosWrappers::MPI::Vector> =
true;
962 inline constexpr bool
963 is_distributed_vector_type<::TrilinosWrappers::MPI::BlockVector> =
967#ifdef DEAL_II_TRILINOS_WITH_TPETRA
968 template <
typename Number,
typename MemorySpace>
973 template <
typename Number,
typename MemorySpace>
979#ifdef DEAL_II_WITH_PETSC
981 inline constexpr bool
982 is_distributed_vector_type<::PETScWrappers::MPI::Vector> =
true;
985 inline constexpr bool
986 is_distributed_vector_type<::PETScWrappers::MPI::BlockVector> =
991#if defined(DEAL_II_HAVE_CXX20) || defined(DOXYGEN)
994 template <
typename T>
997 template <
int dim,
int spacedim>
998 inline constexpr bool
1001 template <
int dim,
int spacedim>
1005 template <
int dim,
int spacedim>
1009 template <
int dim,
int spacedim>
1013 template <
int dim,
int spacedim>
1014 inline constexpr bool
1026 template <
typename MeshType>
1028 internal::is_triangulation_or_dof_handler<MeshType>;
1036 template <
typename VectorType>
1040 typename VectorType::value_type a,
1041 typename VectorType::value_type b,
1042 typename VectorType::value_type s,
1045 typename VectorType::value_type;
1046 typename VectorType::size_type;
1047 typename VectorType::real_type;
1075 { U.mean_value() } -> std::convertible_to<typename VectorType::value_type>;
1077 { U.l1_norm() } -> std::convertible_to<typename VectorType::real_type>;
1079 { U.l2_norm() } -> std::convertible_to<typename VectorType::real_type>;
1081 { U.linfty_norm() } -> std::convertible_to<typename VectorType::real_type>;
1084 { U * V } -> std::convertible_to<typename VectorType::value_type>;
1087 U.add_and_dot(a, V, W)
1088 } -> std::convertible_to<typename VectorType::value_type>;
1091 { U.size() } -> std::convertible_to<typename VectorType::size_type>;
1093 { U.all_zero() } -> std::same_as<bool>;
1095 { U.get_mpi_communicator() } -> std::same_as<MPI_Comm>;
1098 { U.compress(operation) } -> std::same_as<void>;
1110 template <
typename MatrixType,
typename VectorType>
1112 requires(
const MatrixType &A, VectorType &dst,
const VectorType &src) {
1125 template <
typename MatrixType,
typename VectorType>
1127 requires(
const MatrixType &A, VectorType &dst,
const VectorType &src) {
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
constexpr bool is_distributed_vector_type
typename detected_or< Default, Op, Args... >::type detected_or_t
std::is_convertible< detected_t< Op, Args... >, To > is_detected_convertible
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
typename detected_or< nonesuch, Op, Args... >::type detected_t
std::is_same< Expected, detected_t< Op, Args... > > is_detected_exact
constexpr bool is_supported_operation
static bool equal(const T *p1, const T *p2)
static bool equal(const T *, const U *)
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type
static constexpr bool value
ValueType operator()(const ArgType &)
std::complex< typename ProductType< double, U >::type > type
std::complex< typename ProductType< float, U >::type > type
std::complex< typename ProductType< T, double >::type > type
std::complex< typename ProductType< T, float >::type > type
std::complex< typename ProductType< T, U >::type > type
decltype(std::declval< T >() *std::declval< U >()) type
void operator=(const nonesuch &)=delete
nonesuch(const nonesuch &)=delete
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
typename enable_if_all< Values... >::type enable_if_all_t
decltype(std::begin(std::declval< T >()), std::end(std::declval< T >())) begin_and_end_t
constexpr bool has_begin_and_end