deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
TrilinosWrappers::NOXSolver< VectorType >::AdditionalData Struct Reference

#include <deal.II/trilinos/nox.h>

Detailed Description

template<typename VectorType>
struct TrilinosWrappers::NOXSolver< VectorType >::AdditionalData

Struct that helps to configure NOXSolver. More advanced parameters are passed to the constructor NOXSolver directly via a Teuchos::ParameterList.

Definition at line 96 of file nox.h.

Public Types

enum class  NormType { L1 , L2 , Linfty }
 
enum class  NormScaling { Unscaled , Scaled }
 

Public Member Functions

 AdditionalData (const unsigned int max_iter=10, const double abs_tol=1.e-20, const double rel_tol=1.e-5, const unsigned int threshold_nonlinear_iterations=1, const unsigned int threshold_n_linear_iterations=0, const bool reuse_solver=false, const NormType norm_type=NormType::L2, const NormScaling norm_scaling=NormScaling::Scaled)
 

Public Attributes

unsigned int max_iter
 
double abs_tol
 
NormType norm_type
 
NormScaling norm_scaling
 
double rel_tol
 
unsigned int threshold_nonlinear_iterations
 
unsigned int threshold_n_linear_iterations
 
bool reuse_solver
 

Member Enumeration Documentation

◆ NormType

template<typename VectorType >
enum class TrilinosWrappers::NOXSolver::AdditionalData::NormType
strong

Type of residual norm used for absolute and relative convergence checks.

These correspond to the options described in: https://trilinos.github.io/docs/nox/class_n_o_x_1_1_status_test_1_1_norm_f.html

Enumerator
L1 

L1 norm of the residual.

L2 

L2 norm of the residual.

Linfty 

Infinity norm of the residual.

Definition at line 105 of file nox.h.

◆ NormScaling

template<typename VectorType >
enum class TrilinosWrappers::NOXSolver::AdditionalData::NormScaling
strong

Scaling of the absolute residual norm used for convergence checks.

These correspond to the options described in: https://trilinos.github.io/docs/nox/class_n_o_x_1_1_status_test_1_1_norm_f.html

Enumerator
Unscaled 

Do not scale the residual norm by the problem size.

Scaled 

Scale the residual norm by the problem size. For L1 and Linfty norms, the computed norm is multiplied by 1/n. For the L2 norm, the scaling factor is sqrt(1/n).

Definition at line 127 of file nox.h.

Constructor & Destructor Documentation

◆ AdditionalData()

template<typename VectorType >
TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::AdditionalData ( const unsigned int  max_iter = 10,
const double  abs_tol = 1.e-20,
const double  rel_tol = 1.e-5,
const unsigned int  threshold_nonlinear_iterations = 1,
const unsigned int  threshold_n_linear_iterations = 0,
const bool  reuse_solver = false,
const NormType  norm_type = NormType::L2,
const NormScaling  norm_scaling = NormScaling::Scaled 
)

Constructor.

Member Data Documentation

◆ max_iter

template<typename VectorType >
unsigned int TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::max_iter

Max number of nonlinear iterations.

Definition at line 157 of file nox.h.

◆ abs_tol

template<typename VectorType >
double TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::abs_tol

Absolute tolerance of the residual to be reached.

The residual norm is computed using the selected norm_type and optionally scaled depending on norm_scaling.

Note
Solver terminates successfully if either the absolute or the relative tolerance has been reached.

Definition at line 168 of file nox.h.

◆ norm_type

template<typename VectorType >
NormType TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::norm_type

Norm type for measuring the absolute and relative tolerance.

Definition at line 173 of file nox.h.

◆ norm_scaling

template<typename VectorType >
NormScaling TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::norm_scaling

Norm scaling of the absolute residual norm.

Definition at line 178 of file nox.h.

◆ rel_tol

template<typename VectorType >
double TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::rel_tol

Relative l2 tolerance of the residual to be reached.

Note
Solver terminates successfully if either the absolute or the relative tolerance has been reached.

Definition at line 186 of file nox.h.

◆ threshold_nonlinear_iterations

template<typename VectorType >
unsigned int TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::threshold_nonlinear_iterations

Number of nonlinear iterations after which the preconditioner should be updated.

Definition at line 192 of file nox.h.

◆ threshold_n_linear_iterations

template<typename VectorType >
unsigned int TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::threshold_n_linear_iterations

A number that indicates how many iterations a linear solver should at most perform before the preconditioner should be updated. The use of this variable is predicated on the idea that one can keep using a preconditioner built earlier as long as it is a good preconditioner for the matrix currently in use – where "good" is defined as leading to a number of iterations to solve linear systems less than the threshold given by the current variable.

This variable is only used if the NOXSolver::solve_with_jacobian_and_track_n_linear_iterations function object has been given a target (i.e., it is not empty).

Definition at line 208 of file nox.h.

◆ reuse_solver

template<typename VectorType >
bool TrilinosWrappers::NOXSolver< VectorType >::AdditionalData::reuse_solver

Reuse nonlinear solver the next time solve() is called. In particular, this parameter allows to reuse the preconditioner from the last solution step, enabling preconditioner lagging over multiple nonlinear solutions.

Definition at line 216 of file nox.h.


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