phipict.meshing.Hex

class phipict.meshing.Hex(corners: ~collections.abc.Sequence[~collections.abc.Sequence[float] | ~torch.Tensor], cells: tuple[int | None, int | None, int | None] = (None, None, None), grading: ~collections.abc.Sequence[~phipict.meshing.grading.Grading | float | int | None] | ~phipict.meshing.grading.Grading | float | int | None = None, edges: ~collections.abc.Sequence[~phipict.meshing.shapes.CornerEdge] = <factory>, patches: ~phipict.meshing.boundary.FacePatches | None = None, name: str = 'block')[source]

A 3D block of a BlockMesh.

corners

Eight corners in solver order (i + 2 j + 4 k for (x, y, z) = (i, j, k)).

Type:

sequence of point

cells

Cells along x, y and z; None to infer from neighbours.

Type:

tuple of int or None

grading

Grading per axis (or one for all); None to infer from neighbours.

Type:

sequence or Grading or float or None

edges

Curved edges or per-edge gradings.

Type:

sequence of CornerEdge

patches

Patches of the faces.

Type:

FacePatches or None

name

Name of the block.

Type:

str

__init__(corners: ~collections.abc.Sequence[~collections.abc.Sequence[float] | ~torch.Tensor], cells: tuple[int | None, int | None, int | None] = (None, None, None), grading: ~collections.abc.Sequence[~phipict.meshing.grading.Grading | float | int | None] | ~phipict.meshing.grading.Grading | float | int | None = None, edges: ~collections.abc.Sequence[~phipict.meshing.shapes.CornerEdge] = <factory>, patches: ~phipict.meshing.boundary.FacePatches | None = None, name: str = 'block') → None

Methods

__init__(corners, cells, int | None, ...)

edge_list()

[axis][e] edges.

Attributes

cells

grading

interpolation

Interpolation of the interior (always transfinite in 3D).

name

ndims

Number of spatial dimensions.

patches

corners

edges