SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::LinearSolverParams Struct Reference

Parameters for the linear solve performed in each iteration of the non-linear solver. More...

#include <linear_solver_params.h>

Public Member Functions

bool operator== (LinearSolverParams const &) const =default

Public Attributes

bool abortIfNotSpd = false
 Abort solve if matrix is not SPD.
real absTol = 1e-9_r
 Absolute residual norm tolerance for convergence.
int maxIter = kAutoLinearSolverMaxIter
 Maximum number of linear solver iterations.
LinearSolverConvergenceNorm normType = LinearSolverConvergenceNorm::Default
 Norm used for the stopping criteria.
PreconditionerType preconditionerType = PreconditionerType::Default
 Preconditioner type.
real relDivTol = 1e10_r
 Relative residual norm tolerance for divergence, relative to the initial residual.
real relTol = 1e-5_r
 Relative residual norm tolerance for convergence, relative to the initial residual.
int restartSize = 1000
 Krylov subspace dimension before restarting.
LinearSolverType solverType = LinearSolverType::Default
 Linear solver type.
VerbosityLevel verbosity = VerbosityLevel::Warning
 Verbosity level for logging output.

Detailed Description

Parameters for the linear solve performed in each iteration of the non-linear solver.

Definition at line 347 of file linear_solver_params.h.

Member Function Documentation

◆ operator==()

bool superdex::LinearSolverParams::operator== ( LinearSolverParams const & ) const
default

Member Data Documentation

◆ abortIfNotSpd

bool superdex::LinearSolverParams::abortIfNotSpd = false

Abort solve if matrix is not SPD.

Note
Applies only to iterative SPD solvers (e.g., LinearSolverType::CG, LinearSolverType::CudaCG, LinearSolverType::AugmentedCG).

Definition at line 414 of file linear_solver_params.h.

◆ absTol

real superdex::LinearSolverParams::absTol = 1e-9_r

Absolute residual norm tolerance for convergence.

Note
Applies only to iterative solvers.

Definition at line 370 of file linear_solver_params.h.

◆ maxIter

int superdex::LinearSolverParams::maxIter = kAutoLinearSolverMaxIter

Maximum number of linear solver iterations.

Note
Applies only to iterative solvers.
Must be non-negative or kAutoLinearSolverMaxIter.
kAutoLinearSolverMaxIter lets Mochi select the maximum number of iterations based on the problem.

Definition at line 398 of file linear_solver_params.h.

◆ normType

LinearSolverConvergenceNorm superdex::LinearSolverParams::normType = LinearSolverConvergenceNorm::Default

Norm used for the stopping criteria.

Note
Applies only to the solvers documented in LinearSolverConvergenceNorm.

Definition at line 363 of file linear_solver_params.h.

◆ preconditionerType

PreconditionerType superdex::LinearSolverParams::preconditionerType = PreconditionerType::Default

Preconditioner type.

Note
Applies only to iterative solvers.

Definition at line 356 of file linear_solver_params.h.

◆ relDivTol

real superdex::LinearSolverParams::relDivTol = 1e10_r

Relative residual norm tolerance for divergence, relative to the initial residual.

Note
Applies only to iterative solvers.

Definition at line 388 of file linear_solver_params.h.

◆ relTol

real superdex::LinearSolverParams::relTol = 1e-5_r

Relative residual norm tolerance for convergence, relative to the initial residual.

Note
Applies only to iterative solvers.
Ignored when using LinearToleranceStrategy::EisenstatWalker1 or LinearToleranceStrategy::EisenstatWalker2 in the non-linear solver.
For LinearToleranceStrategy::EisenstatWalker3, this is used as a lower bound on the adaptive tolerance in every non-linear iteration.

Definition at line 381 of file linear_solver_params.h.

◆ restartSize

int superdex::LinearSolverParams::restartSize = 1000

Krylov subspace dimension before restarting.

Note
Applies only to GMRES solvers (e.g., LinearSolverType::GMRES, LinearSolverType::CudaGMRES).

Definition at line 406 of file linear_solver_params.h.

◆ solverType

LinearSolverType superdex::LinearSolverParams::solverType = LinearSolverType::Default

Linear solver type.

Definition at line 349 of file linear_solver_params.h.

◆ verbosity

VerbosityLevel superdex::LinearSolverParams::verbosity = VerbosityLevel::Warning

Verbosity level for logging output.

Definition at line 417 of file linear_solver_params.h.


The documentation for this struct was generated from the following file: