|
[Sponsors] |
September 12, 2018, 05:12 |
How to get the neighbour of one cell?
|
#1 |
Senior Member
LT
Join Date: Dec 2010
Posts: 104
Rep Power: 15 |
As shown in the title, this one is about how to get all the neighbour of one cell?
Still in OF 4.0. |
|
September 12, 2018, 17:19 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
For one cell -- some combination of pseudo code and workable code below. The relevant part is .cellCells(). Searching the code for cellCells() should give you plenty of ideas.
Code:
//label for cell ,eg. cell 1 label someCell = mesh.Cells[1] //list of labels for neighbor cells labelList neighborCells = mesh[someCell].cellCells(); |
|
September 13, 2018, 00:21 |
|
#3 |
Senior Member
LT
Join Date: Dec 2010
Posts: 104
Rep Power: 15 |
cellCells() works!
Thank you so much! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Neighbour cell centre to face distance | fportela | OpenFOAM Programming & Development | 11 | May 31, 2018 10:11 |
[blockMesh] Fatal FOAM Error: does not have neighbour cell face | aru.potter | OpenFOAM Meshing & Mesh Conversion | 2 | August 10, 2015 09:32 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
monitoring cell | Jane | Siemens | 2 | March 4, 2004 22:01 |
cell to cell relation | CMB | Siemens | 1 | December 4, 2003 05:05 |