Skip to main content

Mesh

Mesh(nodes, faces, lattice, crs=None)

An immutable refined quad mesh.

Parameters

Name Type Description Default
nodes array_like of float, shape (n, 2) Node coordinates. required
faces array_like of int, shape (m, k) Node indices of each face, counterclockwise, padded at the end with -1. required
lattice Lattice The lattice the mesh lives on. required
crs pyproj.CRS or str or int Projected coordinate reference system of the coordinates, or None when it is unknown; anything pyproj.CRS.from_user_input accepts. None

Raises

Name Type Description
InputError If the arrays have the wrong shape, coordinates are not finite, a face has fewer than three nodes, refers to a missing node or has padding before a node, or the CRS is invalid or geographic (degrees).

Notes

The arrays are stored as read-only copies. Two meshes are compared on their cells, not with ==.

Attributes

Name Description
crs
face_sizes Number of nodes of each face.
faces
lattice
nodes