|
@ -130,29 +130,41 @@ namespace storm { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else { |
|
|
} else { |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
Eigen::BiCGSTAB<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} |
|
|
} |
|
|
} else if (solutionMethod == EigenLinearEquationSolverSettings<ValueType>::SolutionMethod::DGMRES) { |
|
|
} else if (solutionMethod == EigenLinearEquationSolverSettings<ValueType>::SolutionMethod::DGMRES) { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else { |
|
|
} else { |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
Eigen::DGMRES<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
@ -160,16 +172,22 @@ namespace storm { |
|
|
} else if (solutionMethod == EigenLinearEquationSolverSettings<ValueType>::SolutionMethod::GMRES) { |
|
|
} else if (solutionMethod == EigenLinearEquationSolverSettings<ValueType>::SolutionMethod::GMRES) { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Ilu) { |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::IncompleteLUT<ValueType>> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
} else if (preconditioner == EigenLinearEquationSolverSettings<ValueType>::Preconditioner::Diagonal) { |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::DiagonalPreconditioner<ValueType>> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
} else { |
|
|
} else { |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
Eigen::GMRES<Eigen::SparseMatrix<ValueType>, Eigen::IdentityPreconditioner> solver; |
|
|
|
|
|
solver.setTolerance(this->getSettings().getPrecision()); |
|
|
|
|
|
solver.setMaxIterations(this->getSettings().getMaximalNumberOfIterations()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.set_restart(this->getSettings().getNumberOfIterationsUntilRestart()); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.compute(*this->eigenA); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|
solver.solveWithGuess(eigenB, eigenX); |
|
|