||March 12, 2012 05:09
adjacent cells (neighbor cells)
I want to obtain the adjacent cells of a cell (cells connected to each nodes not only faces), I loop over all cells, check to see if a cell shares any nodes with the cell of interest, and save a array of the ones that do. But I found taht the array (neighbourcell[Ncell][NeighC] in code) doesn't contain all the adjacent cells and I don't know why, please help me, thanks!
#define Ncell 100000 /*number of cells*/
#define NeighC 26 /*maximun number of adjacent cells*/
if(C_NODE(c1,t,ii)==C_NODE(c,t,jj)) break;/*exit loop_c1*/