CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   unstructured mesh data structure for FVM (

J. Kim February 6, 2002 22:20

unstructured mesh data structure for FVM
Dear all,

I am looking for an efficient way to extract cell->node connectivity from face->cell and face->node connectivities.

Cell->node connectivity has node(vertex) numbers forming each cell.

Fluent's Gambit exports mixed element mesh data with face->cell and face->node connectivities only. But my fv solver and post-processing code require cell->node connectivity.

Any comments are welcome. Thank you.

Ma February 6, 2002 22:47

Re: unstructured mesh data structure for FVM
There is a way here, but I am not sure if it's efficient enough:

(1) Looop faces: extract the face->cell information to cell->face information.

(2) Loop cells: get the cell->vertex information based on cell->face and face->vertex.

I am glad to hear some other more efficient way.


Madhukar M. Rao February 9, 2002 15:45

Re: unstructured mesh data structure for FVM
Invert the face->cell mapping to get the cell->face mapping. Then you can proceed to write the cell->node mapping. You may need to remove duplicate entries in the cell->node mapping. The simplest way is to use an array to carry a flag for duplicated nodes. You can also use a set if you prefer.

If your fv solver expects the nodes to be in a certain order, then the problem is a little more difficult. You will have to sort the cell->face mapping based on the way the faces are connected to each other. Once the cell topology can be inferred from the cell->face mapping, the nodes can be written out in whatever order the fv solver expects.

It should be an interesting exercise.

Good luck,


Praveen Chandrashekar February 17, 2002 03:43

Re: unstructured mesh data structure for FVM
See the recent book by Rainald Lohner Applied CFD Techniques: An Introduction based on Finite Element Method.

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