Combining Lists distributed amongst processors
I have set up a piece of code which searches my mesh for all the different distinct heights of cell centers. It is a simple block shaped mesh in which each layer is at a different height, so if there are 20 cells in the vertical direction then the list of heights is 20 elements long.
This works fine in serial. What I would like to do is extend this to parallel such that at the end of the search, each processor has a global list of distinct heights.
Is there a way to take each list of heights that each processor creates, collect them on the master processor, combine them into one global list, and give the global list back to each processor?
Yes, I've done something really similar with lagrangian flamelets. The code is a mess but I can tidy it up and post it up if you like. Otherwise the outline of the approach I took is below:
Create a vector of stuff on each processor:
Thanks for the reply. It worked well!
Dear Laurence R. McGlashan,
How can we gather particles from different processors? Could you be so kind to help me:
Thank you very much!
|All times are GMT -4. The time now is 10:16.|