Skip to main content

ConvergenceTest

Enum ConvergenceTest 

Source
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.

Fields

§tol: f64
§max_iter: usize
§

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).

Fields

§tol: f64
§max_iter: usize
§

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.

Fields

§tol: f64
§max_iter: usize
§

Combined

Every configured criterion must pass:

  • Force equilibrium (always): on each reduced equation i, |r_i| <= abs_i + relative_tol * F_ref_i, where abs_i is force_tol for translational equations and moment_tol for rotational ones, and F_ref_i is 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_tol is set): the largest component of the last correction is at most displacement_tol. Under arc length this is the last undamped correction, so a tiny accepted backtracking step can’t fake it.

Fields

§force_tol: f64
§moment_tol: f64
§relative_tol: f64
§displacement_tol: Option<f64>
§max_iter: usize

Implementations§

Source§

impl ConvergenceTest

Source

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

Source§

fn clone(&self) -> ConvergenceTest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ConvergenceTest

Source§

impl Debug for ConvergenceTest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ConvergenceTest

Source§

fn eq(&self, other: &ConvergenceTest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ConvergenceTest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.