|
[Sponsors] |
discussions about the gatherList, scatterList, and combine |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2014, 12:15 |
discussions about the gatherList, scatterList, and combine
|
#1 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hi All,
I met some problems about the the gatherList, scatterList and combine in openfoam for panellization. The example is as follows. I am still not very clear about the role of ListListOps::combine. I checked the source files but found that it is put the list into a larger list for the variables. However, after using gatherList, I think only the master processor (or root processor in the terminlogy of MPI) has the complete data (including all other processors' data). So here if combined is executed by all the processors or only the master? If the former, I think the non-master only has its own data. So the combined is meaningless. I am a little confused about this. Does anybody know something about this issue? Code:
Pstream::gatherList(l) List<scalar> L = ListListOps::combine<List<scalar> >(l, accessOp<List<scalar> >()); if (Pstream::master()) { ......do something interesting here...... the scalar b is calcualted here. } Pstream::scatterList(b); List<scalar> B = ListListOps::combine<List<scalar> >(b, accessOp<List<scalar> >()); Last edited by openfoammaofnepo; February 5, 2014 at 18:26. |
|
|
|