plugins.contracts.OwnedNodes
plugins.contracts.OwnedNodes(
seeds,
patches,
arity,
entity_dim,
blend,
midside,
edge_parents,
cells,
bar,
design=dict(),
)Every node of a Gmsh mesh, with the patches that own it — the seam’s record.
Produced by the public Gmsh route (:func:cadjoint.fem.gmsh.assign_ownership, a residual test against the scene’s public patch fields and nothing else) and consumed by the private node_map, which re-solves each node against its owners under a design change. Rows follow the :class:~cadjoint.fem.tetmesh.TetMesh layout: boundary corners, then interior corners, then the midside block, so num_surface and edge_parents describe contiguous blocks.
Attributes
| Name | Type | Description |
|---|---|---|
| seeds | np.ndarray | Node positions at the design they were meshed at, (P, 3) float64. |
| patches | np.ndarray | Per node, the global patch indices (in :func:cadjoint.meshing.patch_fields.scene_patch_fields order, leaves flattened) it must satisfy, (P, 3) int32, -1-padded. |
| arity | np.ndarray | Count of non--1 entries per row, (P,) int8; 0 for a volume node and for a blend node. |
| entity_dim | np.ndarray | The Gmsh entity the node lies on — 0 vertex, 1 curve, 2 surface, 3 volume — (P,) int8. |
| blend | np.ndarray | Boundary nodes no patch owns (arity == 0 and entity_dim < 3): the scene’s own zero set holds them. |
| midside | np.ndarray | Rows of the order-2 midside block, (P,) bool. |
| edge_parents | np.ndarray | Corner pairs of the midside block, (M, 2) int32; row k describes node num_corner + k. Empty at order 1. |
| cells | np.ndarray | The frozen connectivity, (T, 4 \| 10) int32 in meshio order. Carried because the map’s interior follow needs the node adjacency, which nothing else in the record can supply. |
| bar | float | The residual bar \|f_patch\| <= bar ownership was decided at, in model units. |
| design | dict[str, np.ndarray] | The free-parameter values at meshing time, name to array, so the map can check it is being asked about the design the seeds belong to. |
Methods
| Name | Description |
|---|---|
| arity_counts | arity -> node count for arities 0 to 3. |
| design_digest | A short hash of the design the seeds were meshed at. |
| from_mapping | Rebuild the record from :meth:to_mapping’s output. |
| to_mapping | The record as a plain mapping of arrays (what a wire form carries). |
arity_counts
plugins.contracts.OwnedNodes.arity_counts()arity -> node count for arities 0 to 3.
design_digest
plugins.contracts.OwnedNodes.design_digest()A short hash of the design the seeds were meshed at.
from_mapping
plugins.contracts.OwnedNodes.from_mapping(data)Rebuild the record from :meth:to_mapping’s output.
to_mapping
plugins.contracts.OwnedNodes.to_mapping()The record as a plain mapping of arrays (what a wire form carries).