Skip to content
Snippets Groups Projects
Commit 9489401f authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Move classes IterationStep and LoopSolver into the namespace Dune::Solvers

... and reimport them back into the global namespace.  That ensures
backward compatibility for the time being.

In the long run, we want all code in dune-solvers in that namespace,
to avoid potential name clashes.
parent c1694ae1
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -10,6 +10,10 @@
#include <dune/solvers/common/canignore.hh>
#include <dune/solvers/common/numproc.hh>
namespace Dune {
namespace Solvers {
//! Base class for iteration steps being called by an iterative solver
template<class VectorType, class BitVectorType = Dune::BitSetVector<VectorType::block_type::dimension> >
class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType>
......@@ -80,4 +84,12 @@ class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType>
VectorType* x_;
};
} // namespace Solvers
} // namespace Dune
// For backward compatibility: will be removed eventually
using Dune::Solvers::IterationStep;
#endif
......@@ -8,7 +8,7 @@
#include <dune/solvers/solvers/solver.hh>
template <class VectorType, class BitVectorType>
void ::LoopSolver<VectorType, BitVectorType>::check() const
void Dune::Solvers::LoopSolver<VectorType, BitVectorType>::check() const
{
if (!iterationStep_)
DUNE_THROW(SolverError, "You need to supply an iteration step to an iterative solver!");
......@@ -20,13 +20,13 @@ void ::LoopSolver<VectorType, BitVectorType>::check() const
}
template <class VectorType, class BitVectorType>
void ::LoopSolver<VectorType, BitVectorType>::preprocess()
void Dune::Solvers::LoopSolver<VectorType, BitVectorType>::preprocess()
{
this->iterationStep_->preprocess();
}
template <class VectorType, class BitVectorType>
void ::LoopSolver<VectorType, BitVectorType>::solve()
void Dune::Solvers::LoopSolver<VectorType, BitVectorType>::solve()
{
int i;
......
......@@ -10,6 +10,10 @@
#include <dune/solvers/common/defaultbitvector.hh>
namespace Dune {
namespace Solvers {
/** \brief A solver which consists of a single loop
*
* This class basically implements a loop that calls an iteration procedure
......@@ -101,6 +105,14 @@ protected:
int iter_;
};
} // namespace Solvers
} // namespace Dune
// For backward compatibility: will be removed eventually
using Dune::Solvers::LoopSolver;
#include "loopsolver.cc"
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment