class neso_fame.mesh.MeshLayer(Generic[E, B, C], LazilyOffsetable)

Representation of a single “layer” of the mesh.

A layer is a region of the mesh where the elements are conformal and aligned with the magnetic field. A mesh may contain multiple layers, but there will be a non-conformal interface between each of them.

Public members

subdivisions : int = 1

The number of elements deep the layer should be in the x3-direction.

reference_elements : Sequence[E]

A colelction of the Quad or Prism elements making up the layer (without any subdivision).

bounds : Sequence[frozenset[B]]

An ordered collection of sets of Curve or Quad objects (faces or edges, repsectively). Each set describes a particular boundary regions of the layer. The near and far faces of the layer are not included in these.

Constructors

classmethod QuadMeshLayer(...) MeshLayer[Quad, FieldAlignedCurve | StraightLine, Callable[[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], Coords]]

Construct a MeshLayer object made up of quads.

classmethod PrismMeshLayer(...) MeshLayer[Prism, Quad, EndShape]

Construct a MeshLayer object made up of prisms, in a type-safe way.

MeshLayer(reference_elements: Sequence[E], bounds, ...)

Initialize self. See help(type(self)) for accurate signature.

Special methods

__iter__() Iterator[E]

Iterate over all of the elements making up this layer of the mesh.

__len__() int

Return the number of elements in this layer.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

__hash__()

Return hash(self).

Methods

quads() Iterator[Quad]

Iterate over the Quad objects in the layer.

boundaries() Iterator[frozenset[B]]

Iterate over the boundary regions in this layer.

near_faces() Iterator[C]

Iterate over the near faces of the elements in the layer.

far_faces() Iterator[C]

Iterate over the far faces of the elements in the layer.

Properties

property element_type : type[E]

Return the type of the elements of the mesh layer.

property x3_offset : float

Return the offset in the x3 direction.

property is_offset : bool

Indicate whether the object has been offset.


Last update: Sep 23, 2024