|
[Sponsors] |
Reconstructing undecomposed faceZone in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 9, 2013, 13:08 |
Reconstructing undecomposed faceZone in parallel
|
#1 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi all,
I have a decomposed case where several faceZones have been split over several processors. I need to reconstruct the original undecomposed faceZone in parallel so that the original face ordering is consistent. I know that I can used faceProcAddr to map the decomposed faceZone to the undecomposed (global) face Ids, but I'm not sure how to access the undecomposed faceZone list from each processor so that I can reorder the faces correctly. Do I need to create a dummy objectRegistry to force IOobject to point to the undecomposed mesh directories and read in the undecomposed faceZoneMesh? I really hope there's an easier way than this. Alternatively I know that OpenFOAM-1.6-ext supports global faceZones when decomposing the mesh but I'm not sure if the ordering of the faces is consistent in this case. Any suggestions would be appreciated. Ivor |
|
August 30, 2013, 11:29 |
|
#2 | |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34 |
Quote:
just came across this thread and have some thoughts which may be useful: I use globalFaceZones in OpenFOAM-1.6-ext, so I can create the global face zone field whenever I need it and get the local field back from the global too, here's an example which will make things clearer: Code:
// local patch U field vectorField localU = U.boundaryField()[patchID]; // put local U into globalU const label patchStart = mesh.boundaryMesh()[patchID].start(); vectorField globalU(mesh.faceZones()[faceZoneID].size(), vector::zero); forAll(localU, i) { globalU[mesh.faceZones()[faceZoneID].whichFace(patchStart + i)] = localU[i]; } // sync parallel data // sum because each face is only on one proc reduce(globalU, sumOp<vectorField>()); // now I can do some calculation with globalU // DO SOMETHING HERE WITH GLOBALU // now put global field back into local forAll(localU, i) { localU[i] = globalU [ mesh.faceZones()[faceZoneID].whichFace(patchStart + i) ]; } Hope it helps, Philip |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Mass flow through faceZone using swak4foam when running in parallel | billie | OpenFOAM Community Contributions | 22 | May 14, 2013 08:20 |
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel | JR22 | OpenFOAM Running, Solving & CFD | 2 | April 19, 2013 17:49 |
Check yPlus without reconstructing in parallel runs | maysmech | OpenFOAM | 3 | September 14, 2010 17:14 |
Problem of reconstructing pointVectorFields with parallel mesh motion (1.5.x) | LESlie | OpenFOAM | 0 | November 6, 2009 07:07 |
Problem with reconstructing parallel results | qtian | OpenFOAM Running, Solving & CFD | 1 | May 15, 2008 18:30 |