Skip to content

[AMG] store the operator when reusing the amg

The amg backends have an option to reuse the amg in multiple calls to apply. Internally, the amg stores a reference to the operator. This operator was created as a local variable in the apply methods, leading to undefined behavior and segfaults. To fix this, we store the operator (i.e. the MatrixAdapter) along with the amg on the heap.

All tests compile and pass.

This fixes #63 (closed)

Merge request reports

Loading