MiGeometryHexahedronIjk Class Reference
[Geometry]

MeshViz Generic geometry interface for hexahedron mesh Ijk. More...

#include <MeshVizXLM/mesh/geometry/MiGeometryHexahedronIjk.h>

Inheritance diagram for MiGeometryHexahedronIjk:
MiGeometry

List of all members.

Public Member Functions

virtual void getCellCoords (size_t i, size_t j, size_t k, MbVec3d &v0, MbVec3d &v1, MbVec3d &v2, MbVec3d &v3, MbVec3d &v4, MbVec3d &v5, MbVec3d &v6, MbVec3d &v7) const =0
virtual MiMeshIjk::StorageLayout getStorageLayout () const

Detailed Description

MeshViz 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 vertices of each hexahedron are numbered as follows (see getCellCoords for more details):

                         J
                         |
                         |

                        n3----------n2
                        /|          /|
                      /  |        /  |
                    /    |      /    |
                  n7---------n6      |
                   |     |    |      |
                   |    n0----|-----n1    --- I
                   |    /     |     /
                   |  /       |   /
                   |/         | /
                  n4---------n5

                /
              /
            K
  
See related examples:

MyVolumeMeshVertexHexahedronIjk


Member Function Documentation

virtual void MiGeometryHexahedronIjk::getCellCoords ( size_t  i,
size_t  j,
size_t  k,
MbVec3d v0,
MbVec3d v1,
MbVec3d v2,
MbVec3d v3,
MbVec3d v4,
MbVec3d v5,
MbVec3d v6,
MbVec3d v7 
) const [pure virtual]

Returns the coordinates of the hexahedron (i,j,k) cell.

The vertices of each hexahedron are numbered as follows :

  • The first 4 vertices define the "bottom" face of the hexahedron. This face is on the logical IJ plane K=k.
  • The last 4 vertices define the "top" face of the hexahedron. This face is on the logical IJ plane K=k+1.
    MiGeometryHexahedronIjk.png

    Vertices numbering

    Parameters:
    i [in] the id of this hexahedron on the axis I. 0 <= i < meshTopologyIjk.getNumCellsI().
    j [in] the id of this hexahedron on the axis J. 0 <= j < meshTopologyIjk.getNumCellsJ().
    k [in] the id of this hexahedron on the axis K. 0 <= k < meshTopologyIjk.getNumCellsK().
    v0,v1,v2,v3,v4,v5,v6,v7 [out] the 8 vertices of the hexahedron (i,j,k).
virtual MiMeshIjk::StorageLayout MiGeometryHexahedronIjk::getStorageLayout (  )  const [inline, virtual]

Hint about hexahedron organization in memory.

This information aims at optimizing the geometry traversal for extractors. Returns the geometry internal hexahedron layout in memory as 6 enum values covering all possible cases.

For example, LAYOUT_KJI means that:

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

The fastest way to go through a hexahedron mesh with LAYOUT_KJI should be 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
         geometry.getCellCoords(i,j,k,n0, ... ,n7);
    

The default implementation returns LAYOUT_UNKNOWN meaning that the hexahedron storage organization is unknown, for instance when hexahedron are computed on the fly. In that case, extractors perform the hexahedron traversal in the way that minimizes the required memory for their algorithms.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/