pub struct DenseMode;Expand description
Dense linear algebra mode.
Uses Mat<f64> for Jacobians and Hessians.
Optimal for small-to-medium problems (< 500 DOF) or dense Jacobians.
Trait Implementations§
Source§impl AssemblyBackend for DenseMode
impl AssemblyBackend for DenseMode
Source§fn assemble(
problem: &Problem,
variables: &HashMap<String, VariableEnum>,
variable_index_map: &HashMap<String, usize>,
_symbolic_structure: Option<&SymbolicStructure>,
total_dof: usize,
) -> LinearizerResult<(Mat<f64>, Mat<f64>)>
fn assemble( problem: &Problem, variables: &HashMap<String, VariableEnum>, variable_index_map: &HashMap<String, usize>, _symbolic_structure: Option<&SymbolicStructure>, total_dof: usize, ) -> LinearizerResult<(Mat<f64>, Mat<f64>)>
Assemble residuals and Jacobian from the problem.
Source§fn compute_column_norms(jacobian: &Mat<f64>) -> Vec<f64>
fn compute_column_norms(jacobian: &Mat<f64>) -> Vec<f64>
Compute column norms of the Jacobian (for Jacobi scaling).
Source§fn apply_column_scaling(jacobian: &Mat<f64>, scaling: &[f64]) -> Mat<f64>
fn apply_column_scaling(jacobian: &Mat<f64>, scaling: &[f64]) -> Mat<f64>
Apply diagonal column scaling to the Jacobian.
Returns a new Jacobian with columns scaled by
1 / (1 + norm).Source§impl LinearSolver<DenseMode> for DenseCholeskySolver
impl LinearSolver<DenseMode> for DenseCholeskySolver
Source§fn solve_normal_equation(
&mut self,
residuals: &Mat<f64>,
jacobian: &Mat<f64>,
) -> LinAlgResult<Mat<f64>>
fn solve_normal_equation( &mut self, residuals: &Mat<f64>, jacobian: &Mat<f64>, ) -> LinAlgResult<Mat<f64>>
Solve the normal equations: (J^T · J) · dx = −J^T · r
Source§fn solve_augmented_equation(
&mut self,
residuals: &Mat<f64>,
jacobian: &Mat<f64>,
lambda: f64,
) -> LinAlgResult<Mat<f64>>
fn solve_augmented_equation( &mut self, residuals: &Mat<f64>, jacobian: &Mat<f64>, lambda: f64, ) -> LinAlgResult<Mat<f64>>
Solve the augmented equations: (J^T · J + λI) · dx = −J^T · r
Source§fn get_hessian(&self) -> Option<&Mat<f64>>
fn get_hessian(&self) -> Option<&Mat<f64>>
Get the cached Hessian matrix (J^T · J) from the last solve
Source§fn get_gradient(&self) -> Option<&Mat<f64>>
fn get_gradient(&self) -> Option<&Mat<f64>>
Get the cached gradient vector (J^T · r) from the last solve
Source§impl LinearSolver<DenseMode> for DenseQRSolver
impl LinearSolver<DenseMode> for DenseQRSolver
Source§fn solve_normal_equation(
&mut self,
residuals: &Mat<f64>,
jacobian: &Mat<f64>,
) -> LinAlgResult<Mat<f64>>
fn solve_normal_equation( &mut self, residuals: &Mat<f64>, jacobian: &Mat<f64>, ) -> LinAlgResult<Mat<f64>>
Solve the normal equations: (J^T · J) · dx = −J^T · r
Source§fn solve_augmented_equation(
&mut self,
residuals: &Mat<f64>,
jacobian: &Mat<f64>,
lambda: f64,
) -> LinAlgResult<Mat<f64>>
fn solve_augmented_equation( &mut self, residuals: &Mat<f64>, jacobian: &Mat<f64>, lambda: f64, ) -> LinAlgResult<Mat<f64>>
Solve the augmented equations: (J^T · J + λI) · dx = −J^T · r
Source§fn get_hessian(&self) -> Option<&Mat<f64>>
fn get_hessian(&self) -> Option<&Mat<f64>>
Get the cached Hessian matrix (J^T · J) from the last solve
Source§fn get_gradient(&self) -> Option<&Mat<f64>>
fn get_gradient(&self) -> Option<&Mat<f64>>
Get the cached gradient vector (J^T · r) from the last solve
Auto Trait Implementations§
impl Freeze for DenseMode
impl RefUnwindSafe for DenseMode
impl Send for DenseMode
impl Sync for DenseMode
impl Unpin for DenseMode
impl UnsafeUnpin for DenseMode
impl UnwindSafe for DenseMode
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.