CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

discussions about the gatherList, scatterList, and combine

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2014, 12:15
Question discussions about the gatherList, scatterList, and combine
  #1
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
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.
openfoammaofnepo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:38.