XMDF  2.2
4.9.4. Extruded layers

Using extrusion requires information about how the layers are defined. The following function is used to define the layer information for extruded grids. NumVals and Values have a different meaning depending upon which extrusion option the grid is using. For this function the top layer data is passed in first down to the bottom layer of the grid. When using sigma-stretch extrusion the variable Values is the percent thickness of each layer of the grid. NumVals should correspond to NumLayers for sigma-stretch grids. When using Cartesian extrusion the variable Values represents the cell face locations perpendicular to the K direction. NumVals will be the NumLayers + 1 because each layer has a top and bottom face. When using curvilinear extrusion at corners the variable Values is the K location of every corner of the grid. NumVals in this case is (NumI + 1) * (NumJ + 1) * (NumLayers + 1). The values in the array loop on I first, J second, and layers (top-bottom) last. When using curvilinear extrusion at cells the variable Values is the K location of every cell face perpendicular to the K direction. NumVals in this case is NumI * NumJ * NumLayers. The values in the array loop on I first, J second, and layers (top-bottom) last.

C/C++
int xfWriteExtrudeLayerData(xid GroupId, int NumLayers, int NumVals, double *Values);
FORTRAN
SUBROUTINE XF_WRITE_EXTRUDE_LAYER_DATA(GroupId, NumLayers, NumVals, Values, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(IN) :: iValues
INTEGER, INTENT(OUT) :: Error

The following functions are used to read the extrude information from the file. The number of values is passed in so that the library can check to see if the array was allocated to the correct size.

C/C++
int xfGetExtrudeNumLayers(xid GroupId, int *NumLayers);
int xfGetExtrudeValues(xid GroupId, int NumVals, *Values);
FORTRAN
SUBROUTINE XF_GET_EXTRUDE_NUM_LAYERS(GroupId, NumLayers, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(OUT) :: NumLayers
INTEGER, INTENT(OUT) :: Error
SUBROUTINE XF_GET_EXTRUDE_VALUES(GroupId, NumValues, Values, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumValues
REAL(DOUBLE), INTENT(OUT) :: Values
INTEGER, INTENT(OUT) :: Error