dolfinx
dolfinx copied to clipboard
Associate a `common::Scatterer` with `fem::FunctionSpace`
At present, each la::Vector has it's own common::Scatterer. This allows overlapping non-blocking communication for la::Vectors because each scatter has its own buffers. A potential problem is that a code that creates a a lot of Functions can create a lot of (neighbourhood) communicators, and exhaust the available communicators.
A possibility is to:
- Associate a
Scattererwith eachFunctionSpace. - Copy the
ScattererforFunctionvectors that need their ownScatterer. - For
Functionvectors that don't need their ownScatterer, let them share the FunctionSpaceScatterer`.
In any case, it's probably a good thing for a FunctionSpace to hold the necessary data to create a suitable Scatterer cheaply so the scatter details are not re-computed for every Function created on a space.\
See #3061.
@IgorBaratta , @chrisrichardson?
Seems fine. We still would want to be able to create a Vector just from an IndexMap too.
@garth-wells and @chrisrichardson :
Thank you for the discussion. I want to take the lead if no one is already working on this yet.