pyfebiopt.xplt.results

Container for XPLT result views.

Results acts as the registry that stitches parsed buffers to their view type. Callers typically access it through xplt.results and index variables by name. The container keeps per-kind dictionaries (nodal, per-domain nodal, item, mult, region) while also remembering field metadata for quick reprs and validation.

Classes

Results

Holds all result views keyed by variable name.

Module Contents

class pyfebiopt.xplt.results.Results(times: collections.abc.Iterable[float])

Holds all result views keyed by variable name.

Access patterns

  • Use results["variable"] to fetch the matching view regardless of storage.

  • Kind-specific dicts (node, node_region, elem_item …) are also available when you need to iterate a subset.

  • The time vector is stored once and shared across every view.

Initialize empty result collections for each storage kind.

node: dict[str, pyfebiopt.xplt.views.NodeResultView]
node_region: dict[str, pyfebiopt.xplt.views.NodeRegionResultView]
elem_item: dict[str, pyfebiopt.xplt.views.ItemResultView]
face_item: dict[str, pyfebiopt.xplt.views.ItemResultView]
elem_mult: dict[str, pyfebiopt.xplt.views.MultResultView]
face_mult: dict[str, pyfebiopt.xplt.views.MultResultView]
elem_region: dict[str, pyfebiopt.xplt.views.RegionResultView]
face_region: dict[str, pyfebiopt.xplt.views.RegionResultView]
__len__() int

Return number of time steps.

times() numpy.ndarray

Return the time vector.

register_node_global(name: str, meta: pyfebiopt.xplt.views._FieldMeta, per_t: list[numpy.ndarray | None], mesh: pyfebiopt.mesh.mesh.Mesh) None

Register a global nodal variable.

register_node_region(name: str, meta: pyfebiopt.xplt.views._FieldMeta, per_name: dict[str, list[numpy.ndarray | None]], region_nodes: dict[str, numpy.ndarray]) None

Register a per-domain nodal variable.

register_item(where: str, name: str, meta: pyfebiopt.xplt.views._FieldMeta, per_name: dict[str, list[numpy.ndarray | None]]) None

Register an item variable for elements or faces.

register_mult(where: str, name: str, meta: pyfebiopt.xplt.views._FieldMeta, per_name: dict[str, list[pyfebiopt.xplt.types.MultLike | None]]) None

Register a per-element-node variable for elements or faces.

register_region(where: str, name: str, meta: pyfebiopt.xplt.views._FieldMeta, per_name: dict[str, list[numpy.ndarray | None]]) None

Register a per-region vector variable for elements or faces.

__getitem__(key: str) pyfebiopt.xplt.views.ItemResultView | pyfebiopt.xplt.views.MultResultView | pyfebiopt.xplt.views.NodeResultView | pyfebiopt.xplt.views.NodeRegionResultView | pyfebiopt.xplt.views.RegionResultView

Look up a variable by name across all locations.

Returns:

Result view matching the variable name.

__repr__() str
__str__