Linear operator implemented as a LAPACK dense matrix. More...
Public Member Functions | |
| LAPACKGeneralMatrix (int nRow, int nCol) | |
| Construct with domain and range spaces, which should be DenseSerialVectorSpace objects. | |
| LAPACKGeneralMatrix () | |
| Empty Ctor. | |
| double & | operator[] (int i) |
| const double & | operator[] (int i) const |
| double & | operator() (int i, int j) |
| const double & | operator() (int i, int j) const |
| int | getNumRows () const |
| int | getNumCols () const |
| void | apply (const DenseSerialVector &in, DenseSerialVector &out) const |
| apply operator to dense serial vector. | |
| void | applyInverse (const DenseSerialVector &in, DenseSerialVector &out) const |
| apply inverse operator to a vector in the range space, returning its preimage as a vector in the domain space. | |
| void | applyAdjoint (const DenseSerialVector &in, DenseSerialVector &out) const |
| apply adjoint operator to a vector in the domain space, returning a vector in the range space. | |
| void | applyInverseAdjoint (const DenseSerialVector &in, DenseSerialVector &out) const |
| apply inverse adjoint operator | |
| void | setElement (int i, int j, const double &aij) |
| void | zero () |
| set all elements to zero | |
| void | factor () const |
| factor with a call to LAPACK's getrf() function | |
| void | print (std::ostream &os) const |
| write to a stream | |
Protected Member Functions | |
| void | mvMult (bool transpose, const DenseSerialVector &in, DenseSerialVector &out) const |
| low-level matrix-vector multiply | |
| void | solve (bool transpose, const DenseSerialVector &in, DenseSerialVector &out) const |
| low-level solve | |
Protected Attributes | |
| int | nRows_ |
| int | nCols_ |
| DenseSerialVector | data_ |
| Teuchos::Array< int > | iPiv_ |
| bool | isFactored_ |
| DenseSerialVector | factorData_ |
Linear operator implemented as a LAPACK dense matrix.
Definition at line 14 of file TSFLAPACKGeneralMatrix.hpp.
| LAPACKGeneralMatrix::LAPACKGeneralMatrix | ( | int | nRow, |
| int | nCol | ||
| ) |
Construct with domain and range spaces, which should be DenseSerialVectorSpace objects.
Definition at line 16 of file TSFLAPACKGeneralMatrix.cpp.
| LAPACKGeneralMatrix::LAPACKGeneralMatrix | ( | ) |
Empty Ctor.
Definition at line 7 of file TSFLAPACKGeneralMatrix.cpp.
| void LAPACKGeneralMatrix::apply | ( | const DenseSerialVector & | in, |
| DenseSerialVector & | out | ||
| ) | const |
apply operator to dense serial vector.
in the range space
Definition at line 26 of file TSFLAPACKGeneralMatrix.cpp.
References mvMult().
| void LAPACKGeneralMatrix::applyAdjoint | ( | const DenseSerialVector & | in, |
| DenseSerialVector & | out | ||
| ) | const |
apply adjoint operator to a vector in the domain space, returning a vector in the range space.
The default implementation throws an exception
Definition at line 32 of file TSFLAPACKGeneralMatrix.cpp.
References mvMult().
| void LAPACKGeneralMatrix::applyInverse | ( | const DenseSerialVector & | in, |
| DenseSerialVector & | out | ||
| ) | const |
apply inverse operator to a vector in the range space, returning its preimage as a vector in the domain space.
The solve is done by factoring and backsolving.
Definition at line 38 of file TSFLAPACKGeneralMatrix.cpp.
References solve().
| void LAPACKGeneralMatrix::applyInverseAdjoint | ( | const DenseSerialVector & | in, |
| DenseSerialVector & | out | ||
| ) | const |
apply inverse adjoint operator
Definition at line 44 of file TSFLAPACKGeneralMatrix.cpp.
References solve().
| void LAPACKGeneralMatrix::factor | ( | ) | const |
factor with a call to LAPACK's getrf() function
Definition at line 127 of file TSFLAPACKGeneralMatrix.cpp.
References data_, factorData_, iPiv_, isFactored_, nCols_, and nRows_.
Referenced by solve().
| int TSFExtended::LAPACKGeneralMatrix::getNumCols | ( | ) | const [inline] |
Definition at line 38 of file TSFLAPACKGeneralMatrix.hpp.
References nCols_.
| int TSFExtended::LAPACKGeneralMatrix::getNumRows | ( | ) | const [inline] |
Definition at line 33 of file TSFLAPACKGeneralMatrix.hpp.
References nRows_.
| void LAPACKGeneralMatrix::mvMult | ( | bool | transpose, |
| const DenseSerialVector & | in, | ||
| DenseSerialVector & | out | ||
| ) | const [protected] |
low-level matrix-vector multiply
Definition at line 53 of file TSFLAPACKGeneralMatrix.cpp.
References TSFExtended::DenseSerialVector::blasObject(), data_, nCols_, and nRows_.
Referenced by apply(), and applyAdjoint().
| double& TSFExtended::LAPACKGeneralMatrix::operator() | ( | int | i, |
| int | j | ||
| ) | [inline] |
Definition at line 28 of file TSFLAPACKGeneralMatrix.hpp.
| const double& TSFExtended::LAPACKGeneralMatrix::operator() | ( | int | i, |
| int | j | ||
| ) | const [inline] |
Definition at line 30 of file TSFLAPACKGeneralMatrix.hpp.
| const double& TSFExtended::LAPACKGeneralMatrix::operator[] | ( | int | i | ) | const [inline] |
Definition at line 26 of file TSFLAPACKGeneralMatrix.hpp.
References data_.
| double& TSFExtended::LAPACKGeneralMatrix::operator[] | ( | int | i | ) | [inline] |
Definition at line 25 of file TSFLAPACKGeneralMatrix.hpp.
References data_.
| void LAPACKGeneralMatrix::print | ( | std::ostream & | os | ) | const |
write to a stream
Definition at line 152 of file TSFLAPACKGeneralMatrix.cpp.
| void LAPACKGeneralMatrix::setElement | ( | int | i, |
| int | j, | ||
| const double & | aij | ||
| ) |
Definition at line 115 of file TSFLAPACKGeneralMatrix.cpp.
References data_, isFactored_, and nRows_.
| void LAPACKGeneralMatrix::solve | ( | bool | transpose, |
| const DenseSerialVector & | in, | ||
| DenseSerialVector & | out | ||
| ) | const [protected] |
low-level solve
Definition at line 71 of file TSFLAPACKGeneralMatrix.cpp.
References TSFExtended::DenseSerialVector::blasObject(), factor(), factorData_, iPiv_, isFactored_, and nRows_.
Referenced by applyInverse(), and applyInverseAdjoint().
| void LAPACKGeneralMatrix::zero | ( | ) |
set all elements to zero
Definition at line 121 of file TSFLAPACKGeneralMatrix.cpp.
References data_, isFactored_, and TSFExtended::DenseSerialVector::zero().
Definition at line 99 of file TSFLAPACKGeneralMatrix.hpp.
Referenced by factor(), mvMult(), operator()(), operator[](), print(), setElement(), and zero().
DenseSerialVector TSFExtended::LAPACKGeneralMatrix::factorData_ [mutable, protected] |
Definition at line 105 of file TSFLAPACKGeneralMatrix.hpp.
Teuchos::Array<int> TSFExtended::LAPACKGeneralMatrix::iPiv_ [mutable, protected] |
Definition at line 101 of file TSFLAPACKGeneralMatrix.hpp.
bool TSFExtended::LAPACKGeneralMatrix::isFactored_ [mutable, protected] |
Definition at line 103 of file TSFLAPACKGeneralMatrix.hpp.
Referenced by factor(), setElement(), solve(), and zero().
int TSFExtended::LAPACKGeneralMatrix::nCols_ [protected] |
Definition at line 97 of file TSFLAPACKGeneralMatrix.hpp.
Referenced by factor(), getNumCols(), mvMult(), and print().
int TSFExtended::LAPACKGeneralMatrix::nRows_ [protected] |
Definition at line 95 of file TSFLAPACKGeneralMatrix.hpp.
Referenced by factor(), getNumRows(), mvMult(), operator()(), print(), setElement(), and solve().