From 7768b162e0e38a4f1759a79f8052c50ec0740c29 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 3 Jun 2017 18:56:48 +0200 Subject: [PATCH] Fix up trilinos_precondition.h --- include/deal.II/lac/trilinos_precondition.h | 26 ++++++++++----------- include/deal.II/lac/trilinos_vector.h | 6 +---- include/deal.II/lac/trilinos_vector_base.h | 5 +++- source/lac/trilinos_precondition.cc | 8 +++---- source/lac/trilinos_solver.cc | 2 +- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/include/deal.II/lac/trilinos_precondition.h b/include/deal.II/lac/trilinos_precondition.h index 0822c5b9b8..1bec3c5c73 100644 --- a/include/deal.II/lac/trilinos_precondition.h +++ b/include/deal.II/lac/trilinos_precondition.h @@ -23,7 +23,7 @@ # include -# include +# include # include # include @@ -133,14 +133,14 @@ namespace TrilinosWrappers /** * Apply the preconditioner. */ - virtual void vmult (VectorBase &dst, - const VectorBase &src) const; + virtual void vmult (MPI::Vector &dst, + const MPI::Vector &src) const; /** * Apply the transpose preconditioner. */ - virtual void Tvmult (VectorBase &dst, - const VectorBase &src) const; + virtual void Tvmult (MPI::Vector &dst, + const MPI::Vector &src) const; /** * Apply the preconditioner on deal.II data structures instead of the ones @@ -1877,14 +1877,14 @@ namespace TrilinosWrappers /** * Apply the preconditioner, i.e., dst = src. */ - void vmult (VectorBase &dst, - const VectorBase &src) const; + void vmult (MPI::Vector &dst, + const MPI::Vector &src) const; /** * Apply the transport conditioner, i.e., dst = src. */ - void Tvmult (VectorBase &dst, - const VectorBase &src) const; + void Tvmult (MPI::Vector &dst, + const MPI::Vector &src) const; /** * Apply the preconditioner on deal.II data structures instead of the ones @@ -1950,8 +1950,8 @@ namespace TrilinosWrappers inline void - PreconditionBase::vmult (VectorBase &dst, - const VectorBase &src) const + PreconditionBase::vmult (MPI::Vector &dst, + const MPI::Vector &src) const { Assert (dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()), ExcNonMatchingMaps("dst")); @@ -1965,8 +1965,8 @@ namespace TrilinosWrappers inline void - PreconditionBase::Tvmult (VectorBase &dst, - const VectorBase &src) const + PreconditionBase::Tvmult (MPI::Vector &dst, + const MPI::Vector &src) const { Assert (dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()), ExcNonMatchingMaps("dst")); diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index da0ef5bc05..1d9ede0a62 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -226,9 +226,7 @@ namespace TrilinosWrappers * The Epetra_FEVector is precisely the kind of vector * we deal with all the time - we probably get it from some assembly * process, where also entries not locally owned might need to written and - * hence need to be forwarded to the owner. The only requirement for this - * class to work is that Trilinos is installed with the same compiler as is - * used for compilation of deal.II. + * hence need to be forwarded to the owner. * * The interface of this class is modeled after the existing Vector class in * deal.II. It has almost the same member functions, and is often @@ -1232,8 +1230,6 @@ namespace TrilinosWrappers * Make the reference class a friend. */ friend class internal::VectorReference; - friend class Vector; - friend class MPI::Vector; }; diff --git a/include/deal.II/lac/trilinos_vector_base.h b/include/deal.II/lac/trilinos_vector_base.h index 10b5f44f6b..2427f3a5f0 100644 --- a/include/deal.II/lac/trilinos_vector_base.h +++ b/include/deal.II/lac/trilinos_vector_base.h @@ -16,6 +16,9 @@ #ifndef dealii__trilinos_vector_base_h #define dealii__trilinos_vector_base_h +#warning This file is deprecated. Use instead. + +#include #include DEAL_II_NAMESPACE_OPEN @@ -27,7 +30,7 @@ namespace TrilinosWrappers // MPI::Vector as this ended up to be the only derived class. // Hence, using the class VectorBase is deprecated and we only provide // an alias for backward compatibility. - using VectorBase = MPI::Vector; + typedef MPI::Vector VectorBase DEAL_II_DEPRECATED; } #endif diff --git a/source/lac/trilinos_precondition.cc b/source/lac/trilinos_precondition.cc index 28564d6b87..f0dfb4f38e 100644 --- a/source/lac/trilinos_precondition.cc +++ b/source/lac/trilinos_precondition.cc @@ -749,15 +749,15 @@ namespace TrilinosWrappers } void - PreconditionIdentity::vmult(VectorBase &dst, - const VectorBase &src) const + PreconditionIdentity::vmult(MPI::Vector &dst, + const MPI::Vector &src) const { dst = src; } void - PreconditionIdentity::Tvmult(VectorBase &dst, - const VectorBase &src) const + PreconditionIdentity::Tvmult(MPI::Vector &dst, + const MPI::Vector &src) const { dst = src; } diff --git a/source/lac/trilinos_solver.cc b/source/lac/trilinos_solver.cc index 297d6bbead..672398447f 100644 --- a/source/lac/trilinos_solver.cc +++ b/source/lac/trilinos_solver.cc @@ -19,7 +19,7 @@ # include # include -# include +# include # include DEAL_II_DISABLE_EXTRA_DIAGNOSTICS -- 2.39.5