gustaf.utils.connec#

gustaf/gustaf/utils/connec.py.

Useful functions for connectivity operation. Ranging from edges to volumes. Named connec because connectivity is too long. Would have been even cooler, if it was palindrome.

Functions

faces_to_edges(faces)

Compute edges based on following edge scheme.

hexa_to_quad(volumes)

Computes quad faces based on following index scheme.

make_hexa_volumes(resolutions)

Given number of nodes per each dimension, returns connectivity information of structured hexahedron elements.

make_quad_faces(resolutions)

Given number of nodes per each dimension, returns connectivity information of a structured mesh.

range_to_edges(range_[, closed, continuous])

Given range, for example (a, b), returns an edge sequence that sequentially connects indices.

sequence_to_edges(seq[, closed])

Given a sequence of int, "connect" to turn them into edges.

sequentialize_edges(edges[, start, ...])

Organize edge connectivities to describe polygon or a line.

sorted_unique(connectivity[, sorted_])

Given connectivity array, finds unique entries, based on its axis=1 sorted values.

subdivide_edges(edges)

Subdivide edges.

subdivide_quad(mesh[, return_dict])

Subdivide quads.

subdivide_tri(mesh[, return_dict])

Subdivide triangles.

tet_to_tri(volumes)

Computes tri faces based on following index scheme.

volumes_to_faces(volumes)

Guidance function for tet_to_tri and hexa_to_quad.