* locally owned degrees of freedom and the ghost elements correspond to the
* (additional) locally relevant dofs.
*/
+ template <typename MemorySpace>
void
initialize_dof_vector(
- LinearAlgebra::distributed::Vector<Number, MemorySpace::Default> &vec)
- const;
+ LinearAlgebra::distributed::Vector<Number, MemorySpace> &vec) const;
/**
* Return the colored graph of locally owned active cells.
template <int dim, typename Number>
+ template <typename MemorySpace>
void
MatrixFree<dim, Number>::initialize_dof_vector(
- LinearAlgebra::distributed::Vector<Number, MemorySpace::Default> &vec) const
+ LinearAlgebra::distributed::Vector<Number, MemorySpace> &vec) const
{
if (partitioner)
vec.reinit(partitioner);
DEAL_II_NAMESPACE_OPEN
-
+#ifndef DOXYGEN
namespace Portable
{
template class MatrixFree<2, double>;
template class MatrixFree<3, float>;
template class MatrixFree<3, double>;
+
+ template void
+ MatrixFree<2, float>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<float, MemorySpace::Host> &vec) const;
+ template void
+ MatrixFree<2, float>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<float, MemorySpace::Default> &vec) const;
+ template void
+ MatrixFree<2, double>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<double, MemorySpace::Host> &vec) const;
+ template void
+ MatrixFree<2, double>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<double, MemorySpace::Default> &vec)
+ const;
+ template void
+ MatrixFree<3, float>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<float, MemorySpace::Host> &vec) const;
+ template void
+ MatrixFree<3, float>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<float, MemorySpace::Default> &vec) const;
+ template void
+ MatrixFree<3, double>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<double, MemorySpace::Host> &vec) const;
+ template void
+ MatrixFree<3, double>::initialize_dof_vector(
+ LinearAlgebra::distributed::Vector<double, MemorySpace::Default> &vec)
+ const;
+
} // namespace Portable
+#endif
+
DEAL_II_NAMESPACE_CLOSE
#include "../tests.h"
-template <typename Number>
+template <typename Number, typename MemorySpace>
void
-check(const LinearAlgebra::distributed::Vector<Number, MemorySpace::Default>
- &vector,
+check(const LinearAlgebra::distributed::Vector<Number, MemorySpace> &vector,
const Utilities::MPI::Partitioner &reference_partitioner)
{
Assert(vector.get_partitioner()->locally_owned_range() ==
MPILogInitAll mpi_inilog;
+ test<2, 1, LinearAlgebra::distributed::Vector<double, MemorySpace::Host>>();
+
test<2,
1,
LinearAlgebra::distributed::Vector<double, MemorySpace::Default>>();
+DEAL:0:0::locally owned dofs :
+{[0,14]}
+DEAL:0:0::locally relevant dofs :
+{[0,17], [21,22]}
+DEAL:0:0::OK
DEAL:0:0::locally owned dofs :
{[0,14]}
DEAL:0:0::locally relevant dofs :
DEAL:1:1::locally relevant dofs :
{[2,3], [5,8], 10, [12,24]}
DEAL:1:1::OK
+DEAL:1:1::locally owned dofs :
+{[15,24]}
+DEAL:1:1::locally relevant dofs :
+{[2,3], [5,8], 10, [12,24]}
+DEAL:1:1::OK
+++ /dev/null
-
-DEAL:0:0::locally owned dofs :
-{[0,24]}
-DEAL:0:0::locally relevant dofs :
-{[0,24]}
-DEAL:0:0::OK