Skip to content
Snippets Groups Projects
Commit 6c408fc8 authored by Lisa Julia Nebel's avatar Lisa Julia Nebel
Browse files

Use std::make_shared to create the BaseSolver of the Trustregion Algorithm

parent 602a0fea
No related branches found
No related tags found
1 merge request!22Use DOFs from parmg in P1- and P2-Mapper
This commit is part of merge request !22. Comments created here will be created in the context of that merge request.
...@@ -78,12 +78,17 @@ setup(const GridType& grid, ...@@ -78,12 +78,17 @@ setup(const GridType& grid,
QuadraticIPOptSolver<MatrixType,CorrectionType> baseSolver; QuadraticIPOptSolver<MatrixType,CorrectionType> baseSolver;
baseSolver.setSolverParameter(baseTolerance, 100, NumProc::QUIET); baseSolver.setSolverParameter(baseTolerance, 100, NumProc::QUIET);
#else #else
// First create a Gauss-seidel base solver
auto baseSolverStep = std::make_shared<TrustRegionGSStep<MatrixType, CorrectionType>>();
// Hack: the two-norm may not scale all that well, but it is fast! // Hack: the two-norm may not scale all that well, but it is fast!
::LoopSolver<CorrectionType> baseSolver(TrustRegionGSStep<MatrixType, CorrectionType>{}, auto baseNorm = std::make_shared<TwoNorm<CorrectionType>>();
baseIterations,
baseTolerance, auto baseSolver = std::make_shared<::LoopSolver<CorrectionType>>(baseSolverStep,
TwoNorm<CorrectionType>{}, baseIterations,
Solver::QUIET); baseTolerance,
baseNorm,
Solver::QUIET);
#endif #endif
#if HAVE_MPI #if HAVE_MPI
// Transfer all Dirichlet data to the master processor // Transfer all Dirichlet data to the master processor
......
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