#1416 Unexpected behaviour with setAccumulate
Metadata
Property | Value |
---|---|
Reported by | Olaf Ippisch (olaf.ippisch@iwr.uni-heidelberg.de) |
Reported at | Jan 15, 2014 12:04 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Description
The accumulation mode used by the parallel AMG can be specified with the function setAccumulate. It has two varieties. One has a on/off characteristic and a bool argument, the second selects one of different modes and expects an enum value of type AccumulationMode. There are two things which can be surprising to the user:
-
with setAccumulate(bool) the accumulation mode is always set to successiveAccu if the argument is true, even if parmetis is not installed. This results in later warnings and also overwrites the correct setting of the constructor to atOnceAccu. There are two possibilities to cure this. Either to always use at once accumulation or at least to always use it if parmetis is not installed. As this is closer to the current behaviour I implemented the second.
-
if a stupid user (like me) wants to use the non-bool version and uses an int as argument (of course no standard-adhering C++ programmer would do that) the bool version is called (as int converts to bool). As the two overloaded version do different things (one activates or deactivates accumulation and the other selects a certain mode) it might be possible to rename one of them.
I add a patch, which addresses both problems.