# 7.3.2. Tpetra Solvers

## 7.3.2.1. Klu2 Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a KLU2 direct solver.

    begin Klu2 Solver

    end Klu2 Solver

## 7.3.2.2. Superlu Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a SUPERLU direct solver.

    begin Superlu Solver

    end Superlu Solver

## 7.3.2.3. Umfpack Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a UMFPACK direct solver.

    begin Umfpack Solver

    end Umfpack Solver

## 7.3.2.4. Cg Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a conjugate gradient solver.

    begin Cg Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

    end Cg Solver

### 7.3.2.4.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

## 7.3.2.5. Bicgstab Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a bicgstab solver.

    begin Bicgstab Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

    end Bicgstab Solver

### 7.3.2.5.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

## 7.3.2.6. Gmres Solver

Scope

  Teko Block Solver, Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a GMRES solver.

    begin Gmres Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       Restart Iterations {=} value

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Expert Teko Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

       begin Teko Preconditioner
       end

    end Gmres Solver

### 7.3.2.6.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

###### Restart Iterations

Syntax

  Restart Iterations {=} value

Summary

  Set the number of iterations between GMRES restarts.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 30

## 7.3.2.7. Poly Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a poly solver.

    begin Poly Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Polynomial Order {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       Restart Iterations {=} value

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

    end Poly Solver

### 7.3.2.7.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Polynomial Order

Syntax

  Polynomial Order {=} value

Summary

  Set the polynomial order of polynomial preconditioner.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 5

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

###### Restart Iterations

Syntax

  Restart Iterations {=} value

Summary

  Set the number of iterations between GMRES restarts.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 30

## 7.3.2.8. Gcrodr Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a GCRODR solver.

    begin Gcrodr Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Recycled Blocks {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       Restart Iterations {=} value

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

    end Gcrodr Solver

### 7.3.2.8.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Recycled Blocks

Syntax

  Recycled Blocks {=} value

Summary

  Set the number of recycle blocks in GCRODR.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 5

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

###### Restart Iterations

Syntax

  Restart Iterations {=} value

Summary

  Set the number of iterations between GCRODR restarts.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 30

## 7.3.2.9. Expert Belos Solver

Scope

  Teko Block Solver, Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a Belos solver with parameters specified in an XML file.

    begin Expert Belos Solver

       Xml File {=} value

       begin Dd-Ilu Preconditioner
       end

       begin Dd-Ilut Preconditioner
       end

       begin Dd-Parilut Preconditioner
       end

       begin Expert Ifpack2 Preconditioner
       end

       begin Expert Teko Preconditioner
       end

       begin Fastilu Preconditioner
       end

       begin Jacobi Preconditioner
       end

       begin Muelu Preconditioner
       end

       begin Preset Preconditioner
       end

       begin Sgs Preconditioner
       end

       begin Sgs2 Preconditioner
       end

       begin Teko Preconditioner
       end

    end Expert Belos Solver

### 7.3.2.9.1. Line Commands

###### Xml File

Syntax

  Xml File {=} value

Summary

  Supply the name of an XML file containing a Belos parameter list.

Description

  The supplied XML file must contain a ParameterList with a “solution method” string parameter corresponding to the desired type of Belos solver. Any additional parameters that should be passed on to Belos should be part of a nested ParameterList with name=”Belos-Tpetra”.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

## 7.3.2.10. Preset Solver

Scope

  Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a preset solver for a specific linear system type.

Description

  The preset solver for a given linear system type is intended to provide reasonable behavior for many problems of that type. If this proves to be insufficient, the user must provide more fine-grained control over solver settings. The equivalent command which produces the solver will be output to the log file, and this may be used as a starting point from which changes for robustness may be made (i.e. increasing GMRES subspace size or changing the preconditioner).

    begin Preset Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       Solver Type {=} {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric}

    end Preset Solver

### 7.3.2.10.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

###### Solver Type

Syntax

  Solver Type {=} {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric}

Summary

  Set the preset solver type

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric} | –

## 7.3.2.11. Preset Solver

Scope

  Teko Block Solver, Teko Subblock Solver, Tpetra Equation Solver

Summary

  Use a preset solver for a specific linear system type.

Description

  The preset solver for a given linear system type is intended to provide reasonable behavior for many problems of that type. If this proves to be insufficient, the user must provide more fine-grained control over solver settings. The equivalent command which produces the solver will be output to the log file, and this may be used as a starting point from which changes for robustness may be made (i.e. increasing GMRES subspace size or changing the preconditioner).

    begin Preset Solver

       Convergence Tolerance {=} value [ Minimum = tolerance_floor  ]

       Maximum Iterations {=} value

       Residual Output {=} [ {disabled | enabled}  ]

       Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

       Solver Type {=} {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric}

    end Preset Solver

### 7.3.2.11.1. Line Commands

###### Convergence Tolerance

Syntax

  Convergence Tolerance {=} value [ Minimum = tolerance_floor ]

Summary

  Set the convergence tolerance for the linear solver. Setting CONVERGENCE TOLERANCE = AUTOMATIC enables an autonomous linear convergence tolerance calculation, which is computed from a combination of the initial linear residual and user-specified nonlinear residual tolerance. An additional floor value on the linear convergence tolerance can be declared with CONVERGENCE TOLERANCE = AUTOMATIC MINIMUM = <val>, where the default floor value is 1.0e-6

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | string | –

###### Maximum Iterations

Syntax

  Maximum Iterations {=} value

Summary

  Set the maximum number of iterations taken by the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | integer | 300

###### Residual Output

Syntax

  Residual Output {=} [ {disabled | enabled} ]

Summary

  Output the linear residual history to files in the residual_output/ directory, which is created automatically. For timestep NNN and linear system NAME, this will output a .csv file named residual_output/linear_solves_NAME.stepNNN. This file includes information about the linear residual at every iteration across all nonlinear iterations.

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –

###### Residual Scaling

Syntax

  Residual Scaling {=} {none | preconditioned_r0 | r0 | rhs}

Summary

  Set the residual scaling for the linear solver

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {none | preconditioned_r0 | r0 | rhs} | r0

###### Solver Type

Syntax

  Solver Type {=} {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric}

Summary

  Set the preset solver type

Parameter | Value | Default
--- | --- | ---
{=} | {= | are | is} | –
value | {continuity | displacement_multigrid | high_aspect_continuity | multiphysics | scalar_transport | teko_multiphysics | teko_ns | thermal | thermal_bicgstab | thermal_multigrid | thermal_symmetric} | –