magnet.cell.Pyramid#

class magnet.cell.Pyramid(nodes=None, mesh_vertices=None, faces=None)#

Bases: Polyhedron

Constructor

__init__(nodes=None, mesh_vertices=None, faces=None) None#

Methods

volume_center(v)

Compute volume and centroid of the pyramid with quadrilateral base.

volume_center(v: ndarray) tuple[float, ndarray]#

Compute volume and centroid of the pyramid with quadrilateral base.

Parameters:

None

Returns:

  • volume (float) – The volume of the pyramid.

  • centroid (np.ndarray of float) – Centroid of the pyramid.

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.

volume()

Compute the volume of the polyhedron.