Draft: Add support for thread parallel assembling of operators
Thread parallel assembly is based on an element coloring of the grid view
and uses std::thread
's to assemble in parallel on each color.
To compute such colorings this MR also provides the following utilities:
- Methods for computing element neighbor maps based on the subentity relation.
- A simple greedy algorithm for computing colorings based on a given neighbor map.
- A utility for computing a vector of element chunks with one chunk per color. Each chunk is overlap-free and thus allows parallel computations
- A utility for splitting a chunk into segements of approximately the same size.
So far this is tested with YaspGrid
and UGGrid
in 2d and 3d where computing the coloring turned out to be really cheap. Here assembling a stokes problem with 4 parallel threads provides a speed up factor of about 3-4.
Edited by graeser