CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Mesh Generation & Pre-Processing (https://www.cfd-online.com/Forums/mesh-generation/)
-   -   Fast Search adjacent cells in an unstructured grid (https://www.cfd-online.com/Forums/mesh-generation/162017-fast-search-adjacent-cells-unstructured-grid.html)

andreyh November 1, 2015 17:40

Fast Search adjacent cells in an unstructured grid
 
Hello!
I write my own solver. I use a grid format .NEU - gambit file format. This format as the other I know has the following structure fo tetrahedron mesh:
Matrix points. Each row are 3 numbers - the coordinates of the point.
Мatrix cells. Each row is 4 numbers - the points that form this cell.

I need the following matrix:
1 22 33 44 56
2 21 45 67 89
.
.

Each row is 4 number - cells with which this cell contacts through its surface. For example, cell 2 is in contact with the cells 21 45 67 89.

In the case of the .NEU file format, I have to do a nested loop that for each cell goes through all cells. I Get N * N "IF" comparisons. It is too long.

My question1. Is there a file format in which the matrix that I need is contained explicitly?
My question2. Is there a file format in which the matrix that I need I can get a faster way.


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