|
[Sponsors] |
Finding Cell neighbours using mesh.cellCells() in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 14, 2024, 07:05 |
Finding Cell neighbours using mesh.cellCells() in parallel
|
#1 |
Member
Divyaprakash
Join Date: Jun 2014
Posts: 71
Rep Power: 12 |
Hello everyone,
For my application I need to find cells around a point so that I can perform some operation on them. I need to do this for many such points at every time-step. Currently I am using the following set of lines. Code:
label cellIndex = mesh.findCell(rr); labelList appended; appended.append(cellIndex); // Info << "Cell Index: " << cellIndex << endl; // Get the neighbouring cells 4 times for (int l = 0; l < 4; ++l) { int nn = appended.size(); for (int m = 0; m < nn; ++m) { labelList neighbors = mesh.cellCells()[appended[m]]; appended.append(neighbors); } // Get rid of repeating values and also sort the array Foam::inplaceUniqueSort(appended); } However, it won't work when I discretize the domain since the neighbours may be located in some other processor. I have gone through the forum and although I found some threads which mention this issue, they haven't been resolved. So I am asking again if this is possible in newer versions or some alternatives exist to accomplish the above goal. |
|
Tags |
cellcells(), neighbours, parallel |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sloshingTank3D6DoF failed to run in parallel | phsieh2005 | OpenFOAM Running, Solving & CFD | 1 | May 19, 2023 00:51 |
Finding a cell closest to a point | Mohammad74 | Fluent UDF and Scheme Programming | 2 | May 24, 2022 09:17 |
UDF in case with DPM modle | POSTHU | Fluent UDF and Scheme Programming | 0 | March 3, 2021 08:21 |
Journal file error | magicalmarshmallow | FLUENT | 3 | April 4, 2014 13:25 |
finding the size of smallest cell | cfdiscool | FLUENT | 6 | June 18, 2013 06:20 |