CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to find out the cell containing a arbitrary point (

luckyluke April 6, 2005 00:46

In my code, I want to know in
In my code, I want to know in which cell a arbitrary point is contained.

niklas April 6, 2005 03:24

vector position(1.0, 0.123, 8.
vector position(1.0, 0.123, 8.12);
label celli = mesh.findCell(position);

fportela July 10, 2013 11:54

Hi there,

I have similar question (so I decided not open a new thread just for this).

Is it possible to get a list of all cells who contain a given point? As I understand, "mesh.findCell(position);" will give me the cell whose centre is nearest to "position"; in my case, "position" will be coordinates of cells nodes, so I need to get all the cells that 'contain' that point...


All times are GMT -4. The time now is 02:56.