|
[Sponsors] |
September 21, 2019, 15:48 |
Cell ID on Neighbouring Processor Patches
|
#1 |
Member
Join Date: Jun 2012
Posts: 76
Rep Power: 13 |
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 = ? } } } Thanks for your help! Martin |
|
November 19, 2020, 06:06 |
Cell ID on Neighbouring Processor Patches
|
#2 |
New Member
Shang
Join Date: Jan 2018
Posts: 5
Rep Power: 8 |
Hi Martin,
Have you solved it? I am meeting the similar problem as yours. |
|
November 27, 2020, 14:17 |
|
#3 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Maybe this?
globalIndex with number of cells, a flat boundary field, fill with patchCells (offset by localStart) and syncTools swapBoundary? |
|
March 23, 2022, 12:44 |
|
#4 |
New Member
Join Date: Feb 2022
Posts: 25
Rep Power: 4 |
Hi,
I am also very interested in this! Where you able to fulfil this task? @Olesen would swapBoundaryCellList be a good place to start? |
|
|
|
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 |