pub struct NewtonNonlinearSolver<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> { /* private fields */ }Implementations§
Source§impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> NewtonNonlinearSolver<M, Ls, Lsearch>
pub fn new(linear_solver: Ls, line_search: Lsearch) -> Self
pub fn linear_solver(&self) -> &Ls
Trait Implementations§
Source§impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> Default for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> Default for NewtonNonlinearSolver<M, Ls, Lsearch>
Source§impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> NonLinearSolver<M> for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M: Matrix, Ls: LinearSolver<M>, Lsearch: LineSearch<M::V>> NonLinearSolver<M> for NewtonNonlinearSolver<M, Ls, Lsearch>
Source§fn clear_jacobian(&mut self)
fn clear_jacobian(&mut self)
Clear the approximation of the Jacobian matrix.
fn is_jacobian_set(&self) -> bool
Source§fn set_problem<C: NonLinearOpJacobian<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
)
fn set_problem<C: NonLinearOpJacobian<V = M::V, T = M::T, M = M, C = M::C>>( &mut self, op: &C, )
Set the problem to be solved, any previous problem is discarded.
Source§fn reset_jacobian<C: NonLinearOpJacobian<V = M::V, T = M::T, M = M, C = M::C>>(
&mut self,
op: &C,
x: &C::V,
t: C::T,
)
fn reset_jacobian<C: NonLinearOpJacobian<V = M::V, T = M::T, M = M, C = M::C>>( &mut self, op: &C, x: &C::V, t: C::T, )
Reset the approximation of the Jacobian matrix.
Source§fn solve_linearised_in_place(&self, x: &mut M::V) -> Result<(), DiffsolError>
fn solve_linearised_in_place(&self, x: &mut M::V) -> Result<(), DiffsolError>
Solve the linearised problem
J * x = b, where J was calculated using Self::reset_jacobian.
The input b is provided in x, and the solution is returned in x.Source§fn solve_in_place<C: NonLinearOp<V = M::V, T = M::T, M = M>>(
&mut self,
op: &C,
xn: &mut M::V,
t: M::T,
error_y: &M::V,
convergence: &mut Convergence<'_, M::V>,
) -> Result<(), DiffsolError>
fn solve_in_place<C: NonLinearOp<V = M::V, T = M::T, M = M>>( &mut self, op: &C, xn: &mut M::V, t: M::T, error_y: &M::V, convergence: &mut Convergence<'_, M::V>, ) -> Result<(), DiffsolError>
Solve the problem
F(x) = 0 in place.fn solve<C: NonLinearOp<V = M::V, T = M::T, M = M>>( &mut self, op: &C, x: &M::V, t: M::T, error_y: &M::V, convergence: &mut Convergence<'_, M::V>, ) -> Result<M::V, DiffsolError>
Auto Trait Implementations§
impl<M, Ls, Lsearch> Freeze for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> RefUnwindSafe for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> Send for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> Sync for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> Unpin for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> UnsafeUnpin for NewtonNonlinearSolver<M, Ls, Lsearch>
impl<M, Ls, Lsearch> UnwindSafe for NewtonNonlinearSolver<M, Ls, Lsearch>
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> 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>
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 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>
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.