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

How to communicate std::vector<> across processor boundaries

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2014, 08:10
Question How to communicate std::vector<> across processor boundaries
  #1
New Member
 
Salman Arshad
Join Date: May 2014
Posts: 4
Rep Power: 3
saloo is on a distinguished road
Hello,

I am running a solver in parallel in OpenFOAM. in this solver I compiled the subgrid combustion model (which is not written in OpenFOAM and uses standard C++ library) with OpenFOAM.
On the faces between processor boundaries I want to read and make a local copy of std::vector<double> (contained in the subgrid combustion model on other processor). How can I do that?

Any help is highly appreciated.Thanks a lot
saloo is offline   Reply With Quote

Old   July 23, 2014, 12:36
Default std::vector<double>
  #2
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Fransje is on a distinguished road
Hi there Saloo,

Well, I saw your PM message, but it wasn't very clear what you are trying to do.

First of all, I recommend you try to convert your data type to a standard OpenFOAM type, to make things easier.

Then, if what you are trying to do is access/store your data on many processors, you can try to access the global object database as explained here. Look a bit lower in the post, I think I explained some other things there too.

You can also find more information about inter-processor communication here.

And a short intro to the reduce operation.

You might also want to look through the posts I've made, I might have skipped a few here which could be important for you. Come back to me once you've done that.

Good luck!
Fransje is offline   Reply With Quote

Reply

Tags
parallel computing

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluid Regions donot communicate via "Attach" Boundaries sdwijeya STAR-CD 0 August 28, 2009 13:26


All times are GMT -4. The time now is 15:44.