ElementManager
ElementManager
Create and register element definitions through model.element.
A definition stores formulation, degrees of freedom, dependencies, and options. A mesh part uses it for its cells; it is not an individual solver element with node connectivity. The definition's registry tag is distinct from the assembled cell tags written to OpenSees.
Attributes:
| Name | Type | Description |
|---|---|---|
beam |
BeamElementManager
|
Beam-column and truss factories. |
brick |
BrickElementManager
|
Three-dimensional continuum factories. |
quad |
QuadElementManager
|
Quadrilateral continuum factories. |
special |
SpecialElementManager
|
Auxiliary and contact element factories. |
Example
Note
Prefer managed dependency objects from the same Model. Material string references are converted to integer tags, not looked up by user name. Transformation names are explicitly unsupported. Removal and retagging do not repair dependent mesh parts or an already assembled mesh.
Methods:
| Name | Description |
|---|---|
add |
Register a definition, assign its tag, and retain it in this model. |
get |
Return a definition by its current registry tag, or None if absent. |
get_all |
Return a shallow registry copy keyed by current definition tag. |
remove |
Detach one definition and compact the tags of surviving definitions. |
clear |
Detach all definitions and clear their tags without deleting meshes. |
set_tag_start |
Set the positive registry tag origin and retag existing definitions. |
Methods:
add
Register a definition, assign its tag, and retain it in this model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element
|
Unmanaged definition, or one already owned here. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
element |
Element
|
The same object, with a registry tag. |
Raises:
| Type | Description |
|---|---|
TypeError
|
The object is not an Element. |
ValueError
|
Another manager owns it or its tag conflicts. |
get
Return a definition by its current registry tag, or None if absent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Value converted through |
required |
get_all
Return a shallow registry copy keyed by current definition tag.
Object values are shared with the model; editing the returned dictionary does not add or remove registrations.
remove
Detach one definition and compact the tags of surviving definitions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Current registry tag; missing tags are ignored. |
required |
Warning
Held integer tags can become stale. Dependent meshes are not removed and solver cells are not individually deleted by this call.
clear
Detach all definitions and clear their tags without deleting meshes.
Materials, sections, transformations, and output files are not cleared. Rebuild dependent model data before exporting after a registry reset.
set_tag_start
Set the positive registry tag origin and retag existing definitions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_tag
|
int
|
First definition tag, validated by the tagging policy. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The tag origin is invalid. This setting is unrelated to
|