pub enum ConvergenceTest {
NormUnbalance {
tol: f64,
max_iter: usize,
},
NormDispIncr {
tol: f64,
max_iter: usize,
},
EnergyIncr {
tol: f64,
max_iter: usize,
},
Combined {
force_tol: f64,
moment_tol: f64,
relative_tol: f64,
displacement_tol: Option<f64>,
max_iter: usize,
},
}Expand description
Convergence criterion for Algorithm::Newton/KrylovNewton. Closed enum
. Unused by Algorithm::Linear (which never iterates).
Every variant is evaluated against the accepted state of an
iteration (IterationContext): the residual reassembled after the
iteration’s correction (and any line-search rescaling) was applied, not
the residual that correction was solved against. A force test can
therefore never pass on a stale pre-correction residual.
Variants§
NormUnbalance
Converged once the Euclidean norm of the post-update unbalanced
force residual drops below tol.
NormDispIncr
Converged once the displacement correction’s norm drops below tol.
Does not certify force equilibrium on its own (a stiff or stalled
iteration can take a tiny step at a large residual).
EnergyIncr
Converged once the (absolute) incremental work |du . residual|
(accepted correction against the accepted residual) drops below
tol. Pairs force with translation and moment with rotation
consistently, but its value changes with the work unit and can be
small through cancellation, so it does not certify force
equilibrium on its own either.
Combined
Every configured criterion must pass:
- Force equilibrium (always): on each reduced equation
i,|r_i| <= abs_i + relative_tol * F_ref_i, whereabs_iisforce_tolfor translational equations andmoment_tolfor rotational ones, andF_ref_iis the largest of the committed and predicted external force and the committed internal force on that equation, frozen at the start of the step. A per-equation maximum is used rather than a norm so many quiet DOFs can’t dilute one unbalanced one, and the reference is never the initial or current residual (either can be zero) or the current load alone (which can pass through zero during continuation). - Displacement correction (when
displacement_tolis set): the largest component of the last correction is at mostdisplacement_tol. Under arc length this is the last undamped correction, so a tiny accepted backtracking step can’t fake it.
Implementations§
Source§impl ConvergenceTest
impl ConvergenceTest
Sourcepub fn validate(&self) -> Result<(), AnalysisError>
pub fn validate(&self) -> Result<(), AnalysisError>
Rejects nonfinite or nonpositive tolerances and a zero iteration
budget. relative_tol may be zero; the absolute tolerances may not.
Every Newton-family step runs this; it is public so wire decoders
can reject bad input up front.
Trait Implementations§
Source§impl Clone for ConvergenceTest
impl Clone for ConvergenceTest
Source§fn clone(&self) -> ConvergenceTest
fn clone(&self) -> ConvergenceTest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ConvergenceTest
Source§impl Debug for ConvergenceTest
impl Debug for ConvergenceTest
Source§impl PartialEq for ConvergenceTest
impl PartialEq for ConvergenceTest
impl StructuralPartialEq for ConvergenceTest
Auto Trait Implementations§
impl Freeze for ConvergenceTest
impl RefUnwindSafe for ConvergenceTest
impl Send for ConvergenceTest
impl Sync for ConvergenceTest
impl Unpin for ConvergenceTest
impl UnsafeUnpin for ConvergenceTest
impl UnwindSafe for ConvergenceTest
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.