Skip to content

LagrangeConstraintHandler

LagrangeConstraintHandler

LagrangeConstraintHandler(alpha_s: float = 1.0, alpha_m: float = 1.0)

Bases: ConstraintHandler

Lagrange multipliers constraint handler.

LagrangeConstraintHandler enforces constraints exactly by introducing new degrees of freedom (Lagrange multipliers) representing the constraint forces.

Tcl form

constraints Lagrange [<alphaS> <alphaM>]

Note
  • Introduces additional equations, which changes the size of the system matrix.
  • Can result in zero diagonal terms in the system matrix.
Example
from femora.core.model import Model

model = Model()
handler = model.analysis.constraint.lagrange(alpha_s=1.0, alpha_m=1.0)

Create a Lagrange constraint handler.

Parameters:

Name Type Description Default
alpha_s float

Scaling factor for single-point constraints.

1.0
alpha_m float

Scaling factor for multi-point constraints.

1.0