magnet.cell.Tetrahedron#
- class magnet.cell.Tetrahedron(nodes=None, mesh_vertices=None, faces=None)#
Bases:
Polyhedron
Constructor
- __init__(nodes=None, mesh_vertices=None, faces=None) None #
Methods
centroid
()Compute centroid coordinates of the tetrahedron.
volume
()Compute volume of the tetrahedron.
Compute the volume and centroid of the tetrahedron.
- centroid()#
Compute centroid coordinates of the tetrahedron.
- Parameters:
None
- Returns:
Array of shape (3,) corresponding to the centroid coordiantes.
- Return type:
np.ndarray of float
- volume()#
Compute volume of the tetrahedron.
- Parameters:
None
- Returns:
Volume value.
- Return type:
float
- volume_center()#
Compute the volume and centroid of the tetrahedron.
- Parameters:
None
- Returns:
volume (float) – The volume of the tetrahedron.
centroid (np.ndarray of float) – Centroid of the tetrahedron.
Inherited Methods
__init__
([nodes, mesh_vertices, faces])inscribed_diameter
([center])Compute the diameter of the inscribed sphere of the cell.
is_inside
(p)Check if a point is inside the polyhedron.
surface_area
()Compute the surface area of the cell.