Interface MiGeometryHexahedronIjk

  • All Superinterfaces:
    MiGeometry

    public interface MiGeometryHexahedronIjk
    extends MiGeometry
    Generic geometry interface for hexahedron mesh Ijk.

    Generic geometry interface representing a 3D grid of hexahedron cells, where each hexahedron is defined explicitly with 8 independent coordinates. Each hexahedron is accessible via 3 indices (i,j,k).

    This type of geometry is typically used by the MiVolumeMeshVertexHexahedronIjk interface.

    The way the vertices of each hexahedron are numbered is indicated by the CellStorageLayout value (see getCellStorageLayout()).

    • Method Detail

      • getCellCoords

        void getCellCoords​(int i,
                           int j,
                           int k,
                           double[] cellCoords)
        Returns the coordinates of the hexahedron (i,j,k) cell.

        The way the vertices of each hexahedron are numbered is indicated by the CellStorageLayout value returned by getCellStorageLayout().

        Parameters:
        i - the id of this hexahedron on the axis I. 0 <= i < meshTopologyIjk.getNumCellsI().
        j - the id of this hexahedron on the axis J. 0 <= j < meshTopologyIjk.getNumCellsJ().
        k - the id of this hexahedron on the axis K. 0 <= k < meshTopologyIjk.getNumCellsK().
        cellCoords - the array into which the 8 vertices of the hexahedron (i,j,k) are to be stored.
      • getStorageLayout

        StorageLayoutIJK getStorageLayout()
        Hint about coordinates organization in memory.

        This information aims at optimizing the geometry traversal for extractors. Returns the internal coordinates layout in memory as 6 enum values covering all possible cases. For instance KJI means that:

        • the coordinate (i+1,j,k) is consecutive in memory to the coordinate (i,j,k) and,
        • the row of coordinates (j+1,k) is consecutive in memory to the row of coordinates (j,k) and,
        • the slice of coordinates (k+1) is consecutive in memory to the slice of coordinates (k)

        The fastest way to go through the coordinates with such layout is to perform the following triple loop:

         for each k with 0 <= k < numK
           for each j with 0 <= j < numJ
             for each i with 0 <= i < numI
               coordinates.getCellCoords(i,j,k, cellCoords);
         
      • getCellStorageLayout

        CellStorageLayout getCellStorageLayout()
        Hint about coordinates organization in a hexahedron cell.