Stratimikos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Stratimikos: Thyra-based strategies for linear solvers

The package Stratimikos contains a unified set of Thyra-based wrappers to linear solver and preconditioner capabilities in Trilinos. The word "stratimikos" has no real meaning in itself; it was created from the Greek words "stratigiki" and "grammikos" which mean "strategy" and "linear" in English. The Stratimikos package is also a place where unified testing of linear solvers and preconditioners can be performed. Given these object, you can solve individual linear systems (see examples).

Currently, Stratimikos is really just the single class Stratimikos::DefaultLinearSolverBuilder which provides uniform access to linear solver capabilities in Trilinos where the underlying operator can be viewed as either an Epetra_CrsMatrix object or as an Epetra_RowMatrix object. This class builds linear solvers using the Thyra linear solver and preconditioner factory adapters given below. The linear solver and preconditioner factories are returned as Thyra::LinearOpWithSolveFactoryBase and Thyra::PreconditionerFactoryBase objects respectively.

The class Stratimikos::DefaultLinearSolverBuilder is parameter-list driven. An example parameter list in XML form that selects AztecOO and Ifpack is shown below:

  <Parameter name="Linear Solver Type" type="string" value="AztecOO"/>
  <ParameterList name="Linear Solver Types">
    <ParameterList name="AztecOO">
      <ParameterList name="Forward Solve">
        <ParameterList name="AztecOO Settings">
          <Parameter name="Aztec Solver" type="string" value="GMRES"/>
          <Parameter name="Convergence Test" type="string" value="r0"/>
          <Parameter name="Size of Krylov Subspace" type="int" value="300"/>
        <Parameter name="Max Iterations" type="int" value="400"/>
        <Parameter name="Tolerance" type="double" value="1e-13"/>
      <Parameter name="Output Every RHS" type="bool" value="1"/>
  <Parameter name="Preconditioner Type" type="string" value="Ifpack"/>
  <ParameterList name="Preconditioner Types">
    <ParameterList name="Ifpack">
      <Parameter name="Prec Type" type="string" value="ILU"/>
      <Parameter name="Overlap" type="int" value="1"/>
      <ParameterList name="Ifpack Settings">
        <Parameter name="fact: level-of-fill" type="int" value="2"/>

The parameter "Linear Solver Type" selects the linear solver type (currently supported are "Amesos", "AztecOO", and "Belos"). The parameter "Preconditioner Type" selects the preconditioner type (currently supported are "None", "ML", and "Ifpack").

Many other example XML input files (e.g. *.xml) can be found in the directory stratimikos/example. The full listing of supported parameters can be found in the documentation for Stratimikos::DefaultLinearSolverBuilder.

The example simple_stratimikos_example.cpp shows how to wrap Epetra objects and then use Stratimikos::DefaultLinearSolverBuilder to solve a linear system.

The example MixedOrderPhysicsBasedPreconditioner.cpp shows the use of Stratimikos in a more sophisticated context.

See how all of the examples and tests are run by looking at stratimikos/test/definition.

Linear solver adapters

These adapters provide concrete subclasses implementing the abstract interfaces Thyra::LinearOpWithSolveFactoryBase and Thyra::LinearOpWithSolveBase. It is these implementations that are used in the implementation of Stratimikos::DefaultLinearSolverBuilder but they can also be used on their own.

Preconditioner adapters

These adapters provide concrete subclasses implementing the abstract interface Thyra::PreconditionerFactoryBase. It is these implementations that are used in the implementation of Stratimikos::DefaultLinearSolverBuilder but can also be used on their own.

Stratimikos examples

Stratimikos browser

You can browse all of Stratimikos as a single doxygen collection. Warning, this is not the recommended way to learn about Stratimikos software. However, this is a good way to browse the directory structure of stratimikos, to locate files, etc.