Skip to content

MaskManager

MaskManager

MaskManager(mesh_maker: 'Model')

Query an assembled-mesh snapshot through model.mask.

nodes and elements start fluent selections provided by the mask components. Access requires assembly. The manager builds a cached index from copied mesh data after assembly, or lazily on the first query.

The index stores mesh identifiers and export tag origins separately; use the concrete mask's explicit conversion methods rather than assuming a zero-based point/cell identifier is a solver tag.

Note

Direct edits to the live assembled mesh or export tag origins do not automatically refresh an existing snapshot. Call clear() and start new queries to rebuild it; previously returned masks keep their snapshot. Mask queries do not alter mesh connectivity or apply boundary conditions.

Methods:

Name Description
clear

Drop the cached assembled-mesh index snapshot.

Attributes:

Name Type Description
nodes NodeMask

Start a NodeMask containing all nodes of the cached mesh snapshot.

elements ElementMask

Start an ElementMask containing all elements of the cached snapshot.

Attributes

nodes property

nodes: NodeMask

Start a NodeMask containing all nodes of the cached mesh snapshot.

Raises:

Type Description
RuntimeError

No assembled mesh is available to build an index.

A new selection object is returned for each access, sharing the cached index. Query methods are documented on the concrete NodeMask component.

elements property

elements: ElementMask

Start an ElementMask containing all elements of the cached snapshot.

Raises:

Type Description
RuntimeError

No assembled mesh is available to build an index.

The returned selection shares the index, not the live mutable mesh. Inspect ElementMask's identifier/tag conventions before exporting selections.

Methods:

clear

clear() -> None

Drop the cached assembled-mesh index snapshot.