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

Reconstructing undecomposed faceZone in parallel

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bigphil

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2013, 12:08
Default Reconstructing undecomposed faceZone in parallel
  #1
Member
 
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17
cliffoi is on a distinguished road
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
cliffoi is offline   Reply With Quote

Old   August 30, 2013, 10:29
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by cliffoi View Post
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
Hi Ivor,

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
hua1015 likes this.
bigphil 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


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 07:20
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel JR22 OpenFOAM Running, Solving & CFD 2 April 19, 2013 16:49
Check yPlus without reconstructing in parallel runs maysmech OpenFOAM 3 September 14, 2010 16:14
Problem of reconstructing pointVectorFields with parallel mesh motion (1.5.x) LESlie OpenFOAM 0 November 6, 2009 06:07
Problem with reconstructing parallel results qtian OpenFOAM Running, Solving & CFD 1 May 15, 2008 17:30


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