Cell classes#
This document summarizes the classes denoted to store and handle data about polygonal cells in 1, 2 or 3 dimensions.
- class sigmaepsilon.mesh.cells.H27(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 27-node triquadratic hexahedra.
top 7---14---6 | | | 15--25--13 | | | 4---12---5 middle 19--23--18 | | | 20--26--21 | | | 16--22--17 bottom 3---10---2 | | | 11--24---9 | | | 0----8---1
- class sigmaepsilon.mesh.cells.H8(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 8-node hexahedra.
- ::
top bottom 7–6 3–2 | | | | 4–5 0–1
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the local coordinates of the center of the cell.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns local coordinates of the cell.
- Return type:
- class sigmaepsilon.mesh.cells.L2(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 2-node line segments.
- class sigmaepsilon.mesh.cells.L3(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 3-node line segments.
- class sigmaepsilon.mesh.cells.Q4(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 4-noded bilinear quadrilaterals.
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the local coordinates of the center of the cell.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns local coordinates of the cell.
- Return type:
- class sigmaepsilon.mesh.cells.Q8(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 8-noded quadratic quadrilaterals.
- class Geometry[source]#
- classmethod master_center() ndarray[float][source]#
Returns the local coordinates of the center of the cell.
- Return type:
- classmethod master_coordinates() ndarray[float][source]#
Returns local coordinates of the cell.
- Return type:
- classmethod polybase() tuple[list[Symbol], list[int | Symbol]][source]#
Retruns the polynomial base of the master element.
- Returns:
list – A list of SymPy symbols.
list – A list of monomials.
- class sigmaepsilon.mesh.cells.Q9(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 9-noded biquadratic quadrilaterals.
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the local coordinates of the center of the cell.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns local coordinates of the cell.
- Return type:
- classmethod polybase() Tuple[List][source]#
Retruns the polynomial base of the master element.
- Returns:
list – A list of SymPy symbols.
list – A list of monomials.
- shape_function_derivative_evaluator()#
Returns the first orderderivatives of the shape functions, evaluated at multiple points, according to ‘pcoords’.
— (nP, nNE, 2)
- class sigmaepsilon.mesh.cells.T3(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 3-noded triangles.
Example
>>> from sigmaepsilon.mesh import TriMesh, CartesianFrame, PointData, triangulate >>> from sigmaepsilon.mesh.cells import T3 as CellData >>> frame = CartesianFrame(dim=3) >>> coords, topo, _ = triangulate(size=(800, 600), shape=(10, 10)) >>> pd = PointData(coords=coords, frame=frame) >>> cd = CellData(topo=topo) >>> trimesh = TriMesh(pd, cd) >>> np.isclose(trimesh.area(), 480000.0) True
- class Geometry[source]#
- classmethod master_center() ndarray[float][source]#
Returns the center of the master cell relative to the origo of the master cell.
- Return type:
- classmethod master_coordinates() ndarray[float][source]#
Returns local coordinates of the master cell relative to the origo of the master cell.
- Return type:
- class sigmaepsilon.mesh.cells.T6(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 6-noded triangles.
Example
>>> from sigmaepsilon.mesh import TriMesh, CartesianFrame, PointData, triangulate >>> from sigmaepsilon.mesh.cells import T6 as CellData >>> from sigmaepsilon.mesh.utils.topology.tr import T3_to_T6 >>> A = CartesianFrame(dim=3) >>> coords, topo, _ = triangulate(size=(800, 600), shape=(10, 10)) >>> coords, topo = T3_to_T6(coords, topo) >>> pd = PointData(coords=coords, frame=A) >>> cd = CellData(topo=topo) >>> trimesh = TriMesh(pd, cd) >>> trimesh.area() 480000.0
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the local coordinates of the center of the cell.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns local coordinates of the cell.
- Return type:
- class sigmaepsilon.mesh.cells.TET10(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 10-node tetrahedra.
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the coordinates of the master element.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns the coordinates of the master element.
- Return type:
- class sigmaepsilon.mesh.cells.TET4(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 4-node tetrahedra.
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the coordinates of the master element.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns the coordinates of the master element.
- Return type:
- to_tetrahedra(flatten: bool = True) ndarray[source]#
Returns the topology as a collection of TET4 tetrahedra, represented as a 2d NumPy integer array, where the first axis runs along the tetrahedra, and the second along the nodes.
Only for 3d cells.
- Parameters:
flatten (bool, Optional) – If True, the topology is returned as a 2d array. If False, the length of the first axis equals the number of cells in the block, the length of the second axis equals the number of tetrahedra per cell.
- class sigmaepsilon.mesh.cells.W18(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 18-noded biquadratic wedges.
- class Geometry[source]#
- classmethod master_center() ndarray[float][source]#
Returns the coordinates of the center of the master cell as a NumPy array.
- classmethod master_coordinates() ndarray[float][source]#
Returns local coordinates of the master cell as a NumPy array.
- class sigmaepsilon.mesh.cells.W6(*args, db: CellData[MeshDataLike, PointDataLike] | None = None, pointdata: PointDataLike | None = None, container: MeshDataLike | None = None, **kwargs)[source]#
Class for 6-noded trilinear wedges.
- class Geometry[source]#
- classmethod master_center() ndarray[source]#
Returns the coordinates of the master element.
- Return type:
- classmethod master_coordinates() ndarray[source]#
Returns the coordinates of the master element.
- Return type: