TMatrixBlock are special Tmatrices in block diagonal structure, builded with two Tmatrices itsself. More...

#include <tmatrix.hh>

Inheritance diagram for concepts::TMatrixBlock< F >:
concepts::TMatrix< F >

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::Controlcontrol (uint i) const
 Returns the ith entry of the control data array. More...
 
const TMatrix::Datadata (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...
 
uint offsetrow () const
 Returns the offset row, that is starting row of the (possible) second matrix block. 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
 
 TMatrixBlock (const TMatrix< F > *T0, F weight0=1.0, const TMatrix< F > *T1=0, F weight1=0.0)
 Constructor. More...
 
virtual void usedIdx (Set< uint > &c) const
 
virtual void usedIdx (TColumn< bool > &c) const
 
virtual ~TMatrixBlock ()
 

Protected Member Functions

virtual ::std::ostream & info (::std::ostream &os) const
 

Private Member Functions

void insert_ (const TMatrix< F > &T, uint offset, uint size, F weight)
 

Private Attributes

Array< Controlctrl_
 Control data array (column header: column index and length of the column data) More...
 
Array< Datadata_
 Data array (matrix entries: row index and data) More...
 
uint offsetcol_
 
uint offsetrow_
 
uint sz_
 Size of the stored data. More...
 

Detailed Description

template<class F>
class concepts::TMatrixBlock< F >

TMatrixBlock are special Tmatrices in block diagonal structure, builded with two Tmatrices itsself.

The columns of the matrix are TColumn.

If a Tmatrix T0 or T1 is not to be added, i.e. its corresponding weight is zero, the TMatrixBlock coincides with the other input Tmatrix or is empty.

Author
Robert Gruhlke,2013
See also
TColumn the columns of the matrix.
NeumannTraceSpace application of TMatrixBlock

Definition at line 682 of file tmatrix.hh.

Constructor & Destructor Documentation

◆ TMatrixBlock()

template<class F >
concepts::TMatrixBlock< F >::TMatrixBlock ( const TMatrix< F > *  T0,
weight0 = 1.0,
const TMatrix< F > *  T1 = 0,
weight1 = 0.0 
)

Constructor.

Builds TMatrix which blockdiagonals are smaller TMatrices.

Parameters
T0TMatrix for upper block.
T1Tmatrix for possible bottom block.

◆ ~TMatrixBlock()

template<class F >
virtual concepts::TMatrixBlock< F >::~TMatrixBlock ( )
inlinevirtual

Definition at line 690 of file tmatrix.hh.

Member Function Documentation

◆ append()

template<class F >
void concepts::TMatrix< F >::append ( TColumn< F > *  T)
inherited

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
Ta linked list of columns (in full notation) to be stored.

◆ applyOne()

template<class F >
void concepts::TMatrix< F >::applyOne ( const ElementMatrix< F > &  A,
ElementMatrix< F > &  B 
) const
inherited

◆ columns()

template<class F >
TColumn<F>* concepts::TMatrix< F >::columns ( ) const
inherited

◆ control()

template<class F >
const TMatrix::Control* concepts::TMatrix< F >::control ( uint  i) const
inlineinherited

Returns the ith entry of the control data array.

Parameters
ia colum index, i.e. i < n()

Definition at line 601 of file tmatrix.hh.

◆ data()

template<class F >
const TMatrix::Data* concepts::TMatrix< F >::data ( uint  i) const
inlineinherited

Returns the ith entry of the data array.

Definition at line 604 of file tmatrix.hh.

◆ extract() [1/2]

template<class F >
virtual void concepts::TMatrixBlock< F >::extract ( const concepts::Vector< F > &  solution,
concepts::Array< F > &  coeff 
) const
inlinevirtual

Reimplemented from concepts::TMatrix< F >.

Definition at line 699 of file tmatrix.hh.

◆ extract() [2/2]

template<class F >
virtual void concepts::TMatrixBlock< F >::extract ( const concepts::Vector<::std::complex< F > > &  solution,
concepts::Array<::std::complex< F > > &  coeff 
) const
inlinevirtual

Reimplemented from concepts::TMatrix< F >.

Definition at line 703 of file tmatrix.hh.

◆ extractOne()

template<class F >
void concepts::TMatrix< F >::extractOne ( const concepts::Vector< F > &  solution,
concepts::Array< F > &  coeff 
) const
inherited

◆ index()

template<class F >
virtual uint concepts::TMatrix< F >::index ( const uint  i) const
inlinevirtualinherited

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()

template<class F >
virtual ::std::ostream& concepts::TMatrixBlock< F >::info ( ::std::ostream &  os) const
protected

◆ insert_()

template<class F >
void concepts::TMatrixBlock< F >::insert_ ( const TMatrix< F > &  T,
uint  offset,
uint  size,
weight 
)
private

◆ nEntries()

template<class F >
uint concepts::TMatrix< F >::nEntries ( ) const
inlineinherited

number of entries in the data vector

Definition at line 610 of file tmatrix.hh.

◆ offsetrow()

template<class F >
uint concepts::TMatrixBlock< F >::offsetrow ( ) const
inline

Returns the offset row, that is starting row of the (possible) second matrix block.

Definition at line 711 of file tmatrix.hh.

◆ operator()() [1/3]

template<class F >
void concepts::TMatrix< F >::operator() ( const ElementMatrix< F > &  A,
ElementMatrix< F > &  B 
) const
inherited

Application operator.

Computes the application of the T matrix on A and returns B: $B = A \cdot T$. The typical usage is explained in the base class.

More detailed: B is resized to a $n_A \times m_T$ matrix, then $B_{ij} = \sum_k A_{ik} T_{kj}$ where $i=1,\dots,n_A$ and $j=1,\dots,m_T$ and $\sum_k$ means sum over all $k$ which are present in the T matrix.

Parameters
AElement matrix
BResult
See also
T for the typical usage of this application operator.

◆ operator()() [2/3]

template<class F >
void concepts::TMatrix< F >::operator() ( const ElementMatrix<::std::complex< F > > &  A,
ElementMatrix<::std::complex< F > > &  B 
) const
inherited

◆ operator()() [3/3]

template<class F >
void concepts::TMatrix< F >::operator() ( const Vector< F > &  A,
Vector< F > &  B 
) const
inherited

◆ outputLocalMap()

template<class F >
::std::ostream& concepts::TMatrix< F >::outputLocalMap ( ::std::ostream &  os) const
inherited

◆ usedIdx() [1/2]

template<class F >
virtual void concepts::TMatrixBlock< F >::usedIdx ( Set< uint > &  c) const
inlinevirtual

Reimplemented from concepts::TMatrix< F >.

Definition at line 696 of file tmatrix.hh.

◆ usedIdx() [2/2]

template<class F >
virtual void concepts::TMatrixBlock< F >::usedIdx ( TColumn< bool > &  c) const
inlinevirtual

Reimplemented from concepts::TMatrix< F >.

Definition at line 692 of file tmatrix.hh.

Member Data Documentation

◆ ctrl_

template<class F >
Array<Control> concepts::TMatrix< F >::ctrl_
privateinherited

Control data array (column header: column index and length of the column data)

Definition at line 634 of file tmatrix.hh.

◆ data_

template<class F >
Array<Data> concepts::TMatrix< F >::data_
privateinherited

Data array (matrix entries: row index and data)

Definition at line 637 of file tmatrix.hh.

◆ offsetcol_

template<class F >
uint concepts::TMatrixBlock< F >::offsetcol_
private

Definition at line 724 of file tmatrix.hh.

◆ offsetrow_

template<class F >
uint concepts::TMatrixBlock< F >::offsetrow_
private

Definition at line 723 of file tmatrix.hh.

◆ sz_

template<class F >
uint concepts::TMatrix< F >::sz_
privateinherited

Size of the stored data.

Definition at line 640 of file tmatrix.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich