Graph

plot3d.graph.add_connectivity_to_graph(G: Graph, block_sizes: List[Tuple[int, int, int]], connectivities: List[Dict[str, int]]) Graph[source]

Convert plot3d defined connectivity into additional graph edges

Parameters:
  • G (nx.classes.graph.Graph) – Giant graph

  • block_sizes (List[Tuple[int,int,int]]) – _description_

  • connectivity (List[Dict[str,int]]) – _description_

Returns:

networkx graph object with added edges

Return type:

nx.graph.Graph

plot3d.graph.block_to_graph(IMAX: int, JMAX: int, KMAX: int, offset: int = 0) Graph[source]

Converts a block to a graph

Parameters:
  • IMAX (int) – block.IMAX

  • JMAX (int) – block.JMAX

  • KMAX (int) – block.KMAX

  • offset (int) – IMAX*JMAX*KMAX of previous block

Returns:

networkx graph object

Return type:

nx.graph.Graph

plot3d.graph.get_face_vertex_indices(IMIN: int, JMIN: int, KMIN: int, IMAX: int, JMAX: int, KMAX: int, block_size: Tuple[int, int, int]) ndarray[Any, dtype[_ScalarType_co]][source]

Returns an array containing the vertex number of a given face

Parameters:
  • IMIN (int) – starting I index

  • JMIN (int) – starting J index

  • KMIN (int) – starting K index

  • IMAX (int) – ending I index

  • JMAX (int) – ending J index

  • KMAX (int) – ending K index

  • block_size (Tuple[int,int,int]) – This is the actual IMAX,JMAX,KMAX of the block

Returns:

an array containing all the vertices

Return type:

npt.NDArray

plot3d.graph.get_starting_vertex(blockIndex: int, block_sizes: List[Tuple[int, int, int]]) int[source]

Gets the starting vertex index of the block

Parameters:
  • blockIndex (int) – index of block

  • block_sizes (List[Tuple[int,int,int]]) – List of all the [[IMAX,JMAX,KMAX]]

Returns:

offset

Return type:

int