Skip to content

Make apply<forward> work with BlockPreconditioner and NonoverlappingBlockPreconditioner

Summary

Implement apply<forward> for NonoverlappingBlockPreconditioner and replace stored pointer with concrete type to allow the call to this non-virtual function.

Details

The method apply<forward>() is added for some preconditioners to allow to distinguish between forward and backward application. This is not part of the virtual interface in Preconditioner, so needs a concrete type to be called. The function was missing in the NonoverlappingBlockPreconditioner that wraps another preconditioner.

For both block preconditioners, the function apply<forward>() is called on the abstract base class Preconditioner that does not have this method. So, instead of storing a pointer to the base class, store the passed preconditioner type directly that is available by template parameter.

Backport

In dune 2.6 the base-class problem was not a problem, since there always the template parameter type was stored. But the implementation in NonoverlappingBlockPreconditioner is missing there as well. This simply breaks generic code.

Note, the problem was introduced in !274 (merged). This MR is related to issue #69 (closed).

Edited by Simon Praetorius

Merge request reports