|
[Sponsors] |
June 5, 2008, 09:27 |
Hi,
I would like to concate
|
#1 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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) |
|
June 6, 2008, 11:27 |
Hi,
as a test, I tried to c
|
#2 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 ? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |