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

Cell ID on Neighbouring Processor Patches

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By maHein

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2019, 15:48
Default Cell ID on Neighbouring Processor Patches
  #1
Member
 
Join Date: Jun 2012
Posts: 76
Rep Power: 13
maHein is on a distinguished road
Hello,

I wrote an algorithm, which has to be adjusted for parallel computing. For this, I need the cell ID of both sides of a processor patch. For the current patch, this can simply be achieved by a loop over all faces and a faceCells() command. However, I am struggling to get access to the neighbouring patch. My progress so far:

Code:
    // Loop over all patches
    forAll(mesh_.boundary(), patchI)
    {
        // Current patch
        const fvPatch& pPatch = mesh_.boundary()[patchI];

        // Check, if patch is coupled, e.g. processor patch
        if (pPatch.coupled())
        {
            // Loop over all faces of given patch
            forAll(pPatch, faceI)
            {
                // ID of cell connected to faceI on current patch
                label cellI_own = mesh_.boundary()[patchI].faceCells()[faceI];

                // How to get the corresponding cellI_nei
                // of neighbouring processor patch?
                label cellI_nei = ?
            }
        }
    }
At this point I am missing the connection of current processor patch and its neighbour patch on the next processor. If I need to access specific fields, I could use either patchInternalField() or patchNeighbourField(). However, I want to have the direct face or cell ID.

Thanks for your help!

Martin
the_ichthyologist likes this.
maHein is offline   Reply With Quote

Old   November 19, 2020, 06:06
Default Cell ID on Neighbouring Processor Patches
  #2
New Member
 
Shang
Join Date: Jan 2018
Posts: 5
Rep Power: 8
sxpsxp007 is on a distinguished road
Hi Martin,

Have you solved it? I am meeting the similar problem as yours.
sxpsxp007 is offline   Reply With Quote

Old   November 27, 2020, 14:17
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Maybe this?
globalIndex with number of cells, a flat boundary field, fill with patchCells (offset by localStart) and syncTools swapBoundary?
olesen is offline   Reply With Quote

Old   March 23, 2022, 12:44
Default
  #4
New Member
 
Join Date: Feb 2022
Posts: 25
Rep Power: 4
theBananaTrick is on a distinguished road
Hi,
I am also very interested in this! Where you able to fulfil this task?

@Olesen would swapBoundaryCellList be a good place to start?
theBananaTrick 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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
steadyUniversalMRFFoam Tutorial fails in MixingPlane HenrikJohansson OpenFOAM Bugs 0 February 14, 2019 04:48
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


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