CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

How to find out the cell containing a arbitrary point

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   April 6, 2005, 00:46
Default In my code, I want to know in
Join Date: Mar 2009
Posts: 51
Rep Power: 8
luckyluke is on a distinguished road
In my code, I want to know in which cell a arbitrary point is contained.
luckyluke is offline   Reply With Quote

Old   April 6, 2005, 03:24
Default vector position(1.0, 0.123, 8.
Super Moderator
niklas's Avatar
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
vector position(1.0, 0.123, 8.12);
label celli = mesh.findCell(position);
niklas is offline   Reply With Quote

Old   July 10, 2013, 11:54
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 58
Rep Power: 4
fportela is on a distinguished road
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...

fportela is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate the field value of a arbitrary point luckyluke OpenFOAM Running, Solving & CFD 7 February 28, 2014 16:14
Torque Calculation at Arbitrary Point Mojtaba CFX 8 March 1, 2009 01:22
Calculation torque on arbitrary point Mojtaba Main CFD Forum 0 February 9, 2009 01:08
Calculation torque on arbitrary point Mojtaba CFX 0 February 7, 2009 00:45
Algorithm to find cell no. in O-grid for a point Ben Main CFD Forum 5 June 22, 2007 11:23

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