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

Field concatenation in parallel

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2008, 09:27
Default Hi, I would like to concate
  #1
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
Hi,

I would like to concatenate vectorFields created on parallel threads at runtime. The problem is that, they have the same name, but are located on different processors.

listListOps has been mentionned in another thread, but I have no idea how to refere to the variables since they have the same name.

I would also write the result, not in a processor subdirectory, but in the root directory. The problem is that runTime.path() returns the processor directory which correspond to the thread. I thought of using something like runTime.path()/".." but this might not be the most elegant solution (besides maybe not working)
johndeas is offline   Reply With Quote

Old   June 6, 2008, 11:27
Default Hi, as a test, I tried to c
  #2
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
Hi,

as a test, I tried to create a different vectorField per processor, and then merge it with this code:

vectorField myVecFld(1,vector(Pstream::myProcNo(),0,0));
List<vectorfield> gatheredData(Pstream::nProcs());
gatheredData[Pstream::myProcNo()] = myVecFld;
Pstream::gatherList(gatheredData);

vectorField combinedFld
(
ListListOps::combine<vectorfield>
(
gatheredData,
vectorField::operator[]
)
);

As I understand the code, I need to provide "combine" an "access operator to access the individual elements". Needless to say, the operator I proposed above does not work.

Which one should I use ?
johndeas is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
P U T field solving in solid and liquid two meshes In parallel kar OpenFOAM Running, Solving & CFD 2 February 20, 2008 06:18
Adding a field on patch in parallel jaswi OpenFOAM Running, Solving & CFD 6 February 2, 2008 14:18
How to get Pressure field from velocity field qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 08:38
Putting submesh field values into field on parent mesh helmut OpenFOAM Running, Solving & CFD 2 June 20, 2006 08:31
field by field decomposition vs. component-wise zhanglei Main CFD Forum 0 January 5, 2001 10:06


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