Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Private Attributes | List of all members
TrilinosWrappers::SolverDirect Class Reference

#include <trilinos_solver.h>

Classes

struct  AdditionalData
 

Public Member Functions

 SolverDirect (SolverControl &cn, const AdditionalData &data=AdditionalData())
 
virtual ~SolverDirect ()
 
void solve (const SparseMatrix &A, VectorBase &x, const VectorBase &b)
 
void solve (const SparseMatrix &A,::Vector< double > &x, const ::Vector< double > &b)
 
SolverControlcontrol () const
 
 DeclException1 (ExcTrilinosError, int,<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function")
 

Private Attributes

SolverControlsolver_control
 
std_cxx1x::shared_ptr
< Epetra_LinearProblem > 
linear_problem
 
std_cxx1x::shared_ptr
< Amesos_BaseSolver > 
solver
 
const AdditionalData additional_data
 

Detailed Description

An implementation of the Trilinos KLU direct solver (using the Amesos package).

Author
Martin Kronbichler, 2009

Definition at line 584 of file trilinos_solver.h.

Constructor & Destructor Documentation

TrilinosWrappers::SolverDirect::SolverDirect ( SolverControl cn,
const AdditionalData data = AdditionalData() 
)

Constructor. Takes the solver control object and creates the solver.

virtual TrilinosWrappers::SolverDirect::~SolverDirect ( )
virtual

Destructor.

Member Function Documentation

void TrilinosWrappers::SolverDirect::solve ( const SparseMatrix A,
VectorBase x,
const VectorBase b 
)

Solve the linear system Ax=b. Creates a KLU factorization of the matrix and performs the solve. Note that there is no need for a preconditioner here.

void TrilinosWrappers::SolverDirect::solve ( const SparseMatrix A,
::Vector< double > &  x,
const ::Vector< double > &  b 
)

Solve the linear system Ax=b. Depending on the information provided by derived classes and the object passed as a preconditioner, one of the linear solvers and preconditioners of Trilinos is chosen. This class works with matrices according to the TrilinosWrappers format, but can take deal.II vectors as argument. Since deal.II are serial vectors (not distributed), this function does only what you expect in case the matrix is locally owned. Otherwise, an exception will be thrown.

SolverControl& TrilinosWrappers::SolverDirect::control ( ) const

Access to object that controls convergence.

TrilinosWrappers::SolverDirect::DeclException1 ( ExcTrilinosError  ,
int  ,
<< "An error with error number "<< arg1<< " occurred while calling a Trilinos function"   
)

Exception

Member Data Documentation

SolverControl& TrilinosWrappers::SolverDirect::solver_control
private

Reference to the object that controls convergence of the iterative solver. In fact, for these Trilinos wrappers, Trilinos does so itself, but we copy the data from this object before starting the solution process, and copy the data back into it afterwards.

Definition at line 687 of file trilinos_solver.h.

std_cxx1x::shared_ptr<Epetra_LinearProblem> TrilinosWrappers::SolverDirect::linear_problem
private

A structure that collects the Trilinos sparse matrix, the right hand side vector and the solution vector, which is passed down to the Trilinos solver.

Definition at line 697 of file trilinos_solver.h.

std_cxx1x::shared_ptr<Amesos_BaseSolver> TrilinosWrappers::SolverDirect::solver
private

A structure that contains the Trilinos solver and preconditioner objects.

Definition at line 704 of file trilinos_solver.h.

const AdditionalData TrilinosWrappers::SolverDirect::additional_data
private

Store a copy of the flags for this particular solver.

Definition at line 710 of file trilinos_solver.h.


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