# Accessing neighboring cells' cell number

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

 October 10, 2006, 14:51 Accessing neighboring cells' cell number #1 Daniel Lattin Guest   Posts: n/a We are trying to access the cell numbers for all of the cells that neighbor a particular cell in posdat to be stored in a common block and used in other subroutines. Does anyone know how to accomplish this? We are importing our meshes from star-design. Thanks so much for your help!

 October 15, 2006, 13:43 Re: Accessing neighboring cells' cell number #2 Sheila Guest   Posts: n/a Neighbourings cells are found by LQ(x,IC) where, x is for direction and IC is the cell. You need the following common block to get the function, COMMON /DCO5/ LQ(6,NCTMAX) Hope that helps, Sheila

 October 17, 2006, 13:54 Re: Accessing neighboring cells' cell number #3 Daniel Lattin Guest   Posts: n/a Sheila, Thanks for your reply! I do have a couple of questions that you may be able to answer. What values can the variable x (direction) have? Is it an integer from 1-6, i.e. where 1=-x,2=+x,3=-y,..? Also, is IC the STAR cell number, or the PROSTAR cell number? And finally, will LQ work for any cell, or is it particular to cells on the boundary or some other specific set of cells? Thanks so much for your help! P.S. You don't happen to have any examples for using it, do you? That would be a tremendous help. Thanks again!

 October 20, 2006, 15:58 Re: Accessing neighboring cells' cell number #4 Sheila Guest   Posts: n/a X ranges from 1-6, and stand for the six directions, Top, Bottom, North, South, East and finally West. Whether 1 corresponds to North or South (or any other of the direction) depends on how you have created your mesh, for example, if you used patching, whether you went clockwise or anti-clockwise to define the vertices... I guess its best to do a little test on a particular cell and print out all the neighbouring cell numbers to get your bearing. Yes, IC is the cell number in STAR. I used IC as that what I called it in my calculations. If I remember correctly, LQ(x,IPSTAR) should give you the Prostar cell numbers. Sorry, I am not too sure about this part. Best to run a quick check on a simple mesh. Yup, LQ will work for any cell. I will have a look at my archive to see if I have any of the codes I used. hope that helps, Sheila

 October 20, 2006, 16:19 Re: Accessing neighboring cells' cell number #5 Daniel Lattin Guest   Posts: n/a Thanks for the info! You've been an invaluable help.