trilinos / Trilinos

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

MueLu: Cut Drop Boundary Nodes Not Behaving As Intended #13378

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 the unit tests did not test for a matrix with boundary nodes. I then noticed that the boundaryNodes View in the algorithm was erroneously being accessed using colID (a loop index) instead of col (the local column index).

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

However, an incorrect assumption is also being made. Boundary nodes is obtained using DetectDirichletRows_kokkos_host which returns a View with a size equal to the number of local rows. This does not account for overlap.

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

This seems to have been noticed further down in the code. The boundaryNodes View used by the Cut Drop algorithm should make similar changes to the following excerpt. The unit test should also be modified accordingly.

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

github-actions[bot] commented 1 month ago

Automatic mention of the @trilinos/muelu team