diff --git a/dune/solvers/iterationsteps/iterationstep.hh b/dune/solvers/iterationsteps/iterationstep.hh index a22cd7e64ccb10c715d8678c980f82842538d57e..1a92a17fbb9f473f16708a22d9f4a0004fbeebf0 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 }