Skip to content
Snippets Groups Projects
Commit eba49954 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Fix bug in MultigridStep constructor

One constructor contained an assignment from a C pointer to
std::shared_ptr.  Apparently nobody ever uses this constructor
(otherwise the bug would have been noticed a long time ago),
but the clang CI runs for the dune-gfe modules complain.

This patch adds a fix and a small test.
parent 5272497a
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ namespace Dune {
setSmoother(preSmoother,postSmoother);
basesolver_ = baseSolver;
basesolver_ = std::shared_ptr<Solver>(baseSolver, [](auto*){} );
this->ignoreNodes_ = ignoreNodes;
}
......
......@@ -85,6 +85,13 @@ struct MultigridTestSuite
mgStep.setIgnore(p.ignore);
mgStep.setBaseSolver(basesolver);
// create an unused second multigrid step just to check that the constructor works
MGStep alternativeStep(p.A, p.u, p.rhs,
1, 3, 3,
&smoother, &smoother,
&basesolver,
&p.ignore);
// create loop solver
Solver solver(mgStep, maxIterations, tol, p.energyNorm, Solver::FULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment