meshes.topology Module

Provides the data structure that supplies topological information on meshes.

class pysofe.meshes.topology.MeshTopology(cells, dimension)[source]

Stores topological information on a mesh such as its entities and connectivity information.

Parameters:
  • cells (array_like) – The connectivity array of the mesh cells
  • dimension (int) – The spatial dimension of the mesh cells
n_entities

The numbers of elements for every topological dimension

get_connectivity(d, dd, return_indices=False)[source]

Returns the incidence relation d -> dd, i.e. for each each d-dimensional mesh entity its incident entities of topological dimension dd.

Parameters:
  • dd (d,) – The topological dimensions of the entities involved
  • return_indices (bool) – Whether to return the indices of the incident entities instead of the sparse incidence matrix
get_entities(d)[source]

Returns the array of all d-dimensional mesh entities represented by the indices of their incident vertices.

Parameters:d (int) – The topological dimension of the mesh entities to return
get_boundary(d)[source]

Returns boolean array specifying the boundary entities of topological dimension d.

Parameters:d (int) – The topological dimension of the desired boundary entities