Interface MiCell

    • Method Detail

      • getNumNodes

        int getNumNodes()
        Gets the number of nodes.
        Returns:
        nodes number of this cell
      • getNodeIndex

        long getNodeIndex​(int node)
        Gets the index (in the mesh) of a node.
        Parameters:
        node - node number (where: 0 <= node < getNumNodes)
        Returns:
        node index in the mesh
      • isPointInsideCell

        boolean isPointInsideCell​(MiGeometryI meshGeometry,
                                  double[] point,
                                  double[] weights)
        Checks if a point is inside or outside this cell.

        If the point is inside this cell, the specified array is filled with weight values of the point. A weight value (aka shape function) must be given for each node of the cell, see chapter "Properties of shape functions" in the User's Guide for more details.

        This method is not used by all extraction classes but it is needed for streamline extraction for example.

        Note: For extraction purpose only, it is not necessary to allocate the weight array since extraction classes are optimized such as weight arrays passed to this method are already allocated and large enough to retrieve all the computed weights. Thus the following assignment is then sufficient: weight[i] = wi for each i with 0 <= i < getNumNodes

        Parameters:
        meshGeometry - the geometry of the mesh. It is used to retrieve the node coordinates of this cell
        point - coordinates {x,y,z} of point to be checked
        weights - the array into which the weight values are to be stored, it must contain at least as many elements as the number of nodes in this cell.
        Returns:
        true if the point is inside this cell
      • getCenter

        double[] getCenter​(MiGeometryI geometry)
        Gets the center of this cell.

        This method is not used by all extraction classes.

        Parameters:
        geometry - the geometry of the mesh. It is used to retrieve the node coordinates
        Returns:
        the center coordinates {x,y,z} of this cell
      • getRelativeSize

        double getRelativeSize​(MiGeometryI meshGeometry)
        Gets the relative size of the cell.

        This method is used only by the MoMeshCellShape to display node names if using the relative offset feature and the streamline extraction to adapt the step integration to the size of the cell. getRelativeSize should return a value depending on the size of the cell. For instance, getRelativeSize can return the length of the longest edge of this cell, or the length of its diagonal.

        If getRelativeSize returns a constant value for any cell, the stream line extraction uses a constant number of step integration anywhere in the mesh. Returning a constant implies that all the cells are supposed to have the same size. getRelativeSize) must not return 0.

        Parameters:
        meshGeometry - the geometry of the mesh. It is used to retrieve the node coordinates of this cell.
        Returns:
        the relative size of the cell.