concepts::TMatrix< F > Class Template Reference
A T matrix in sparse notation. More...
#include <edgeTest.hh>
Classes | |
struct | Control |
The column header: column index and length of the column data. More... | |
struct | Data |
The matrix entries: row index and data. More... | |
Public Member Functions | |
void | append (TColumn< F > *T) |
Appends the columns to the matrix. More... | |
void | applyOne (const ElementMatrix< F > &A, ElementMatrix< F > &B) const |
TColumn< F > * | columns () const |
const TMatrix::Control * | control (uint i) const |
Returns the ith entry of the control data array. More... | |
const TMatrix::Data * | data (uint i) const |
Returns the ith entry of the data array. More... | |
virtual void | extract (const concepts::Vector< F > &solution, concepts::Array< F > &coeff) const |
virtual void | extract (const concepts::Vector<::std::complex< F > > &solution, concepts::Array<::std::complex< F > > &coeff) const |
void | extractOne (const concepts::Vector< F > &solution, concepts::Array< F > &coeff) const |
virtual uint | index (const uint i) const |
Mapping of the column index to the global degree of freedom. More... | |
uint | nEntries () const |
number of entries in the data vector More... | |
void | operator() (const ElementMatrix< F > &A, ElementMatrix< F > &B) const |
Application operator. More... | |
void | operator() (const ElementMatrix<::std::complex< F > > &A, ElementMatrix<::std::complex< F > > &B) const |
void | operator() (const Vector< F > &A, Vector< F > &B) const |
::std::ostream & | outputLocalMap (::std::ostream &os) const |
TMatrix (const TMatrix< F > &T, Set< uint > *idx=0) | |
Copy-Constructor. More... | |
template<class G > | |
TMatrix (const TMatrix< G > &T) | |
to "upcast" TMatrix<Real> to TMatrix<Cmplx> More... | |
TMatrix (TColumn< F > *T) | |
Constructor. More... | |
virtual void | usedIdx (Set< uint > &c) const |
virtual void | usedIdx (TColumn< bool > &c) const |
virtual | ~TMatrix () |
Protected Member Functions | |
virtual ::std::ostream & | info (::std::ostream &os) const |
Private Attributes | |
Array< Control > | ctrl_ |
Control data array (column header: column index and length of the column data) More... | |
Array< Data > | data_ |
Data array (matrix entries: row index and data) More... | |
uint | sz_ |
Size of the stored data. More... | |
Detailed Description
template<class F>
class concepts::TMatrix< F >
A T matrix in sparse notation.
All non-zero matrix entries are stored in one big array together with their row index. Another array of the same size stores the column indices and the length of each column in the array (not the real length).
The columns of the matrix are TColumn.
Definition at line 17 of file edgeTest.hh.
Constructor & Destructor Documentation
◆ TMatrix() [1/3]
concepts::TMatrix< F >::TMatrix | ( | TColumn< F > * | T | ) |
Constructor.
The size of the matrix is initially set to 0.
- Parameters
-
T a linked list of columns (in full notation) to be initially stored.
◆ TMatrix() [2/3]
concepts::TMatrix< F >::TMatrix | ( | const TMatrix< F > & | T, |
Set< uint > * | idx = 0 |
||
) |
Copy-Constructor.
Takes only the local indices in idx
.
◆ ~TMatrix()
|
virtual |
◆ TMatrix() [3/3]
to "upcast" TMatrix<Real> to TMatrix<Cmplx>
Definition at line 645 of file tmatrix.hh.
Member Function Documentation
◆ append()
void concepts::TMatrix< F >::append | ( | TColumn< F > * | T | ) |
Appends the columns to the matrix.
n_ is updated to reflect the real size of the matrix. m_ is updated to show the number of columns which are stored. The columns are scanned and the needed space is allocated. Then the new data is stored.
- Parameters
-
T a linked list of columns (in full notation) to be stored.
◆ applyOne()
void concepts::TMatrix< F >::applyOne | ( | const ElementMatrix< F > & | A, |
ElementMatrix< F > & | B | ||
) | const |
◆ columns()
TColumn<F>* concepts::TMatrix< F >::columns | ( | ) | const |
◆ control()
|
inline |
Returns the ith entry of the control data array.
- Parameters
-
i a colum index, i.e. i < n()
Definition at line 601 of file tmatrix.hh.
◆ data()
|
inline |
Returns the ith entry of the data array.
Definition at line 604 of file tmatrix.hh.
◆ extract() [1/2]
|
virtual |
Reimplemented in concepts::TMatrixBlock< F >.
◆ extract() [2/2]
|
virtual |
Reimplemented in concepts::TMatrixBlock< F >.
◆ extractOne()
void concepts::TMatrix< F >::extractOne | ( | const concepts::Vector< F > & | solution, |
concepts::Array< F > & | coeff | ||
) | const |
◆ index()
|
inlinevirtual |
Mapping of the column index to the global degree of freedom.
Remember: the columns represent the global degrees of freedom to which the shape functions of this element contribute.
More technical: the columns of a TMatrix contain the column index in Control::idx and the relevant data in TMatrix::Data but the number of columns stored in TMatrixBase::n_ does not reflect the global number of degrees of freedom. Therefore, there might be empty columns and TMatrixBase::n_ could be lower than the global number of degrees of freedom.
Definition at line 587 of file tmatrix.hh.
◆ info()
|
protected |
◆ nEntries()
|
inline |
number of entries in the data vector
Definition at line 610 of file tmatrix.hh.
◆ operator()() [1/3]
void concepts::TMatrix< F >::operator() | ( | const ElementMatrix< F > & | A, |
ElementMatrix< F > & | B | ||
) | const |
Application operator.
Computes the application of the T matrix on A and returns B: . The typical usage is explained in the base class.
More detailed: B is resized to a matrix, then where and and means sum over all which are present in the T matrix.
- Parameters
-
A Element matrix B Result
- See also
- T for the typical usage of this application operator.
◆ operator()() [2/3]
void concepts::TMatrix< F >::operator() | ( | const ElementMatrix<::std::complex< F > > & | A, |
ElementMatrix<::std::complex< F > > & | B | ||
) | const |
◆ operator()() [3/3]
void concepts::TMatrix< F >::operator() | ( | const Vector< F > & | A, |
Vector< F > & | B | ||
) | const |
◆ outputLocalMap()
::std::ostream& concepts::TMatrix< F >::outputLocalMap | ( | ::std::ostream & | os | ) | const |
◆ usedIdx() [1/2]
|
virtual |
Reimplemented in concepts::TMatrixBlock< F >.
◆ usedIdx() [2/2]
|
virtual |
Reimplemented in concepts::TMatrixBlock< F >.
Member Data Documentation
◆ ctrl_
|
private |
Control data array (column header: column index and length of the column data)
Definition at line 634 of file tmatrix.hh.
◆ data_
|
private |
Data array (matrix entries: row index and data)
Definition at line 637 of file tmatrix.hh.
◆ sz_
|
private |
Size of the stored data.
Definition at line 640 of file tmatrix.hh.
The documentation for this class was generated from the following files:
- hp2D/testsuite/edgeTest.hh
- space/tmatrix.hh