CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to find adjacent cells (https://www.cfd-online.com/Forums/openfoam-solving/58518-how-find-adjacent-cells.html)

evgenii December 3, 2006 11:30

Hi, all! Is it possible to
 
Hi, all!

Is it possible to to find all cells adjacent to given one (by label) or just check if cell is adjacent to given one?
It seems for me that it should be possible, but I failed to find it in documentation.
Hopefuly someone can shed me some light on this problem!

Best regards,
Efimenko Evgeny

hjasak December 3, 2006 11:32

Easy: mesh.cellCells() gives y
 
Easy: mesh.cellCells()[yourCellID] gives you the list of cells sharing a face with your cell. For more complex addressing (ALL of it is there), have a look at the PrimitiveMesh class.

Enjoy,

Hrv

evgenii December 3, 2006 12:05

Thanks! Eugene
 
Thanks!

Eugene

xiao September 27, 2008 02:03

In line with the previous post
 
In line with the previous post, Is it possible to find the cells sharing a point (vertex) with this cell? I think this can be done by using the info from pointCells() and cellPoints() in the same way as in "calcCellCells" (looping over the list and discard nonunique ones), but I want to make sure this information has not already been calculated by Foam.

Could any body tell me whether this information exist somewhere?
Thanks very much!

Heng


All times are GMT -4. The time now is 22:58.