Skip to content
Snippets Groups Projects
Commit 98246252 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

Use IPOpt as the base solver if it is available

[[Imported from SVN: r7960]]
parent 60b59c65
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,13 @@ setup(const GridType& grid,
// Create a multigrid solver
// ////////////////////////////////
#ifdef HAVE_IPOPT
// First create an IPOpt base solver
QuadraticIPOptSolver<MatrixType, CorrectionType>* baseSolver = new QuadraticIPOptSolver<MatrixType,CorrectionType>;
baseSolver->verbosity_ = NumProc::QUIET;
baseSolver->tolerance_ = baseTolerance;
#else
#warning IPOpt not installed -- falling back onto a Gauss-Seidel base solver
// First create a Gauss-seidel base solver
TrustRegionGSStep<MatrixType, CorrectionType>* baseSolverStep = new TrustRegionGSStep<MatrixType, CorrectionType>;
......@@ -72,7 +79,8 @@ setup(const GridType& grid,
baseTolerance,
baseEnergyNorm,
Solver::QUIET);
#endif
// Make pre and postsmoothers
TrustRegionGSStep<MatrixType, CorrectionType>* presmoother = new TrustRegionGSStep<MatrixType, CorrectionType>;
TrustRegionGSStep<MatrixType, CorrectionType>* postsmoother = new TrustRegionGSStep<MatrixType, CorrectionType>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment