Commit 5692afc9 authored by Timo Koch's avatar Timo Koch
Browse files

[amg] Make it possible to reset first call

parent 477abe60
......@@ -64,10 +64,11 @@ public:
AMGBiCGSTABBackend(const std::string& paramGroup = "")
: LinearSolver(paramGroup)
, isParallel_(Dune::MPIHelper::getCollectiveCommunication().size() > 1)
, firstCall_(true)
{
if (isParallel_)
DUNE_THROW(Dune::InvalidStateException, "Using sequential constructor for parallel run. Use signature with gridView and dofMapper!");
reset();
}
/*!
......@@ -83,8 +84,9 @@ public:
: LinearSolver(paramGroup)
, phelper_(std::make_shared<ParallelISTLHelper<LinearSolverTraits>>(gridView, dofMapper))
, isParallel_(Dune::MPIHelper::getCollectiveCommunication().size() > 1)
, firstCall_(true)
{}
{
reset();
}
/*!
* \brief Solve a linear system.
......@@ -105,6 +107,12 @@ public:
return result_.converged;
}
//! reset the linear solver
void reset()
{
firstCall_ = true;
}
/*!
* \brief The name of the solver
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment