Deep copies in AMG
I'm unsure whether this is a bug or a feature.
Currently several classes in the AMG perform expensive deep copies, in particular the hierarchy is always copied using a deep copy. This leads a full copy of the hierarchy when copying an AMG, FastAMG, TwoLevelSolver, ...
Is this intentional? Currently it is used in
-
twolevelmethodtest.cc
: there is an explicit test for the copy-constructor, but it is unclear what the intended behaviour is. -
pthreadamgtest.cc
: Here a couple of AMGs are created from a single initial instance. After the copy several objects are set to other values so that I would assume that the other ones can be shared. But the there would be no need for a deep copy as we set the other ones anyway. -
pthreadtwoleveltest.cc
: the same...