TestManager
TestManager
Bases: TaggedComponentManager[Test]
Create iteration tests through model.analysis.test.
Factories return registered Test definitions; they do not evaluate a solution in Python. Keyword options pass to the matching Components/analysis convergence test constructor. Tolerances depend on units, equation scaling, and the chosen norm; one tolerance value is not interchangeable across test families.
max_iter bounds solver iterations, not the number of analysis steps. Print flags can change diagnostics and, for some tests, failure handling; consult the concrete test before selecting them. A passed test alone does not prove physical accuracy, and an explicit linear update may not use iteration tests.
Initialize the TestManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analysis_manager
|
AnalysisManager
|
The parent AnalysisManager instance. |
required |
Methods:
| Name | Description |
|---|---|
normunbalance |
Create a NormUnbalance convergence test. |
normdispincr |
Create a NormDispIncr convergence test. |
energyincr |
Create an EnergyIncr convergence test. |
relativenormunbalance |
Create a RelativeNormUnbalance convergence test. |
relativenormdispincr |
Create a RelativeNormDispIncr convergence test. |
relativetotalnormdispincr |
Create a RelativeTotalNormDispIncr convergence test. |
relativeenergyincr |
Create a RelativeEnergyIncr convergence test. |
fixednumiter |
Create a FixedNumIter convergence test. |
normdispandunbalance |
Create a NormDispAndUnbalance convergence test. |
normdisporunbalance |
Create a NormDispOrUnbalance convergence test. |
Methods:
normunbalance
normunbalance(*, tol: float, max_iter: int, print_flag: int = 0, norm_type: int = 2) -> NormUnbalanceTest
Create a NormUnbalance convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
NormUnbalanceTest
|
Registered definition. Creating it does not run OpenSees. |
normdispincr
normdispincr(*, tol: float, max_iter: int, print_flag: int = 0, norm_type: int = 2) -> NormDispIncrTest
Create a NormDispIncr convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
NormDispIncrTest
|
Registered definition. Creating it does not run OpenSees. |
energyincr
Create an EnergyIncr convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
EnergyIncrTest
|
Registered definition. Creating it does not run OpenSees. |
relativenormunbalance
relativenormunbalance(*, tol: float, max_iter: int, print_flag: int = 0, norm_type: int = 2) -> RelativeNormUnbalanceTest
Create a RelativeNormUnbalance convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
RelativeNormUnbalanceTest
|
Registered definition. Creating it does not run OpenSees. |
relativenormdispincr
relativenormdispincr(*, tol: float, max_iter: int, print_flag: int = 0, norm_type: int = 2) -> RelativeNormDispIncrTest
Create a RelativeNormDispIncr convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
RelativeNormDispIncrTest
|
Registered definition. Creating it does not run OpenSees. |
relativetotalnormdispincr
relativetotalnormdispincr(*, tol: float, max_iter: int, print_flag: int = 0, norm_type: int = 2) -> RelativeTotalNormDispIncrTest
Create a RelativeTotalNormDispIncr convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
RelativeTotalNormDispIncrTest
|
Registered definition. Creating it does not run OpenSees. |
relativeenergyincr
Create a RelativeEnergyIncr convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol
|
float
|
Tolerance criteria for convergence. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
RelativeEnergyIncrTest
|
Registered definition. Creating it does not run OpenSees. |
fixednumiter
Create a FixedNumIter convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_iter
|
int
|
Exact number of iterations to perform at each step. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
component |
FixedNumIterTest
|
Registered definition. Creating it does not run OpenSees. |
normdispandunbalance
normdispandunbalance(*, tol_incr: float, tol_r: float, max_iter: int, print_flag: int = 0, norm_type: int = 2, max_incr: int = -1) -> NormDispAndUnbalanceTest
Create a NormDispAndUnbalance convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol_incr
|
float
|
Tolerance for displacement increment norm. |
required |
tol_r
|
float
|
Tolerance for unbalanced force residual norm. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
max_incr
|
int
|
Maximum times the error can increase before giving up. Use -1 for default. |
-1
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
NormDispAndUnbalanceTest
|
Registered definition. Creating it does not run OpenSees. |
normdisporunbalance
normdisporunbalance(*, tol_incr: float, tol_r: float, max_iter: int, print_flag: int = 0, norm_type: int = 2, max_incr: int = -1) -> NormDispOrUnbalanceTest
Create a NormDispOrUnbalance convergence test.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tol_incr
|
float
|
Tolerance for displacement increment norm. |
required |
tol_r
|
float
|
Tolerance for unbalanced force residual norm. |
required |
max_iter
|
int
|
Maximum number of iterations to perform before returning failure. |
required |
print_flag
|
int
|
Print control flag. 0 prints nothing, 1 prints norm info each iteration, 2 prints norms and iterations at success, 4 prints norms, displacement, and residual vectors, 5 prints warnings only. |
0
|
norm_type
|
int
|
Mathematical norm type to use. 0 for Max-norm, 1 for 1-norm, 2 for 2-norm (default). |
2
|
max_incr
|
int
|
Maximum times the error can increase before giving up. Use -1 for default. |
-1
|
Returns:
| Name | Type | Description |
|---|---|---|
component |
NormDispOrUnbalanceTest
|
Registered definition. Creating it does not run OpenSees. |
Registry operations
The following shared methods are available on this manager namespace. They manage definitions, not an active solver. See shared registry operations for add, create, get, get_all, remove, clear, set_tag_start, and get_available_types.