# Algorithm to find cell no. in O-grid for a point

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

 June 21, 2007, 00:57 Algorithm to find cell no. in O-grid for a point #1 Ben Guest   Posts: n/a Hi, I am looking for an effective algorithm which can determine the i,j cell number of a point on an O-grid. Can someone enlighten me? Thanks

 June 21, 2007, 08:50 Re: Algorithm to find cell no. in O-grid for a poi #2 Mani Guest   Posts: n/a How is the point defined? By physical coordinates? The (in)efficiency of any search algorithm will depend on how general it needs to be. Your question implies a 2D grid. Are there any other conditions that may help to specify the problem?

 June 21, 2007, 09:49 Re: Algorithm to find cell no. in O-grid for a poi #3 Ben Guest   Posts: n/a Hi, put it simply, I have a pt with coordinates (x,y). I also have an O-grid, in a 2D array xx(i,j), yy(i,j). There's no transformation and they'r all physical coordinates. So I want to find the i,j cell on the O-grid where the pt (x,y) lies in. I am now looping through the O-grid cells, and check if the pt lies inside the cell (quadrilateral). I am using overset grids so I'm trying to find the interpolation stencil for the cartesian pt on the O-grid. Thanks

 June 21, 2007, 13:37 Re: Algorithm to find cell no. in O-grid for a poi #4 TG Guest   Posts: n/a What you need to do to speed up the process is create a set of zones covering the extent of the mesh, place each cell into a the zone (or zones) it falls into geometrically and then only search the cells in the zone that your point falls in to see if its in or out. You can experiment, but a 10x10 covering the 2-d mesh will probably speed you up a couple of orders of magnitude.

 June 22, 2007, 11:23 Re: Algorithm to find cell no. in O-grid for a poi #6 Ben Guest   Posts: n/a Thank you TG & Mani for the suggestions!

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sina Main CFD Forum 0 February 3, 2011 10:26 kiran OpenFOAM Post-Processing 2 September 12, 2010 12:59 Ralf Schmidt FLUENT 0 September 21, 2006 11:32 Domi FLUENT 0 October 26, 2004 11:01 Chie Min CFX 5 July 12, 2001 23:19

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