Sensitivity Analysis > Theory for the Sensitivity Interface > Issues to Consider Regarding Constraints

Issues to Consider Regarding Constraints
The theory behind sensitivity analysis as presented above (under Theory for Stationary Sensitivity Analysis) assumes that constraints on the multiphysics problem are handled in the same way as with any other equations. This is indeed the case for weak constraints, which are implemented as a part of the main system of equations. Standard pointwise constraints are instead eliminated from the discretized equations at an early stage in the solution process. This elimination is not visible to the sensitivity solver, which therefore may miss some symbolic derivative terms necessary for computing a correct sensitivity.
In particular, if the mixed second derivative of a standard constraint with respect to both PDE solution and control variables is nonzero, sensitivity will not be correctly computed. For example, for a solution variable u and a control variable p, a constraint:
u = p will give correct sensitivity.
u2 = p2 will give correct sensitivity.
u2 = up will give incorrect sensitivity.
If your multiphysics model contains constraints of the problematic type, you can still compute a correct sensitivity, provided that you enable weak constraints in the Constraint Settings section of the corresponding boundary condition node.