pub struct SolverState {
pub dt: f64,
pub n_iter: u8,
pub norm_err: Option<f64>,
pub norm_err_rel: Option<f64>,
pub t_curr: f64,
pub states: Vec<f64>,
}
Expand description
Solver is considered considered converged when any one of the following conditions are met:
norm_err
is less thanatol
norm_err_rel
is less thanrtol
n_iter
>=n_max_iter
Fields§
§dt: f64
time step size used by solver
n_iter: u8
number of iterations to achieve tolerance
norm_err: Option<f64>
Absolute error based on difference in L2 (euclidean) norm
norm_err_rel: Option<f64>
Relative error based on difference in L2 (euclidean) norm
t_curr: f64
current system time used in solver
states: Vec<f64>
current values of states
Trait Implementations§
Source§impl Clone for SolverState
impl Clone for SolverState
Source§fn clone(&self) -> SolverState
fn clone(&self) -> SolverState
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 Debug for SolverState
impl Debug for SolverState
Source§impl Default for SolverState
impl Default for SolverState
Source§fn default() -> SolverState
fn default() -> SolverState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SolverState
impl<'de> Deserialize<'de> for SolverState
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SolverState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SolverState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SolverState
impl PartialEq for SolverState
Source§impl PartialOrd for SolverState
impl PartialOrd for SolverState
Source§impl Serialize for SolverState
impl Serialize for SolverState
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SolverState
Auto Trait Implementations§
impl Freeze for SolverState
impl RefUnwindSafe for SolverState
impl Send for SolverState
impl Sync for SolverState
impl Unpin for SolverState
impl UnwindSafe for SolverState
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> SerdeAPI for Twhere
T: Serialize + for<'a> Deserialize<'a>,
impl<T> SerdeAPI for Twhere
T: Serialize + for<'a> Deserialize<'a>,
Source§fn to_file(&self, filename: &str) -> Result<(), Error>
fn to_file(&self, filename: &str) -> Result<(), Error>
Save current data structure to file. Method adaptively calls serialization methods
dependent on the suffix of the file given as str. Read more
Source§fn from_file(filename: &str) -> Result<Self, Error>where
Self: Sized + for<'de> Deserialize<'de>,
fn from_file(filename: &str) -> Result<Self, Error>where
Self: Sized + for<'de> Deserialize<'de>,
Read from file and return instantiated struct. Method adaptively calls deserialization
methods dependent on the suffix of the file name given as str.
Function returns a dynamic Error Result if it fails. Read more