Skip to content

ConstraintManager

ConstraintManager

ConstraintManager(mesh_maker: 'Model')

Organize boundary and coupling constraints through model.constraint.

Attributes:

Name Type Description
sp SpConstraintManager

Single-point support/fixity definitions.

mp MPConstraintManager

Multipoint kinematic coupling definitions.

Constraint definitions are exported with the model; creating one does not immediately constrain a running solver. Use solver node tags, not zero-based PyVista point indices, for explicit node references. Geometry-derived MP helpers require an assembled mesh. Analysis constraint handlers are a separate namespace under model.analysis.constraint.

Example
from femora import Model

model = Model()
support = model.constraint.sp.fix(node_tag=1, dofs=[1, 1, 1])
assert model.constraint.sp.get(support.tag) is support

Methods:

Name Description
clear

Detach and clear both SP and MP constraint collections.

set_tag_start

Set and apply the tag origin independently to SP and MP registries.

Methods:

clear

clear() -> None

Detach and clear both SP and MP constraint collections.

Meshes and solver files are retained. Existing process references to removed constraints are not automatically edited.

set_tag_start

set_tag_start(start_tag: int) -> None

Set and apply the tag origin independently to SP and MP registries.

Parameters:

Name Type Description Default
start_tag int

Positive origin validated by each registry.

required

Raises:

Type Description
ValueError

Invalid origin. Constraint tags are registry identities, not the solver node tags referenced by the constraints.