This main page provides the starting point for all of the documentation for Thyra interfaces and software. This documentation is generated using Doxygen.
The documentation for Thyra is broken up into a number of different doxygen collections as described in the next section.
The thrya package is broadly divided into interoperability interfaces and support software and the directory structure and the doxygen documentation is also divided in this way. Below are links to the different Doxygen documentation collections for the different aspects of Thyra. This organization also mirrors the directory structure of thyra.
These are minimal stripped-down abstract interface classes for basic finite-dimensional vectors, vector spaces and linear operators. These interfaces form the foundation for all other ANA-based interfaces. Primary interfaces include
These are some interfaces based on the above Fundamental ANA Operator/Vector Interfaces and provide other pieces of functionality and define new types of interoperability. For example, this is where interfaces to various types of composite subclasses exist for product, or block, vector spaces (
Thyra::ProductVectorSpaceBase), vectors (
Thyra::ProductVectorBase), and multi-vectors (
Thyra::ProductMultiVectorBase). Various interfaces to decorator and composite linear operators are also contained here and include, for example,
These are interfaces that provide a high-level interface to preconditioners, linear solvers (
Thyra::LinearOpWithSolveBase), and factories for these (i.e.
Included here is a variety of extended interfaces that build on the fundamental operator/solve interfaces. Examples include
Contained here are interfaces for nonlinear models such as
Contained here are interfaces for nonlinear equation solvers.
Warning! These interfaces are highly experimental and are likely to undergo dramatic changes before they stabilize.
Described here is a fairly large collection of ANA or client support and adapter support software based on the operator/vector interfaces. For example, you will find things such as unit testing classes (e.g.
Thyra::LinearOpTester), and concrete product spaces/vectors/multi-vectors (e.g.
Thyra::DefaultProductVectorSpace). Also included is adapter support and concrete implementations for serial and SPMD (Single Program Multiple Data) space/vector/multi-vector implementations (e.g.
Thyra::DefaultSpmdVectorSpace). Another category of software is efficient Java-like handle/wrapper classes (e.g.
Thyra::LinearOperator) that defines a convenient API for the development of ANAs using MATLAB-like operator overloading. Some examples are also provided, including several for the Conjugate Gradient method and the Power Method. This collection of software is really too vast to give a full sense of what it contains in this short description.
This collection contains support software for the operator/solve interfaces. Examples include testing software like
Thyra::LinearOpWithSolveTester and decorator subclasses like
This includes support software for the nonlinear model evaluator interfaces. Examples include
decorator subclasses like
Contained here is support software for the nonlinear solver interfaces and some simple concrete implementations. Simple concrete nonlinear equation solver implementations include examples
All of the interfaces are templated on a
Scalar (i.e. floating-point) type and therefore almost all of Thyra supports arbitrary scalar types such as complex types (e.g.
std::complex<double>), automatic differentiation types, interval types and extended precision types (i.e.
mpf_class) in addition to simpler real types such as
float. The only requirement for the
Scalar data type is that it have value semantics (i.e. default constructor, copy constructor, assignment operators) and define the basic overloaded operators
operator/(...). The traits class
Teuchos::ScalarTraits provides a means to write type-independent code and all of the Thyra software uses this traits class. Any scalar type that is to be used as a
Scalar must provide a specialization of this traits class (see source code for
Teuchos_ScalarTraits.hpp for examples of how to do this). In addition, if SPMD distributed-memory computing is to be used then specializations of the traits class
Teuchos::SerializationTraits must also be provided.
The Thyra interfaces and related software are not templated on an index (i.e. ordinal) type. Instead, the type
Thyra::Index is used which is just a typedef that is defined at configure time to be an integer type of sufficient size. This type must be able to hold the value of the largest dimension of a vector space that will be used by an executable. For most platforms and use cases,
int is sufficient, but in other cases, for example on some 64 bit platforms,
long int may be necessary. Not templating on the index (ordinal) type does not result in any degradation in usability, runtime speed, or storage usage for any use case. However, certain types of subclasses of the Thyra interfaces, such as sparse matrix subclasses, may need to be templated on a local index (ordinal) type.
All of the code in the Thyra and related packages almost exclusively use the
Teuchos smart reference counted pointer class
Teuchos::RCP to handle dynamically allocated memory with object-oriented programming. Thyra also rigorously uses the idioms described in this report for passing object to and from functions that involve
All error and general exception handling in the Thyra interfaces and related software is performed using the built-in C++ exception handling mechanisms (i.e.
catch) and all thrown exceptions should inherit from the standard base class
std::exception. All exceptions in Thyra software are thrown using the macros
TEST_FOR_EXCEPT(). By consistently using these macros it is easy to set a breakpoint in a debugger just before an exception is thrown by setting a breakpoint on the function
TestForException_break() (e.g. by typing
break TestForException_break in gdb). If Trilinos is configured with
Trilinos_ENABLE_DEBUG=ON then a lot of runtime error checking is performed in Thyra support software, as well as in many other software packages. Whenever development work is being performed this option should always be enabled since a lot of errors will be caught that would be hard to diagnose otherwise. Significant effort has gone into developing this error checking code and in the information that is embedded in the exception objects (all derived from
std::exception) that are thrown when errors are detected.
Teuchos::BLASon which Thyra software depends.
configurescript (which should be called from the base Trilinos-level configure script) responds to a number of options that affect the code that is built and what code is installed.
Some of the more important configuration options are:
Trilinos_ENABLE_Thyra=ON: Causes the Thyra package and all of its dependent packages to be enabled and built. Without this option, there will be no Thyra header files or libraries included in the installation of Trilinos, i.e., when one runs
This paper describes the basic principles that go into the design of the Thyra Operator/Vector interface layer (and therefore also for the rest of Thyra).
This paper describes the basics of
Teuchos::RCP and outlines a convention for passing objects to and from functions that all of the code in Thyra adheres to.
This paper describes the need for, and the basic design of,
RTOpPack::RTOpT. The concrete implementation described in this paper used C structs while the current
RTOpPack::RTOpT is a fully templated C++ class implementation.
This short note describes a simple convention for writing function prototypes for linear algebra operations. This convention is used in this set of functions, for instance.
This document describes the coding and documentation guidelines used in the creation of Thyra.
Epetra_RowMatrixobject. However, the Belos implementation allows for the arbitrary implemention of the linear operators and vector spaces.