Mesh#
- class felupe.Mesh(points, cells, cell_type=None)[source]#
A mesh with points, cells and optional a specified cell type.
- Parameters:
points (ndarray) – Point coordinates.
cells (ndarray) – Point-connectivity of cells.
cell_type (str or None, optional) – An optional string in VTK-convention that specifies the cell type (default is None). Necessary when a mesh is saved to a file.
- points#
Point coordinates.
- Type:
ndarray
- cells#
Point-connectivity of cells.
- Type:
ndarray
- cell_type#
A string in VTK-convention that specifies the cell type.
- Type:
str or None
- npoints#
Amount of points.
- Type:
int
- dim#
Dimension of mesh point coordinates.
- Type:
int
- ndof#
Amount of degrees of freedom.
- Type:
int
- ncells#
Amount of cells.
- Type:
int
- points_with_cells#
Array with points connected to cells.
- Type:
array
- points_without_cells#
Array with points not connected to cells.
- Type:
array
- cells_per_point#
Array which counts connected cells per point. Used for averging results.
- Type:
array
- disconnect(points_per_cell=None, calc_points=True)[source]#
Return a new instance of a Mesh with disconnected cells. Optionally, the points-per-cell may be specified (must be lower or equal the number of points- per-cell of the original Mesh). If the Mesh is to be used as a dual Mesh, then the point-coordinates do not have to be re-created because they are not used.
- class felupe.MeshContainer(meshes, merge=False, decimals=None)[source]#
A container which operates on a list of meshes with identical dimensions.
- Parameters:
meshes ([felupe.Mesh, ...]) – A list with meshes.
- dim#
The (identical) dimension of all underlying meshes.
- Type:
int
- points#
Point coordinates.
- Type:
ndarray
- meshes#
A list with meshes.
- Type:
[felupe.Mesh, …]