PatternManager
PatternManager
PatternManager(mesh_maker: Model, time_series_manager: 'TimeSeriesManager | None' = None, ground_motion_manager: 'GroundMotionManager | None' = None)
Local manager for Pattern lifecycle and tag assignment.
The manager is intentionally not a singleton. Each instance owns an independent pattern tag space for one model context.
Use model.pattern to register a loading definition, then add the pattern
to model.process at the point where it should become active in Tcl.
Registration alone does not schedule activation. Time-series and imposed
motion dependencies must belong to this Model.
Example
This defines loading only, not a stable/solvable domain. Uniform excitation, imposed support motions, and DRM have different physical conventions; do not interchange their recorded acceleration interpretations. Consult each concrete pattern and recorder before adding ground motion in postprocessing.
Removing/clearing a pattern edits Python registration, not the active solver. Use an appropriate process action for solver-side load-pattern removal.
Create an empty manager with pattern tags starting at 1.
Methods:
| Name | Description |
|---|---|
plain |
Create and manage a |
uniform_excitation |
Create and manage a |
multiple_support |
Create and manage a |
h5drm |
Create and manage an |
add |
Add an existing pattern and assign a tag if needed. |
get |
Return the pattern with |
get_all |
Return a shallow copy of all managed patterns keyed by tag. |
remove |
Remove a managed pattern and compact the remaining tags. |
clear |
Remove all patterns and clear their assigned tags. |
set_tag_start |
Set the first tag used by this manager and retag existing patterns. |
Methods:
plain
Create and manage a PlainPattern.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_series
|
TimeSeries
|
Managed |
required |
factor
|
float
|
Optional scale factor for all loads in the pattern. |
1.0
|
Returns:
| Type | Description |
|---|---|
PlainPattern
|
Managed |
uniform_excitation
uniform_excitation(dof: int, time_series: TimeSeries, vel0: float = 0.0, factor: float = 1.0) -> UniformExcitation
Create and manage a UniformExcitation pattern.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dof
|
int
|
1-based DOF direction for the uniform excitation. |
required |
time_series
|
TimeSeries
|
Managed acceleration |
required |
vel0
|
float
|
Initial velocity. |
0.0
|
factor
|
float
|
Scale factor applied to the time series. |
1.0
|
Returns:
| Type | Description |
|---|---|
UniformExcitation
|
Managed |
multiple_support
Create and manage a MultipleSupportPattern.
Returns:
| Type | Description |
|---|---|
MultipleSupportPattern
|
Managed empty |
h5drm
h5drm(filepath: str, factor: float, crd_scale: float, distance_tolerance: float, do_coordinate_transformation: int, transform_matrix: Optional[Sequence[float]] = None, origin: Optional[Sequence[float]] = None, *, T00: float | None = None, T01: float | None = None, T02: float | None = None, T10: float | None = None, T11: float | None = None, T12: float | None = None, T20: float | None = None, T21: float | None = None, T22: float | None = None, x00: float | None = None, x01: float | None = None, x02: float | None = None) -> H5DRMPattern
Create and manage an H5DRMPattern.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to the H5DRM dataset file. |
required |
factor
|
float
|
Scale factor for DRM forces and displacements. |
required |
crd_scale
|
float
|
Coordinate scale factor for the DRM dataset. |
required |
distance_tolerance
|
float
|
Node matching tolerance. |
required |
do_coordinate_transformation
|
int
|
|
required |
transform_matrix
|
Optional[Sequence[float]]
|
Optional 9-value transformation matrix. If not
provided, use the named |
None
|
origin
|
Optional[Sequence[float]]
|
Optional 3-value transformed origin. If not provided,
use the named |
None
|
T00
|
float | None
|
Compatibility matrix entry, row 0 column 0. |
None
|
T01
|
float | None
|
Compatibility matrix entry, row 0 column 1. |
None
|
T02
|
float | None
|
Compatibility matrix entry, row 0 column 2. |
None
|
T10
|
float | None
|
Compatibility matrix entry, row 1 column 0. |
None
|
T11
|
float | None
|
Compatibility matrix entry, row 1 column 1. |
None
|
T12
|
float | None
|
Compatibility matrix entry, row 1 column 2. |
None
|
T20
|
float | None
|
Compatibility matrix entry, row 2 column 0. |
None
|
T21
|
float | None
|
Compatibility matrix entry, row 2 column 1. |
None
|
T22
|
float | None
|
Compatibility matrix entry, row 2 column 2. |
None
|
x00
|
float | None
|
Compatibility transformed-origin x coordinate. |
None
|
x01
|
float | None
|
Compatibility transformed-origin y coordinate. |
None
|
x02
|
float | None
|
Compatibility transformed-origin z coordinate. |
None
|
Returns:
| Type | Description |
|---|---|
H5DRMPattern
|
Managed |
add
Add an existing pattern and assign a tag if needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pattern
|
Pattern
|
Unmanaged or already-managed |
required |
Returns:
| Type | Description |
|---|---|
Pattern
|
The same |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If its preassigned tag conflicts with a different object already managed here. |
get
Return the pattern with tag if it exists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Pattern tag to look up. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Pattern]
|
The matching |
remove
Remove a managed pattern and compact the remaining tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Tag of the pattern to remove. Missing tags are ignored. |
required |
set_tag_start
Set the first tag used by this manager and retag existing patterns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_tag
|
int
|
Positive integer for the first assigned pattern tag. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |