How to Use IBG Grids

You don't need the grid generator for looking at nice grids, but for making computations on these grids. May be, you already have done some work in this domain, in this case you already have your own data structure for a grid. Maybe you are only starting, but even in this case it may be useful for you to use a data structure different from the internal IBG structure. Thus, it becomes necessary to convert the IBG grids into your data format. There are different strategies for using the grids created by IBG.

External Usage

This is the simplest and most safe way to use IBG grids.

Use the function ibgToSimplex to write the grid into a file in the Simplex Grid Format and write your own function which is reading this format.

Internal Conversion

If you want to avoid the double conversion IBG grid -> Simplex grid -> your grid, you can write an own conversion function from the internal IBG grid to your grid format.

I recommend to use the file ibg2simplex.c as a pattern. You simply have to replace the print calls which convert the grid into the Simplex Grid Format

Using the internal IBG data structure

This strategy allows to live without conversion. But at the current step I don't recommend it. I'm developing now a C++ version with another internal data format which may be not compatible.

For the C++ structure I'm developing now I want to give a guarantee that it will survive a long time, but for the current structure there is no such guarantee.