From 3826ae189e115de1df1d21454a383f8a1106a116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org> Date: Wed, 24 Sep 2014 16:06:44 +0200 Subject: [PATCH] Fix typedefs and rename member x_ to iterate_ --- dune/solvers/iterationsteps/iterationstep.hh | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/dune/solvers/iterationsteps/iterationstep.hh b/dune/solvers/iterationsteps/iterationstep.hh index a22cd7e6..1a92a17f 100644 --- a/dune/solvers/iterationsteps/iterationstep.hh +++ b/dune/solvers/iterationsteps/iterationstep.hh @@ -18,9 +18,10 @@ namespace Solvers { template<class VectorType, class BitVectorType = Dune::BitSetVector<VectorType::block_type::dimension> > class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType> { + typedef CanIgnore<BitVectorType> Base; public: - typedef VectorType::Vector; - typedef BitVectorType::BitVector; + typedef VectorType Vector; + typedef BitVectorType BitVector; //! Default constructor IterationStep() @@ -30,28 +31,31 @@ namespace Solvers { virtual ~IterationStep() {} //! Constructor being given the current iterate - IterationStep(Vector& x) : - x_(Dune::stackobject_to_shared_ptr(x)) + IterationStep(Vector& iterate) : + iterate_(Dune::stackobject_to_shared_ptr(iterate)) {} //! Constructor being given the current iterate - IterationStep(std::shared_ptr<Vector> x) : - x_(x) + IterationStep(std::shared_ptr<Vector> iterate) : + iterate_(iterate) {} + using Base::getIgnore; + using Base::setIgnore; + //! Set the current iterate virtual void setIterate(std::shared_ptr<Vector> x) { - x_ = x; + iterate_ = x; } //! Set the current iterate virtual const std::shared_ptr<Vector> getIterate() const { - retrun x_; + return iterate_; } //! Set the current iterate virtual std::shared_ptr<Vector> getIterate() { - retrun x_; + return iterate_; } //! to be called before iteration @@ -65,7 +69,7 @@ namespace Solvers { */ virtual void check() const { #if 0 - if (!x_) + if (!iterate_) DUNE_THROW(SolverError, "Iteration step has no solution vector"); #endif } -- GitLab