struct is_vectorizable
{
static constexpr bool value =
- has_begin<T>::value && has_local_element<T>::value &&
+ has_begin<T>::value &&
+ (has_local_element<T>::value || is_serial_vector<T>::value) &&
std::is_same<typename T::value_type, Number>::value;
};
<< "Dummy = " << internal::has_local_element<Dummy<double>>::value
<< std::endl
<< "Dummy2 = " << internal::has_local_element<Dummy2<double>>::value
+ << std::endl
+ << "Vector = " << internal::has_local_element<Vector<double>>::value
<< std::endl;
// now check internal::vector_access wrapper
<< "TrilinosWrappers::MPI::Vector = "
<< internal::has_partitioners_are_compatible<
TrilinosWrappers::MPI::Vector>::value
+ << std::endl
+ << "Vector = "
+ << internal::has_partitioners_are_compatible<Vector<double>>::value
<< std::endl;
// check has_begin:
<< internal::has_begin<LinearAlgebra::distributed::Vector<double>>::value
<< std::endl
<< "TrilinosWrappers::MPI::Vector = "
- << internal::has_begin<TrilinosWrappers::MPI::Vector>::value << std::endl;
+ << internal::has_begin<TrilinosWrappers::MPI::Vector>::value << std::endl
+ << "Vector = " << internal::has_begin<Vector<double>>::value << std::endl;
// check is_vectorizable:
deallog
<< "is_vectorizable:" << std::endl
<< std::endl
<< "TrilinosWrappers::MPI::Vector && double = "
<< internal::is_vectorizable<TrilinosWrappers::MPI::Vector, double>::value
+ << std::endl
+ << "Vector = " << internal::is_vectorizable<Vector<double>, double>::value
<< std::endl;
deallog << "OK" << std::endl;
DEAL::TrilinosWrappers::MPI::Vector = 0
DEAL::Dummy = 1
DEAL::Dummy2 = 0
+DEAL::Vector = 0
DEAL::internal::vector_access:
DEAL::Dummy::local_element()
DEAL::Dummy2::operator()
DEAL::has_partitioners_are_compatible:
DEAL::LinearAlgebra::distributed::Vector = 1
DEAL::TrilinosWrappers::MPI::Vector = 0
+DEAL::Vector = 0
DEAL::has_begin:
DEAL::LinearAlgebra::distributed::Vector = 1
DEAL::TrilinosWrappers::MPI::Vector = 1
+DEAL::Vector = 1
DEAL::is_vectorizable:
DEAL::LinearAlgebra::distributed::Vector<double> && double = 1
DEAL::LinearAlgebra::distributed::Vector<double> && float = 0
DEAL::TrilinosWrappers::MPI::Vector && double = 0
+DEAL::Vector = 1
DEAL::OK