trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.19k stars 564 forks source link

MueLu: Cut Drop Behaving Differently on Entries of Equal Value #13377

Open NyquilDreams opened 1 month ago

NyquilDreams commented 1 month ago

Bug Report

@jhux2 @cgcgcg @csiefer2

Description

While testing the Cut Drop Algorithm in MueLu_CoalesceDropFactory_def.hpp using the unit tests in CoalesceDropFactory.cpp, I noticed that some entries with a value of -1 were being kept while other entries that also have a value of -1 were being dropped in the same row. This is caused by a combination of the fact that at least one off diagonal entry must be kept and a corner case when threshold is less than 1 which causes only the first off diagonal entry to be kept. A check for this scenario needs to be added so that entries of the same value are either all kept or all dropped. The unit test should also be modified accordingly.

https://github.com/trilinos/Trilinos/blob/bf922e75428ef7dd925811f0a532d05dd9cff808/packages/muelu/test/unit_tests/CoalesceDropFactory.cpp#L1410-L1440

https://github.com/trilinos/Trilinos/blob/bf922e75428ef7dd925811f0a532d05dd9cff808/packages/muelu/src/Graph/MatrixTransformation/MueLu_CoalesceDropFactory_def.hpp#L577-L593

github-actions[bot] commented 1 month ago

Automatic mention of the @trilinos/muelu team

cgcgcg commented 1 month ago

Maybe it's easier to not allow the user to set a threshold <= 1?