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
Collaboration diagram for NOX::LAPACK::LinearSolver< T >:
Collaboration graph

List of all members.

Public Member Functions

 LinearSolver (int n)
 LinearSolver (const LinearSolver< T > &s)
 Copy constructor.
 ~LinearSolver ()
LinearSolveroperator= (const LinearSolver< T > &s)
Matrix< T > & getMatrix ()
 Return matrix.
const Matrix< T > & getMatrix () const
 Return matrix.
void 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< T > lu
 LU factorization of matrix.
std::vector< int > 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().

Member Function Documentation

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


Resets the LU factorization indicating the matrix is updated.

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

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

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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 09:59:45 2011 for NOX by  doxygen 1.6.3