carapace_core/analysis/constraint.rs
1/// Constraint-handling strategy. Closed enum — small, homogeneous,
2/// user-selected per analysis.
3#[derive(Debug, Clone, Copy)]
4pub enum ConstraintHandler {
5 /// Single-point constraints only (fixed DOFs), applied directly via
6 /// `Domain`'s DOF numbering (fixed DOFs get no equation number, so they
7 /// never enter the free-DOF system at all). No Lagrange multipliers, no
8 /// penalty terms. Using this with a `Domain` that has multi-point
9 /// constraints (`Domain::equal_dof`/`rigid_diaphragm`) is a model
10 /// construction error — see `AnalysisBuilder<Ready>::build`; use
11 /// `Transformation` instead.
12 Plain,
13 /// Single-point *and* multi-point constraints: general linear ties
14 /// `u_slave = sum(coeff * u_master)` with masters on any nodes
15 /// (`Domain::add_constraint`, and the helpers built on it:
16 /// `equal_dof`, `rigid_diaphragm`, `rigid_link`). They are resolved at
17 /// `Domain::number_dofs` time by substitution, with no extra unknowns
18 /// (no Lagrange multipliers) and no penalty: a slave that reduces to
19 /// exactly one master with coefficient 1 is literally the same unknown
20 /// (it shares the master's equation number); any other slave is a
21 /// stored linear combination of unknowns that assembly and state
22 /// scatter apply (`Domain::value_at` reads one back). Chains (a slave
23 /// that is another constraint's master) resolve to any depth. The
24 /// constraints are homogeneous, so a fixed master must stay at zero.
25 Transformation,
26}