AMG constructors are buggy
Several constructors in AMG preconditioners can not work and when instantiating it gives a compiler error:
-
AMG(const OperatorHierarchy& matrices, ...)
must beAMG(OperatorHierarchy& matrices, ...)
since a mutable shared_ptr tomatrices
is stored in the class. - Same for
KAMG
- Similar for
FastAMG
, but there the matrices should be additionally wrapped into a non-destroying shared_ptr, i.e.matrices_(matrices_(stackobject_to_shared_ptr(matrices)))
. Currently, the raw pointer is passed to the shared_ptr. -
KAMG(..., gamma, preSmoothingSteps, postSmoothingSteps, ...)
forward to a non-existingAMG
constructor. Should be deleted.