hybridmesh.HybridMesh.report#

HybridMesh.report(full=False, **kargs)#

Create a report on the HybridMesh shape.

Parameters#

fullbool

If False (default), only a summary is printed: number of nodes, total number of elements, and block info. If True, also prints the shared coordinates and elements for each block.

**kargs :

Numpy print options to format the coordinates and elements arrays.

Returns#

str

A formatted string summarizing the HybridMesh.

Examples#

>>> coords = Coords([[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0.5,0.5,1]])
>>> edges = [[0,1],[1,2],[2,3],[3,0]]
>>> faces = [[0,1,4],[1,2,4],[2,3,4],[3,0,4]]
>>> H = HybridMesh(coords, elems=[edges, faces], eltypes=['line2','tri3'])
>>> print(H.report())
HybridMesh: n_nodes: 5, n_elems: 8
  Block 0: n_elems: 4, plexitude: 2, eltype: line2
  Block 1: n_elems: 4, plexitude: 3, eltype: tri3
>>> print(H.report(full=True))
HybridMesh: n_nodes: 5, n_elems: 8
  Coords: [[0.  0.  0. ]
           [1.  0.  0. ]
           [1.  1.  0. ]
           [0.  1.  0. ]
           [0.5 0.5 1. ]]
  Block 0: n_elems: 4, plexitude: 2, eltype: line2
    Elems: [[0 1]
            [1 2]
            [2 3]
            [3 0]]
  Block 1: n_elems: 4, plexitude: 3, eltype: tri3
    Elems: [[0 1 4]
            [1 2 4]
            [2 3 4]
            [3 0 4]]