pub enum ConvexAdjointError {
Unconverged {
step: usize,
iterations: usize,
residual: f64,
},
SingularKkt {
step: usize,
},
BodyBodyContact {
step: usize,
},
UnsupportedGeometry {
step: usize,
body: usize,
},
}Expand description
Why an adjoint pass refused to produce a gradient.
Every variant is a loud refusal in place of a silently wrong number.
Variants§
Unconverged
A step’s contact solve did not converge, so its solution is not a KKT point and the IFT does not apply.
Fields
SingularKkt
The KKT matrix at a step’s converged active set is singular — the derivative genuinely does not exist there.
BodyBodyContact
body-body contacts are supported; this variant is never constructed and will be removed in the next minor release
Formerly: the trajectory produced a body-body contact, which this adjoint did not cover.
Body-body contacts are differentiated now — see Anchor::Pair — and
nothing constructs this variant any more. It is retained for one release
so that a downstream match on ConvexAdjointError does not break,
and because a caller that special-cased this refusal (falling back to a
sampling optimizer, say) should get a compile-time nudge to delete that
branch rather than silently keeping dead code that will never fire.
Fields
UnsupportedGeometry
A detected contact could not be pinned to a material anchor on its body (unsupported geometry variant).
Trait Implementations§
Source§impl Clone for ConvexAdjointError
impl Clone for ConvexAdjointError
Source§fn clone(&self) -> ConvexAdjointError
fn clone(&self) -> ConvexAdjointError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConvexAdjointError
impl Debug for ConvexAdjointError
Source§impl Display for ConvexAdjointError
impl Display for ConvexAdjointError
Source§impl Error for ConvexAdjointError
impl Error for ConvexAdjointError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()