diff --git a/src/solver/EigenLinearEquationSolver.cpp b/src/solver/EigenLinearEquationSolver.cpp index 995ea2612..9dbeae8c8 100644 --- a/src/solver/EigenLinearEquationSolver.cpp +++ b/src/solver/EigenLinearEquationSolver.cpp @@ -130,29 +130,41 @@ namespace storm { if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Ilu) { Eigen::BiCGSTAB, Eigen::IncompleteLUT> solver; solver.compute(*this->eigenA); + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.solveWithGuess(eigenB, eigenX); } else if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Diagonal) { Eigen::BiCGSTAB, Eigen::DiagonalPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } else { Eigen::BiCGSTAB, Eigen::IdentityPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } } else if (solutionMethod == EigenLinearEquationSolverSettings::SolutionMethod::DGMRES) { if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Ilu) { Eigen::DGMRES, Eigen::IncompleteLUT> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } else if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Diagonal) { Eigen::DGMRES, Eigen::DiagonalPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } else { Eigen::DGMRES, Eigen::IdentityPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); @@ -160,16 +172,22 @@ namespace storm { } else if (solutionMethod == EigenLinearEquationSolverSettings::SolutionMethod::GMRES) { if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Ilu) { Eigen::GMRES, Eigen::IncompleteLUT> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } else if (preconditioner == EigenLinearEquationSolverSettings::Preconditioner::Diagonal) { Eigen::GMRES, Eigen::DiagonalPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX); } else { Eigen::GMRES, Eigen::IdentityPreconditioner> solver; + solver.setTolerance(this->getSettings().getPrecision()); + solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); solver.compute(*this->eigenA); solver.solveWithGuess(eigenB, eigenX);