Struct newton_rootfinder::solver::RootFinder [−][src]
pub struct RootFinder<'a, T, D> where
T: Iterative + Display,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<f64, D>,
DefaultAllocator: Allocator<f64, U1, D>,
DefaultAllocator: Allocator<f64, D, D>,
DefaultAllocator: Allocator<(usize, usize), D>, { /* fields omitted */ }
Expand description
Solver for rootfinding
The solver operates on the model and mutate it
The core functionnality is the solve()
method
The user can activate the debugging before the resolution thanks to the set_debug()
method
Implementations
impl<'a, T, D> RootFinder<'a, T, D> where
T: Iterative + Display,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<f64, D>,
DefaultAllocator: Allocator<f64, U1, D>,
DefaultAllocator: Allocator<f64, D, D>,
DefaultAllocator: Allocator<(usize, usize), D>,
impl<'a, T, D> RootFinder<'a, T, D> where
T: Iterative + Display,
D: DimMin<D, Output = D>,
DefaultAllocator: Allocator<f64, D>,
DefaultAllocator: Allocator<f64, U1, D>,
DefaultAllocator: Allocator<f64, D, D>,
DefaultAllocator: Allocator<(usize, usize), D>,
pub fn new(
parameters: SolverParameters,
initial_guess: OVector<f64, D>,
iters_params: &'a Iteratives<'a, T>,
residuals_config: &'a ResidualsConfig<'a>
) -> Self
Activate the gathering of the log
The path must be provided (as .txt file) This generate a .txt file at the given path with simulation informations.
Examples
use newton_rootfinder as nrf;
let mut rf = nrf::solver::default_with_guess(init_guess, &iter_params, &res_config, ResolutionMethod::NewtonRaphson, damping);
rf.activate_debug(&"solver_log.txt");
rf.solve(&mut user_model);
Auto Trait Implementations
impl<'a, T, D> !RefUnwindSafe for RootFinder<'a, T, D>
impl<'a, T, D> !Send for RootFinder<'a, T, D>
impl<'a, T, D> !Sync for RootFinder<'a, T, D>
impl<'a, T, D> !Unpin for RootFinder<'a, T, D>
impl<'a, T, D> !UnwindSafe for RootFinder<'a, T, D>
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.