Skip to content
Snippets Groups Projects
Commit 3826ae18 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Fix typedefs and rename member x_ to iterate_

parent 7f843505
No related branches found
No related tags found
No related merge requests found
...@@ -18,9 +18,10 @@ namespace Solvers { ...@@ -18,9 +18,10 @@ namespace Solvers {
template<class VectorType, class BitVectorType = Dune::BitSetVector<VectorType::block_type::dimension> > template<class VectorType, class BitVectorType = Dune::BitSetVector<VectorType::block_type::dimension> >
class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType> class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType>
{ {
typedef CanIgnore<BitVectorType> Base;
public: public:
typedef VectorType::Vector; typedef VectorType Vector;
typedef BitVectorType::BitVector; typedef BitVectorType BitVector;
//! Default constructor //! Default constructor
IterationStep() IterationStep()
...@@ -30,28 +31,31 @@ namespace Solvers { ...@@ -30,28 +31,31 @@ namespace Solvers {
virtual ~IterationStep() {} virtual ~IterationStep() {}
//! Constructor being given the current iterate //! Constructor being given the current iterate
IterationStep(Vector& x) : IterationStep(Vector& iterate) :
x_(Dune::stackobject_to_shared_ptr(x)) iterate_(Dune::stackobject_to_shared_ptr(iterate))
{} {}
//! Constructor being given the current iterate //! Constructor being given the current iterate
IterationStep(std::shared_ptr<Vector> x) : IterationStep(std::shared_ptr<Vector> iterate) :
x_(x) iterate_(iterate)
{} {}
using Base::getIgnore;
using Base::setIgnore;
//! Set the current iterate //! Set the current iterate
virtual void setIterate(std::shared_ptr<Vector> x) { virtual void setIterate(std::shared_ptr<Vector> x) {
x_ = x; iterate_ = x;
} }
//! Set the current iterate //! Set the current iterate
virtual const std::shared_ptr<Vector> getIterate() const { virtual const std::shared_ptr<Vector> getIterate() const {
retrun x_; return iterate_;
} }
//! Set the current iterate //! Set the current iterate
virtual std::shared_ptr<Vector> getIterate() { virtual std::shared_ptr<Vector> getIterate() {
retrun x_; return iterate_;
} }
//! to be called before iteration //! to be called before iteration
...@@ -65,7 +69,7 @@ namespace Solvers { ...@@ -65,7 +69,7 @@ namespace Solvers {
*/ */
virtual void check() const { virtual void check() const {
#if 0 #if 0
if (!x_) if (!iterate_)
DUNE_THROW(SolverError, "Iteration step has no solution vector"); DUNE_THROW(SolverError, "Iteration step has no solution vector");
#endif #endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment