Problem with sumIntoGlobalValues
when assembling a Tepetra::FECrsMatrix
#13943
-
I'm transitioning some Epetra code to Tpetra. During the global assembly element loop, ghost DOFs are not summed into the matrix. I followed the example in I set up a small example with 3 elements, with rank 1 owning dof 4 which is also part of element 2 owned by rank 0 (it is a ghost in rank 0). During the the assembly, the arguments of
But the final matrix, after
It did not sum up the contribution from rank 0? I checked the graph, created with, graph_ =
Teuchos::rcp(new Tpetra::FECrsGraph<LO, GO, NO>(rowMap_, owned_plus_shared_map, maxNumEntriesPerRow)); The row map contains only owned dofs (domain and range are the same). The column map has owned plus shared:
Any ideas on how to debug this? @trilinos/tpetra |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Can you show the full code for this small example? |
Beta Was this translation helpful? Give feedback.
-
Unless you've used a I'm also not sure what to make of this: std::vector<int> myGlobalElements;
for(const auto& entry : DofToAdjacentDofs) {
myGlobalElements.push_back(entry.first);
} Since I don't know what I would strongly recommend creating a self-contained minimal reproducible example. Use what would normally be an absurdly simplistic representation of element connectivity (say, a vector of vectors of |
Beta Was this translation helpful? Give feedback.
I found the culprit.
I was creating the graph based on owned dofs only.
The solution was to loop over owned elements and include ghost dofs in the graph.