pub struct StiffnessDetector<F: IntegrateFloat> { /* private fields */ }Expand description
Enhanced stiffness detector that uses multiple indicators
Implementations§
Source§impl<F: IntegrateFloat> StiffnessDetector<F>
impl<F: IntegrateFloat> StiffnessDetector<F>
Sourcepub fn with_config(config: StiffnessDetectionConfig<F>) -> Self
pub fn with_config(config: StiffnessDetectionConfig<F>) -> Self
Create a new stiffness detector with specific configuration
Sourcepub fn record_step(
&mut self,
step_size: F,
error: F,
newton_iterations: usize,
rejected: bool,
steps_taken: usize,
)
pub fn record_step( &mut self, step_size: F, error: F, newton_iterations: usize, rejected: bool, steps_taken: usize, )
Record a step for stiffness analysis
Sourcepub fn is_stiff(
&self,
_current_method_is_stiff: bool,
steps_sinceswitch: usize,
) -> bool
pub fn is_stiff( &self, _current_method_is_stiff: bool, steps_sinceswitch: usize, ) -> bool
Check if the problem is stiff based on collected indicators
Sourcepub fn reset_after_switch(&mut self)
pub fn reset_after_switch(&mut self)
Reset indicators after method switch
Sourcepub fn stiffness_score(&self) -> F
pub fn stiffness_score(&self) -> F
Get current stiffness score (-1.0 to 1.0, where positive means stiff)
Sourcepub fn estimate_stiffness_from_jacobian(&mut self, jacobian: &Array2<F>) -> F
pub fn estimate_stiffness_from_jacobian(&mut self, jacobian: &Array2<F>) -> F
Estimate stiffness ratio using eigenvalues of the Jacobian
Trait Implementations§
Source§impl<F: Clone + IntegrateFloat> Clone for StiffnessDetector<F>
impl<F: Clone + IntegrateFloat> Clone for StiffnessDetector<F>
Source§fn clone(&self) -> StiffnessDetector<F>
fn clone(&self) -> StiffnessDetector<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Debug + IntegrateFloat> Debug for StiffnessDetector<F>
impl<F: Debug + IntegrateFloat> Debug for StiffnessDetector<F>
Source§impl<F: IntegrateFloat> Default for StiffnessDetector<F>
impl<F: IntegrateFloat> Default for StiffnessDetector<F>
Auto Trait Implementations§
impl<F> Freeze for StiffnessDetector<F>where
F: Freeze,
impl<F> RefUnwindSafe for StiffnessDetector<F>where
F: RefUnwindSafe,
impl<F> Send for StiffnessDetector<F>where
F: Send,
impl<F> Sync for StiffnessDetector<F>where
F: Sync,
impl<F> Unpin for StiffnessDetector<F>where
F: Unpin,
impl<F> UnwindSafe for StiffnessDetector<F>where
F: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more