}
}
+namespace internal
+{
+ namespace LinearOperator
+ {
+ template <typename> class ReinitHelper;
+
+ /**
+ * A helper class internally used in linear_operator.h. Specialization for
+ * TrilinosWrappers::MPI::Vector.
+ */
+ template<>
+ class ReinitHelper<PETScWrappers::MPI::Vector>
+ {
+ public:
+ template <typename Matrix>
+ static
+ void reinit_range_vector (const Matrix &matrix,
+ PETScWrappers::MPI::Vector &v,
+ bool omit_zeroing_entries)
+ {
+ v.reinit(matrix.locally_owned_range_indices(), matrix.get_mpi_communicator());
+ }
+
+ template <typename Matrix>
+ static
+ void reinit_domain_vector(const Matrix &matrix,
+ PETScWrappers::MPI::Vector &v,
+ bool omit_zeroing_entries)
+ {
+ v.reinit(matrix.locally_owned_domain_indices(), matrix.get_mpi_communicator());
+ }
+ };
+
+ } /* namespace LinearOperator */
+} /* namespace internal */
+
/**@}*/
DEAL_II_NAMESPACE_CLOSE
}
+namespace internal
+{
+ namespace LinearOperator
+ {
+ template <typename> class ReinitHelper;
+
+ /**
+ * A helper class internally used in linear_operator.h. Specialization for
+ * PETScWrappers::Vector.
+ */
+ template<>
+ class ReinitHelper<PETScWrappers::Vector>
+ {
+ public:
+ template <typename Matrix>
+ static
+ void reinit_range_vector (const Matrix &matrix,
+ PETScWrappers::Vector &v,
+ bool omit_zeroing_entries)
+ {
+ v.reinit( matrix.m(),
+ omit_zeroing_entries);
+ }
+
+ template <typename Matrix>
+ static
+ void reinit_domain_vector(const Matrix &matrix,
+ PETScWrappers::Vector &v,
+ bool omit_zeroing_entries)
+ {
+ v.reinit( matrix.n(),
+ omit_zeroing_entries);
+ }
+ };
+
+ } /* namespace LinearOperator */
+} /* namespace internal */
+
DEAL_II_NAMESPACE_CLOSE
#endif // DEAL_II_WITH_PETSC