AnalysisManager
AnalysisManager
Configure solver analyses through model.analysis.
Attributes:
| Name | Type | Description |
|---|---|---|
constraint |
ConstraintHandlerManager
|
Enforcement method for domain constraints. |
numberer |
NumbererManager
|
Cached equation-ordering definitions. |
system |
SystemManager
|
Linear equation solver definitions. |
algorithm |
AlgorithmManager
|
Solution algorithm definitions. |
test |
TestManager
|
Convergence test definitions. |
integrator |
IntegratorManager
|
Static/load or transient/time integration definitions. |
Factories return registered Analysis objects; add them to model.process
to schedule their solver commands. They do not run a solver in Python.
Analysis constraint handlers differ from domain constraints created through
model.constraint. All solution choices must suit the model, MPI build,
integrator, and physical problem; registration cannot establish that suitability.
Example
from femora import Model
model = Model()
gravity = model.analysis.static(
name="gravity",
constraint_handler=model.analysis.constraint.transformation(),
numberer=model.analysis.numberer.rcm(),
system=model.analysis.system.bandgeneral(),
algorithm=model.analysis.algorithm.newton(),
test=model.analysis.test.normdispincr(tol=1e-8, max_iter=30),
integrator=model.analysis.integrator.loadcontrol(incr=0.1),
num_steps=10,
)
model.process.add_step(gravity, "Equilibrate gravity")
assert model.analysis.get("gravity") is gravity
This configures a sequence, not a complete supported/loaded domain. Explicit transient schemes require stability and mass checks; retry limits and convergence tolerances are not substitutes for those checks.
Methods:
| Name | Description |
|---|---|
static |
Create and register a static Analysis. |
transient |
Create and register a transient Analysis. |
variable_transient |
Create and register a variable-transient Analysis. |
default_transient |
Create a convenience transient configuration with overridable defaults. |
add |
Register an analysis with a unique name and local tag. |
get |
Resolve an analysis by tag, name, or direct object. |
get_all |
Return a shallow tag-to-analysis snapshot with shared definitions. |
remove |
Detach the resolved analysis and compact remaining registry tags. |
clear |
Detach analyses and clear all owned solution-component collections. |
set_tag_start |
Set the positive analysis-tag origin and retag registered analyses. |
update_constraint_handler |
Replace the resolved analysis's constraint-handler reference. |
update_numberer |
Replace a definition's equation-ordering reference without running it. |
update_system |
Replace a definition's linear-system reference without solving equations. |
update_algorithm |
Replace a definition's algorithm reference without solver execution. |
update_test |
Replace a definition's convergence-test reference. |
update_integrator |
Replace an integrator while checking static/transient family compatibility. |
Methods:
static
static(name: str, constraint_handler: ConstraintHandler, numberer: Numberer, system: System, algorithm: Algorithm, test: Test, integrator: StaticIntegrator, num_steps: int, max_retries: int = 10) -> Analysis
Create and register a static Analysis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique analysis name. |
required |
constraint_handler
|
ConstraintHandler
|
Constraint handler for boundary-condition enforcement. |
required |
numberer
|
Numberer
|
Degree-of-freedom numberer. |
required |
system
|
System
|
Linear solver system. |
required |
algorithm
|
Algorithm
|
Nonlinear solution algorithm. |
required |
test
|
Test
|
Convergence test. |
required |
integrator
|
StaticIntegrator
|
Static integrator. |
required |
num_steps
|
int
|
Number of static analysis steps. |
required |
max_retries
|
int
|
Same-step retries before reporting failure. |
10
|
Returns:
| Type | Description |
|---|---|
Analysis
|
The registered Analysis instance. |
transient
transient(name: str, constraint_handler: ConstraintHandler, numberer: Numberer, system: System, algorithm: Algorithm, test: Test, integrator: TransientIntegrator, dt: float | None = None, num_steps: int | None = None, final_time: float | None = None, dt_min: float | None = None, dt_max: float | None = None, num_sublevels: int | None = None, num_substeps: int | None = None, max_retries: int = 10, initialize: bool = False) -> Analysis
Create and register a transient Analysis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique analysis name. |
required |
constraint_handler
|
ConstraintHandler
|
Constraint handler for boundary-condition enforcement. |
required |
numberer
|
Numberer
|
Degree-of-freedom numberer. |
required |
system
|
System
|
Linear solver system. |
required |
algorithm
|
Algorithm
|
Nonlinear solution algorithm. |
required |
test
|
Test
|
Convergence test. |
required |
integrator
|
TransientIntegrator
|
Transient integrator. |
required |
dt
|
float | None
|
Constant time-step increment. Required unless both dt_min and dt_max are provided. |
None
|
num_steps
|
int | None
|
Optional number of transient steps. |
None
|
final_time
|
float | None
|
Optional end time. Exactly one of |
None
|
dt_min
|
float | None
|
Optional first time step for a linear time-step ramp. |
None
|
dt_max
|
float | None
|
Optional last time step for a linear time-step ramp. |
None
|
num_sublevels
|
int | None
|
Optional transient sublevel count for retry logic. |
None
|
num_substeps
|
int | None
|
Optional transient substep count for retry logic. |
None
|
max_retries
|
int
|
Same-step retries before substepping or failure. |
10
|
initialize
|
bool
|
Run OpenSees |
False
|
Returns:
| Type | Description |
|---|---|
Analysis
|
The registered Analysis instance. |
variable_transient
variable_transient(name: str, constraint_handler: ConstraintHandler, numberer: Numberer, system: System, algorithm: Algorithm, test: Test, integrator: TransientIntegrator, dt: float, dt_min: float, dt_max: float, jd: int, num_steps: int | None = None, final_time: float | None = None, num_sublevels: int | None = None, num_substeps: int | None = None, max_retries: int = 10) -> Analysis
Create and register a variable-transient Analysis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique analysis name. |
required |
constraint_handler
|
ConstraintHandler
|
Constraint handler for boundary-condition enforcement. |
required |
numberer
|
Numberer
|
Degree-of-freedom numberer. |
required |
system
|
System
|
Linear solver system. |
required |
algorithm
|
Algorithm
|
Nonlinear solution algorithm. |
required |
test
|
Test
|
Convergence test. |
required |
integrator
|
TransientIntegrator
|
Transient integrator. |
required |
dt
|
float
|
Initial time-step increment. |
required |
dt_min
|
float
|
Minimum allowable time step. |
required |
dt_max
|
float
|
Maximum allowable time step. |
required |
jd
|
int
|
Desired number of iterations per step. |
required |
num_steps
|
int | None
|
Optional number of transient steps. |
None
|
final_time
|
float | None
|
Optional end time. Exactly one of |
None
|
num_sublevels
|
int | None
|
Optional transient sublevel count for retry logic. |
None
|
num_substeps
|
int | None
|
Optional transient substep count for retry logic. |
None
|
max_retries
|
int
|
Same-step retries before substepping or failure. |
10
|
Returns:
| Type | Description |
|---|---|
Analysis
|
The registered Analysis instance. |
default_transient
default_transient(username: str, dt: float, num_steps: int | None = None, final_time: float | None = None, options: dict | None = None) -> Analysis
Create a convenience transient configuration with overridable defaults.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Suffix for the name |
required |
dt
|
float
|
Initial analysis time increment in model time units. |
required |
num_steps
|
int | None
|
Requested steps, exclusive with final_time. |
None
|
final_time
|
float | None
|
Requested end time, exclusive with num_steps. |
None
|
options
|
dict | None
|
Overrides for numberer, integrator, system, test, algorithm, constraint_handler, max_retries, num_sublevels, num_substeps. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
analysis |
Analysis
|
Registered transient definition. Defaults include ParallelRCM, Newmark(0.5, 0.25), Mumps, EnergyIncr(1e-3, 20, 2), ModifiedNewton with factor_once, Transformation, and 10 retries. |
Raises:
| Type | Description |
|---|---|
ValueError
|
Both/neither duration selectors are supplied, or construction or registration validation fails. |
Note
This convenience configuration is not a calibration recommendation. Default factory expressions are evaluated even when an options key overrides their result, so additional stack objects may be registered.
add
Register an analysis with a unique name and local tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analysis
|
Analysis
|
Unmanaged object or one already owned here. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
analysis |
Analysis
|
Original registered object. |
Raises:
| Type | Description |
|---|---|
TypeError
|
Input is not an Analysis. |
ValueError
|
Duplicate name, conflicting tag, or foreign ownership. |
get
Resolve an analysis by tag, name, or direct object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
int | str | Analysis
|
Integer tag, exact name followed by a case-insensitive fallback, or an Analysis object passed unchanged. |
required |
Raises:
| Type | Description |
|---|---|
KeyError
|
Tag/name is absent. |
TypeError
|
Identifier type is unsupported. |
Direct object input is not an ownership validation operation.
get_all
Return a shallow tag-to-analysis snapshot with shared definitions.
remove
Detach the resolved analysis and compact remaining registry tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
int | str | Analysis
|
Reference accepted by get(). |
required |
Missing lookup keys raise KeyError. Process steps and stack component registries are not removed or rewritten, and no solver command executes.
clear
Detach analyses and clear all owned solution-component collections.
Process steps, mesh geometry, and output files are retained. Clear or rebuild the process before exporting references to removed analyses.
set_tag_start
Set the positive analysis-tag origin and retag registered analyses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_tag
|
int
|
Origin validated by the tagging policy. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Invalid origin. Stack component and solver node tags are unchanged. |
update_constraint_handler
update_constraint_handler(identifier: Union[int, str, Analysis], constraint_handler: ConstraintHandler) -> None
Replace the resolved analysis's constraint-handler reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
int | str | Analysis
|
Reference accepted by get(). |
required |
constraint_handler
|
ConstraintHandler
|
New solution-stack component. |
required |
This direct assignment does not execute the solver or validate compatibility.
update_numberer
update_system
update_algorithm
update_test
update_integrator
Replace an integrator while checking static/transient family compatibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
int | str | Analysis
|
Reference accepted by get(). |
required |
integrator
|
Integrator
|
Replacement integration component. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
A Static analysis receives a non-static integrator or a transient analysis receives a non-transient integrator. |
This family check does not verify time-step stability or model mass suitability.