magnet.cell.Hexahedron#

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

Bases: Polyhedron

Creates global indexing of face nodes based on local indexing.

Constructor

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

Methods

volume_center()

Compute the volume and centroid of the hexahedron.

volume_center() tuple[float, ndarray]#

Compute the volume and centroid of the hexahedron.

Parameters:

None

Returns:

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

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

Notes

Centroid and volume are computed by dividing the hexahedron in 6 tetrahedra using the ‘long diagonal’ (v[1], v[7]).

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.