Skip to content

API – geometry

HOMER.geometry.cube(scale=1, centre=None, basis=None)

Create a single-element cube mesh.

Constructs a mesh with 8 corner nodes and a single trilinear element (L1Basis × L1Basis × L1Basis), then :meth:~HOMER.mesher.MeshField.rebase-s it to the requested basis (defaulting to cubic Hermite in all directions).

Parameters:

Name Type Description Default
scale float

Side length of the cube. The default is a unit cube.

1
centre Optional[ndarray]

Centre of the cube, shape (3,). Defaults to the origin.

None
basis

Sequence of three 1-D basis classes for the resulting mesh. Defaults to [H3Basis, H3Basis, H3Basis].

None

Returns:

Type Description
Mesh

A :class:~HOMER.mesher.Mesh with the requested basis.