MfixReader User Guide
6. Requesting Coordinates
The coordinates, after the space filter has been applied, can be obtained for any open dataset using
int MfixReaderGetCoordinates(int handle,
enum MfixReaderFormat format,
char **units,
int *dims[3],
float **xyz
)
The format can be used to select between two sets of coordinates:
- MRF_cell or MRF_node_average
- coordinates for the standard grid are returned
- MRF_node_center
- coordinates for a grid with vertices at the centers of the cells are returned
The grid for the cell centers will be smaller by 1 along each axis than the standard grid. Therefore, the cell-center grid should not be requested when the standard grid is less than 2 cells along any coordinate.
The returned array xyz contains the cartesian coordinates where the components of the vertex (X,Y,Z) change fastest and Z changes slowest. If the original MFIX coordinate system is cylindrical, it is converted to cartesian.