|
[Sponsors] |
May 28, 2014, 09:49 |
Neighbouring processor number for a patch
|
#1 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
Hi Foamers,
I'm trying to find what processor a particular cell neighbours with. I've found that his may be done by looping over all boundaries, finding those of type processorFvPatch and then accessing the faceCells() list. To get the processor index I've found the processorFvPatch::neighbProcNo() method. I have a problem with getting the number of the domain the patch neighbours with. In the code given below I get an error: Code:
error: ‘const class Foam::fvPatch’ has no member named ‘neighbProcNo’ Code:
forAll(mesh.boundary(),patchi) { if (isType<processorFvPatch>(mesh.boundary()[patchi])) { Pout << mesh.boundary()[patchi].name() << " " << mesh.boundary()[patchi].neighbProcNo() << endl; } } A |
|
May 29, 2014, 05:48 |
|
#2 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
For those interested, here's the solution:
Code:
const processorPolyPatch& pp = refCast<const processorPolyPatch>( mesh.boundaryMesh()[patchi] ); Pout << mesh.boundary()[patchi].name() << " " << pp.neighbProcNo() << endl; |
|
|
|
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 06:37 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 03:01 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |