NOX::LAPACK::LinearSolver< T > Class Template Reference

A simple linear solver for use by NOX::LAPACK::Group. More...

#include <NOX_LAPACK_LinearSolver.H>

Inheritance diagram for NOX::LAPACK::LinearSolver< T >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 LinearSolver (int n)
 Constructor.
 LinearSolver (const LinearSolver< T > &s)
 Copy constructor.
 ~LinearSolver ()
 Destructor.
LinearSolveroperator= (const LinearSolver< T > &s)
 Assignment.
Matrix< T > & getMatrix ()
 Return matrix.
const Matrix< T > & getMatrix () const
 Return matrix.
void reset ()
 Reset.
void apply (bool trans, int ncols, const T *input, T *output) const
 Apply matrix.
bool solve (bool trans, int ncols, T *output)
 Solve inverse.

Protected Attributes

Matrix< T > mat
 Matrix.
Matrix< T > lu
 LU factorization of matrix.
std::vector< int > pivots
 Pivots.
bool isValidLU
 Is LU factorization valid.
Teuchos::BLAS< int, T > blas
 BLAS wrappers.
Teuchos::LAPACK< int, T > lapack
 LAPACK wrappers.


Detailed Description

template<typename T>
class NOX::LAPACK::LinearSolver< T >

A simple linear solver for use by NOX::LAPACK::Group.

This class provides a simple linear solver class that stores a NOX::LAPACK::Matrix and provides routines to apply the matrix and solve it using BLAS and LAPACK routines. It is templated so that it can be used to solve both real and complex matrices. It also stores an LU factorization of the matrix so repeated solves are more efficient. The group should signal that the matrix has changed by calling reset().

Definition at line 66 of file NOX_LAPACK_LinearSolver.H.


Constructor & Destructor Documentation

template<typename T >
NOX::LAPACK::LinearSolver< T >::LinearSolver ( int  n  )  [inline]

Constructor.

Definition at line 138 of file NOX_LAPACK_LinearSolver.H.

template<typename T>
NOX::LAPACK::LinearSolver< T >::LinearSolver ( const LinearSolver< T > &  s  )  [inline]

Copy constructor.

Definition at line 149 of file NOX_LAPACK_LinearSolver.H.

template<typename T >
NOX::LAPACK::LinearSolver< T >::~LinearSolver (  )  [inline]

Destructor.

Definition at line 160 of file NOX_LAPACK_LinearSolver.H.


Member Function Documentation

template<typename T>
NOX::LAPACK::LinearSolver< T > & NOX::LAPACK::LinearSolver< T >::operator= ( const LinearSolver< T > &  s  )  [inline]

template<typename T >
NOX::LAPACK::Matrix< T > & NOX::LAPACK::LinearSolver< T >::getMatrix (  )  [inline]

template<typename T >
const NOX::LAPACK::Matrix< T > & NOX::LAPACK::LinearSolver< T >::getMatrix (  )  const [inline]

Return matrix.

Definition at line 187 of file NOX_LAPACK_LinearSolver.H.

References NOX::LAPACK::LinearSolver< T >::mat.

template<typename T >
void NOX::LAPACK::LinearSolver< T >::reset (  )  [inline]

Reset.

Resets the LU factorization indicating the matrix is updated.

Definition at line 194 of file NOX_LAPACK_LinearSolver.H.

References NOX::LAPACK::LinearSolver< T >::isValidLU.

Referenced by NOX::LAPACK::Group::resetIsValid(), and LOCA::LAPACK::Group::resetIsValid().

template<typename T>
void NOX::LAPACK::LinearSolver< T >::apply ( bool  trans,
int  ncols,
const T *  input,
T *  output 
) const [inline]

template<typename T>
bool NOX::LAPACK::LinearSolver< T >::solve ( bool  trans,
int  ncols,
T *  output 
) [inline]


Member Data Documentation

template<typename T>
Matrix<T> NOX::LAPACK::LinearSolver< T >::mat [protected]

template<typename T>
Matrix<T> NOX::LAPACK::LinearSolver< T >::lu [protected]

LU factorization of matrix.

Definition at line 117 of file NOX_LAPACK_LinearSolver.H.

Referenced by NOX::LAPACK::LinearSolver< T >::operator=(), and NOX::LAPACK::LinearSolver< T >::solve().

template<typename T>
std::vector<int> NOX::LAPACK::LinearSolver< T >::pivots [protected]

template<typename T>
bool NOX::LAPACK::LinearSolver< T >::isValidLU [protected]

template<typename T>
Teuchos::BLAS<int,T> NOX::LAPACK::LinearSolver< T >::blas [protected]

BLAS wrappers.

Definition at line 126 of file NOX_LAPACK_LinearSolver.H.

Referenced by NOX::LAPACK::LinearSolver< T >::apply().

template<typename T>
Teuchos::LAPACK<int,T> NOX::LAPACK::LinearSolver< T >::lapack [protected]

LAPACK wrappers.

Definition at line 129 of file NOX_LAPACK_LinearSolver.H.

Referenced by NOX::LAPACK::LinearSolver< T >::solve().


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

Generated on Wed Oct 21 14:28:47 2009 for Nonlinear Solver Project by  doxygen 1.5.9