pub struct PseudoArcLengthContinuation {
pub tol: f64,
pub max_iter: usize,
pub max_iter_fast: usize,
pub ds_min: f64,
pub ds_max: f64,
}Expand description
Configuration and state for pseudo-arclength continuation.
Combines the predictor (pseudo_arclength_step) and corrector
(corrector_newton) into a single stepper. Step-size adaptation
doubles/halves ds based on whether the corrector converges within
max_iter_fast Newton steps.
Fields§
§tol: f64Newton convergence tolerance.
max_iter: usizeMaximum Newton iterations per corrector call.
max_iter_fast: usizeIf the corrector converges in ≤ this many steps, double ds.
ds_min: f64Minimum allowed ds.
ds_max: f64Maximum allowed ds.
Implementations§
Source§impl PseudoArcLengthContinuation
impl PseudoArcLengthContinuation
Sourcepub fn new(
tol: f64,
max_iter: usize,
max_iter_fast: usize,
ds_min: f64,
ds_max: f64,
) -> Self
pub fn new( tol: f64, max_iter: usize, max_iter_fast: usize, ds_min: f64, ds_max: f64, ) -> Self
Create a new continuation stepper.
Sourcepub fn step(
&self,
state: &mut ContinuationState,
f: &dyn Fn(&[f64], f64) -> Vec<f64>,
jac: &dyn Fn(&[f64], f64) -> Vec<Vec<f64>>,
) -> Option<ContinuationState>
pub fn step( &self, state: &mut ContinuationState, f: &dyn Fn(&[f64], f64) -> Vec<f64>, jac: &dyn Fn(&[f64], f64) -> Vec<Vec<f64>>, ) -> Option<ContinuationState>
Advance state by one step, returning the accepted corrected state.
Returns None if the corrector fails to converge even after halving ds.
Auto Trait Implementations§
impl Freeze for PseudoArcLengthContinuation
impl RefUnwindSafe for PseudoArcLengthContinuation
impl Send for PseudoArcLengthContinuation
impl Sync for PseudoArcLengthContinuation
impl Unpin for PseudoArcLengthContinuation
impl UnsafeUnpin for PseudoArcLengthContinuation
impl UnwindSafe for PseudoArcLengthContinuation
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.