Skip to content

EnergyIncrTest

EnergyIncrTest

EnergyIncrTest(tol: float, max_iter: int, print_flag: int = 0)

Bases: Test

Energy increment convergence test.

EnergyIncrTest checks the work/energy increment against a tolerance. The energy increment is computed as 0.5 * dU^T * R, where dU is the displacement increment and R is the residual force vector.

Tcl form

test EnergyIncr <tol> <maxIter> <printFlag>

Example
from femora.core.model import Model

model = Model()
test = model.analysis.test.energyincr(
    tol=1e-6,
    max_iter=100,
    print_flag=1,
)

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