Composite matrix for heterogenous matrices. More...
#include <core/alien/data/CompositeMatrix.h>
Public Types | |
| using | Element = CompositeKernel::MatrixElement |
| Type of submatrix element. | |
Public Member Functions | |
| CompositeMatrix () | |
| Constructor. | |
| CompositeMatrix (Arccore::Integer nc) | |
| Constructor. | |
| virtual | ~CompositeMatrix () |
| Free resources. | |
| void | visit (ICopyOnWriteMatrix &visit) const |
| Visit method. | |
| void | resize (Arccore::Integer nc) |
| Resize the number of submatrices. | |
| Arccore::Integer | size () const |
| Get the number of submatrices. | |
| const ISpace & | rowSpace () const |
| Get the row space of the global matrix. | |
| const ISpace & | colSpace () const |
| Get the col space of the global matrix. | |
| Element | composite (Arccore::Integer i, Arccore::Integer j) |
| Get the (i,j) element. | |
| IMatrix & | operator() (Arccore::Integer i, Arccore::Integer j) |
| Get the (i,j) submatrix. | |
| const IMatrix & | operator() (Arccore::Integer i, Arccore::Integer j) const |
| Get the (i,j) submatrix. | |
| void | setUserFeature (Arccore::String feature) |
| Add a feature to the composite matrix. | |
| bool | hasUserFeature (Arccore::String feature) const |
| Check if the composite matrix has a feature. | |
| MultiMatrixImpl * | impl () |
| Get the multimatrix implementation. | |
| const MultiMatrixImpl * | impl () const |
| Get the multimatrix implementation. | |
| void | free () |
| Free the composite matrix. | |
| void | clear () |
| Clear the composite matrix. | |
Private Attributes | |
| std::shared_ptr< CompositeKernel::MultiMatrixImpl > | m_impl |
| The multimatrix implementation. | |
| CompositeKernel::Matrix & | m_composite_matrix |
| The composite matrix. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Alien::IMatrix | |
| IMatrix () | |
| Constructor. | |
Composite matrix for heterogenous matrices.
This class allow to handle matrices made of several matrices. It allows to deal with a single matrix composed of severals submatrices. This is especially usefull to apply different solvers on a linear system, or to build more efficiently submatrices due to specific problems implying different matrices data structure.
Definition at line 64 of file data/CompositeMatrix.h.
Type of submatrix element.
Definition at line 68 of file data/CompositeMatrix.h.
| Alien::CompositeMatrix::CompositeMatrix | ( | ) |
Constructor.
Definition at line 53 of file data/CompositeMatrix.cc.
References CompositeMatrix().
Referenced by CompositeMatrix().
| Alien::CompositeMatrix::CompositeMatrix | ( | Arccore::Integer | nc | ) |
Constructor.
| [in] | nc | The number of submatrices |
|
inlinevirtual |
Free resources.
Definition at line 81 of file data/CompositeMatrix.h.
| void Alien::CompositeMatrix::clear | ( | ) |
Clear the composite matrix.
Definition at line 200 of file data/CompositeMatrix.cc.
References Alien::CompositeKernel::Matrix::clear(), impl(), m_composite_matrix, and size().
Referenced by operator()().
|
virtual |
Get the col space of the global matrix.
Implements Alien::IMatrix.
Definition at line 111 of file data/CompositeMatrix.cc.
References m_impl.
| CompositeMatrix::Element Alien::CompositeMatrix::composite | ( | Arccore::Integer | i, |
| Arccore::Integer | j ) |
Get the (i,j) element.
| [in] | i | The row index of the element |
| [in] | j | The col index of the element |
Definition at line 120 of file data/CompositeMatrix.cc.
References m_composite_matrix.
| void Alien::CompositeMatrix::free | ( | ) |
Free the composite matrix.
Definition at line 188 of file data/CompositeMatrix.cc.
References impl(), m_composite_matrix, and size().
Referenced by operator()().
| bool Alien::CompositeMatrix::hasUserFeature | ( | Arccore::String | feature | ) | const |
Check if the composite matrix has a feature.
Definition at line 154 of file data/CompositeMatrix.cc.
References m_impl.
Referenced by operator()().
|
virtual |
Get the multimatrix implementation.
Implements Alien::IMatrix.
Definition at line 163 of file data/CompositeMatrix.cc.
References m_impl.
Referenced by clear(), free(), Alien::NormalizeOpt::normalize(), and operator()().
|
virtual |
Get the multimatrix implementation.
Implements Alien::IMatrix.
Definition at line 180 of file data/CompositeMatrix.cc.
References m_impl.
| IMatrix & Alien::CompositeMatrix::operator() | ( | Arccore::Integer | i, |
| Arccore::Integer | j ) |
Get the (i,j) submatrix.
| [in] | i | The row index of the submatrix |
| [in] | j | The col index of the submatrix |
References Alien::IMatrix::IMatrix().
| const IMatrix & Alien::CompositeMatrix::operator() | ( | Arccore::Integer | i, |
| Arccore::Integer | j ) const |
Get the (i,j) submatrix.
| [in] | i | The row index of the submatrix |
| [in] | j | The col index of the submatrix |
References clear(), free(), hasUserFeature(), Alien::IMatrix::IMatrix(), impl(), and setUserFeature().
| void Alien::CompositeMatrix::resize | ( | Arccore::Integer | nc | ) |
Resize the number of submatrices.
| [in] | nc | The number of submatrices |
Definition at line 80 of file data/CompositeMatrix.cc.
References m_composite_matrix.
|
virtual |
Get the row space of the global matrix.
Implements Alien::IMatrix.
Definition at line 102 of file data/CompositeMatrix.cc.
References m_impl.
| void Alien::CompositeMatrix::setUserFeature | ( | Arccore::String | feature | ) |
Add a feature to the composite matrix.
| [in] | feature | The feature to add |
Definition at line 146 of file data/CompositeMatrix.cc.
References m_impl.
Referenced by operator()().
| Integer Alien::CompositeMatrix::size | ( | ) | const |
Get the number of submatrices.
Definition at line 93 of file data/CompositeMatrix.cc.
References m_composite_matrix.
Referenced by clear(), and free().
|
virtual |
Visit method.
| [in] | visit | Visit matrix method |
Implements Alien::IMatrix.
Definition at line 72 of file data/CompositeMatrix.cc.
References m_impl.
|
private |
The composite matrix.
Definition at line 172 of file data/CompositeMatrix.h.
Referenced by clear(), composite(), free(), resize(), and size().
|
private |
The multimatrix implementation.
Definition at line 170 of file data/CompositeMatrix.h.
Referenced by colSpace(), hasUserFeature(), impl(), impl(), rowSpace(), setUserFeature(), and visit().