pub struct OdeSolverOptions<T: Scalar> {Show 13 fields
pub max_nonlinear_solver_iterations: usize,
pub max_error_test_failures: usize,
pub max_nonlinear_solver_failures: usize,
pub nonlinear_solver_tolerance: T,
pub min_timestep: T,
pub max_timestep_growth: Option<T>,
pub min_timestep_growth: Option<T>,
pub max_timestep_shrink: Option<T>,
pub min_timestep_shrink: Option<T>,
pub update_jacobian_after_steps: usize,
pub update_rhs_jacobian_after_steps: usize,
pub threshold_to_update_jacobian: T,
pub threshold_to_update_rhs_jacobian: T,
}Expand description
Options for the ODE solver. These options control various aspects of the solver’s behavior. Some options may not be applicable to all solver methods (e.g. implicit vs explicit methods).
Fields§
§max_nonlinear_solver_iterations: usizemaximum number of nonlinear solver iterations per solve (default: 10)
max_error_test_failures: usizemaximum number of error test failures before aborting the solve and returning an error (default: 40)
max_nonlinear_solver_failures: usizemaximum number of nonlinear solver failures before aborting the solve and returning an error (default: 50)
nonlinear_solver_tolerance: Tnonlinear solver convergence tolerance (default: 0.2)
min_timestep: Tminimum allowed timestep size (default: 1e-13)
max_timestep_growth: Option<T>optional maximum timestep growth factor (solver-specific default when None)
min_timestep_growth: Option<T>optional minimum timestep growth factor (solver-specific default when None)
max_timestep_shrink: Option<T>optional maximum timestep shrink factor (solver-specific default when None)
min_timestep_shrink: Option<T>optional minimum timestep shrink factor (solver-specific default when None)
update_jacobian_after_steps: usizemaximum number of steps after which to update the Jacobian (default: 20). This only requires an additional linear solver setup, not evaluation of the full Jacobian.
update_rhs_jacobian_after_steps: usizemaximum number of steps after which to update the RHS Jacobian (default: 50). This evaluates the full Jacobian of the RHS function and requires an additional linear solver setup.
threshold_to_update_jacobian: Tthreshold on the change in timestep size |dt_new / dt_old - 1| to trigger a Jacobian update (default: 0.3)
threshold_to_update_rhs_jacobian: Tthreshold on the change in timestep size |dt_new / dt_old - 1| to trigger a RHS Jacobian update (default: 0.2)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for OdeSolverOptions<T>where
T: Freeze,
impl<T> RefUnwindSafe for OdeSolverOptions<T>where
T: RefUnwindSafe,
impl<T> Send for OdeSolverOptions<T>
impl<T> Sync for OdeSolverOptions<T>
impl<T> Unpin for OdeSolverOptions<T>where
T: Unpin,
impl<T> UnwindSafe for OdeSolverOptions<T>where
T: 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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.