upxo.meshing.gbconformant.fm_steel_abaqus.elements module

The two element types a deck can hold: linear tetrahedra (C3D4) and linear hexahedra (C3D8).

The type is told by the number of corners per element (4 or 8). Corner, edge and face numbering follow Abaqus: a C3D8 has nodes 1-4 on one face and 5-8 on the opposite face, and faces S1..S6. A voxel at grid position (i, j, k) has corners (0,0,0) (1,0,0) (1,1,0) (0,1,0) then the same four at z + 1, which gives a positive volume.

class upxo.meshing.gbconformant.fm_steel_abaqus.elements.ElementKind(abaqus: str, n_nodes: int, edges: tuple, faces: tuple, face_edges: tuple, vtk_type: int, gmsh_type: int, noun: str)[source]

Bases: object

abaqus: str
n_nodes: int
edges: tuple

Corner pairs of the element edges.

faces: tuple

Corners of every face, in cyclic order, pointing out of the element.

face_edges: tuple

Corner pairs of the edges of one face, in face-local numbering.

vtk_type: int
gmsh_type: int
noun: str
upxo.meshing.gbconformant.fm_steel_abaqus.elements.element_kind(elements) → ElementKind[source]

The ElementKind of an (M, 4) or (M, 8) connectivity array.

upxo.meshing.gbconformant.fm_steel_abaqus.elements.element_volumes(points, elements, chunk=250000)[source]

Signed volume of every element (positive for a correctly numbered element).

upxo.meshing.gbconformant.fm_steel_abaqus.elements.element_faces(elements, n_nodes, node_mask=None, chunk=200000)[source]

Every distinct face: (nodes (F, k), first element, second element or -1, elements on the face).

Tetrahedron faces come with their nodes ascending; hexahedron faces keep the cyclic order of the first element that has them (a quadrilateral needs it to stay a quadrilateral). Faces are ordered by their ascending node triple.

node_mask (a boolean per node) keeps only the faces whose nodes are all in it: the other faces are never built into the tables that are sorted, which is what makes the call cheap for a large mesh when only some faces matter. The faces that are kept, and their order, are the same as without it.

upxo.meshing.gbconformant.fm_steel_abaqus.elements.face_areas(points, faces)[source]

Area of every triangle or (planar) quadrilateral; quadrilateral corners in cyclic order.

upxo.meshing.gbconformant.fm_steel_abaqus.elements.grid_hexahedra(shape, spacing=(1.0, 1.0, 1.0), origin=(0.0, 0.0, 0.0))[source]

Nodes (N, 3) and C3D8 connectivity (M, 8) of a voxel grid of shape.

Node (i, j, k) has index (i * (ny + 1) + j) * (nz + 1) + k; voxel (i, j, k) is element (i * ny + j) * nz + k (C order, the order of labels.ravel()).