TrilinosWrappers::SolverDirect Class Reference
[TrilinosWrappers]

List of all members.

Classes

struct  AdditionalData
class  ExcTrilinosError

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

Private Attributes

SolverControlsolver_control
std::auto_ptr
< Epetra_LinearProblem > 
linear_problem
std::auto_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

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.


Member Data Documentation

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.

std::auto_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.

std::auto_ptr<Amesos_BaseSolver> TrilinosWrappers::SolverDirect::solver [private]

A structure that contains the Trilinos solver and preconditioner objects.

Store a copy of the flags for this particular solver.


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

deal.II documentation generated on Mon Nov 23 22:58:38 2009 by doxygen 1.6.1