Linear operator implemented as a dense matrix. More...
Public Member Functions | |
| DenseSerialMatrix (const RCP< const SerialVectorSpace > &domain, const RCP< const SerialVectorSpace > &range) | |
| Construct with domain and range spaces, which should be DenseSerialVectorSpace objects. | |
| ~DenseSerialMatrix () | |
| Virtual dtor. | |
| virtual void | applyOp (const Thyra::EOpTransp M_trans, const Vector< double > &in, Vector< double > out) const |
| Apply either the operator or its transpose. | |
| virtual void | addToRow (int globalRowIndex, int nElemsToInsert, const int *globalColumnIndices, const double *elementValues) |
| Insert a set of elements in a row, adding to any previously existing values. | |
| virtual void | zero () |
| Set all elements to zero, preserving the existing structure. | |
| void | print (std::ostream &os) const |
| write to a stream | |
| RCP< const VectorSpaceBase < double > > | range () const |
Return a smart pointer for the range space for this operator. | |
| RCP< const VectorSpaceBase < double > > | domain () const |
Return a smart pointer for the domain space for this operator. | |
| const double *const | dataPtr () const |
| double * | dataPtr () |
| int | numRows () const |
| int | numCols () const |
| void | setRow (int row, const Array< double > &rowVals) |
Private Attributes | |
| RCP< const SerialVectorSpace > | domain_ |
| RCP< const SerialVectorSpace > | range_ |
| int | nRows_ |
| int | nCols_ |
| Array< double > | data_ |
Related Functions | |
(Note that these are not member functions.) | |
| void | denseSVD (const LinearOperator< double > &A, LinearOperator< double > &U, Vector< double > &Sigma, LinearOperator< double > &Vt) |
| SolverState< double > | denseSolve (const LinearOperator< double > &A, const Vector< double > &b, Vector< double > &x) |
Linear operator implemented as a dense matrix.
Definition at line 24 of file TSFDenseSerialMatrix.hpp.
| DenseSerialMatrix::DenseSerialMatrix | ( | const RCP< const SerialVectorSpace > & | domain, |
| const RCP< const SerialVectorSpace > & | range | ||
| ) |
Construct with domain and range spaces, which should be DenseSerialVectorSpace objects.
Definition at line 59 of file TSFDenseSerialMatrix.cpp.
| TSFExtended::DenseSerialMatrix::~DenseSerialMatrix | ( | ) | [inline] |
Virtual dtor.
Definition at line 36 of file TSFDenseSerialMatrix.hpp.
| void DenseSerialMatrix::addToRow | ( | int | globalRowIndex, |
| int | nElemsToInsert, | ||
| const int * | globalColumnIndices, | ||
| const double * | elementValues | ||
| ) | [virtual] |
Insert a set of elements in a row, adding to any previously existing values.
The nonzero structure of the matrix must have been determined at construction time.
| globalRowIndex | the global index of the row to which these elements belong. |
| nElemsToInsert | the number of elements being inserted in this step |
| globalColumnIndices | array of column indices. Must be nElemsToInsert in length. |
| elements | array of element values. Must be nElemsToInsert in length |
Implements TSFExtended::LoadableMatrix< double >.
Definition at line 101 of file TSFDenseSerialMatrix.cpp.
| void DenseSerialMatrix::applyOp | ( | const Thyra::EOpTransp | M_trans, |
| const Vector< double > & | in, | ||
| Vector< double > | out | ||
| ) | const [virtual] |
Apply either the operator or its transpose.
Implements TSFExtended::SimplifiedLinearOpBase< double >.
Definition at line 86 of file TSFDenseSerialMatrix.cpp.
References TSFExtended::SerialVector::dataPtr(), dataPtr(), TSFExtended::SerialVector::getConcrete(), numCols(), numRows(), and thyraTransToTeuchosTrans().
| double* TSFExtended::DenseSerialMatrix::dataPtr | ( | ) | [inline] |
Definition at line 87 of file TSFDenseSerialMatrix.hpp.
References data_.
| const double* const TSFExtended::DenseSerialMatrix::dataPtr | ( | ) | const [inline] |
Definition at line 84 of file TSFDenseSerialMatrix.hpp.
References data_.
Referenced by applyOp(), TSFExtended::denseSolve(), and TSFExtended::denseSVD().
| RCP< const VectorSpaceBase<double> > TSFExtended::DenseSerialMatrix::domain | ( | ) | const [inline] |
Return a smart pointer for the domain space for this operator.
Definition at line 80 of file TSFDenseSerialMatrix.hpp.
References domain_.
| int TSFExtended::DenseSerialMatrix::numCols | ( | ) | const [inline] |
Definition at line 93 of file TSFDenseSerialMatrix.hpp.
References nCols_.
Referenced by applyOp(), TSFExtended::denseSVD(), print(), and setRow().
| int TSFExtended::DenseSerialMatrix::numRows | ( | ) | const [inline] |
Definition at line 90 of file TSFDenseSerialMatrix.hpp.
References nRows_.
Referenced by addToRow(), applyOp(), TSFExtended::denseSolve(), TSFExtended::denseSVD(), print(), and setRow().
| void DenseSerialMatrix::print | ( | std::ostream & | os | ) | const [virtual] |
write to a stream
Implements Sundance::Printable.
Definition at line 121 of file TSFDenseSerialMatrix.cpp.
| RCP< const VectorSpaceBase<double> > TSFExtended::DenseSerialMatrix::range | ( | ) | const [inline] |
Return a smart pointer for the range space for this operator.
Definition at line 75 of file TSFDenseSerialMatrix.hpp.
References range_.
| void DenseSerialMatrix::setRow | ( | int | row, |
| const Array< double > & | rowVals | ||
| ) |
Definition at line 147 of file TSFDenseSerialMatrix.cpp.
| void DenseSerialMatrix::zero | ( | ) | [virtual] |
Set all elements to zero, preserving the existing structure.
Implements TSFExtended::LoadableMatrix< double >.
Definition at line 115 of file TSFDenseSerialMatrix.cpp.
References data_.
| SolverState< double > denseSolve | ( | const LinearOperator< double > & | A, |
| const Vector< double > & | b, | ||
| Vector< double > & | x | ||
| ) | [related] |
Definition at line 164 of file TSFDenseSerialMatrix.cpp.
| void denseSVD | ( | const LinearOperator< double > & | A, |
| LinearOperator< double > & | U, | ||
| Vector< double > & | Sigma, | ||
| LinearOperator< double > & | Vt | ||
| ) | [related] |
Definition at line 201 of file TSFDenseSerialMatrix.cpp.
Array<double> TSFExtended::DenseSerialMatrix::data_ [private] |
Definition at line 106 of file TSFDenseSerialMatrix.hpp.
Referenced by addToRow(), dataPtr(), print(), setRow(), and zero().
RCP<const SerialVectorSpace> TSFExtended::DenseSerialMatrix::domain_ [private] |
Definition at line 101 of file TSFDenseSerialMatrix.hpp.
Referenced by domain().
int TSFExtended::DenseSerialMatrix::nCols_ [private] |
Definition at line 105 of file TSFDenseSerialMatrix.hpp.
Referenced by numCols().
int TSFExtended::DenseSerialMatrix::nRows_ [private] |
Definition at line 104 of file TSFDenseSerialMatrix.hpp.
Referenced by numRows().
RCP<const SerialVectorSpace> TSFExtended::DenseSerialMatrix::range_ [private] |
Definition at line 102 of file TSFDenseSerialMatrix.hpp.
Referenced by range().