Alien  1.3.0
User documentation
Loading...
Searching...
No Matches
Alien::CompositeMatrix Class Reference

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.

Additional Inherited Members

Protected Member Functions inherited from Alien::IMatrix
 IMatrix ()
 Constructor.

Detailed Description

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.

Member Typedef Documentation

◆ Element

Type of submatrix element.

Definition at line 68 of file data/CompositeMatrix.h.

Constructor & Destructor Documentation

◆ CompositeMatrix() [1/2]

Alien::CompositeMatrix::CompositeMatrix ( )

Constructor.

Definition at line 53 of file data/CompositeMatrix.cc.

References CompositeMatrix().

Referenced by CompositeMatrix().

◆ CompositeMatrix() [2/2]

Alien::CompositeMatrix::CompositeMatrix ( Arccore::Integer nc)

Constructor.

Parameters
[in]ncThe number of submatrices

◆ ~CompositeMatrix()

virtual Alien::CompositeMatrix::~CompositeMatrix ( )
inlinevirtual

Free resources.

Definition at line 81 of file data/CompositeMatrix.h.

Member Function Documentation

◆ clear()

void Alien::CompositeMatrix::clear ( )

Clear the composite matrix.

Definition at line 200 of file data/CompositeMatrix.cc.

References impl(), and size().

Referenced by operator()().

◆ colSpace()

const ISpace & Alien::CompositeMatrix::colSpace ( ) const
virtual

Get the col space of the global matrix.

Returns
The col space

Implements Alien::IMatrix.

Definition at line 111 of file data/CompositeMatrix.cc.

◆ composite()

CompositeMatrix::Element Alien::CompositeMatrix::composite ( Arccore::Integer i,
Arccore::Integer j )

Get the (i,j) element.

Parameters
[in]iThe row index of the element
[in]jThe col index of the element
Returns
The (i,j) element

Definition at line 120 of file data/CompositeMatrix.cc.

◆ free()

void Alien::CompositeMatrix::free ( )

Free the composite matrix.

Definition at line 188 of file data/CompositeMatrix.cc.

References impl(), and size().

Referenced by operator()().

◆ hasUserFeature()

bool Alien::CompositeMatrix::hasUserFeature ( Arccore::String feature) const

Check if the composite matrix has a feature.

Returns
Wheteher or not the composite matrix has the feature

Definition at line 154 of file data/CompositeMatrix.cc.

Referenced by operator()().

◆ impl() [1/2]

MultiMatrixImpl * Alien::CompositeMatrix::impl ( )
virtual

Get the multimatrix implementation.

Returns
The multimatrix implementation

Implements Alien::IMatrix.

Definition at line 163 of file data/CompositeMatrix.cc.

References Alien::MultiMatrixImpl::get().

Referenced by clear(), free(), Alien::NormalizeOpt::normalize(), and operator()().

◆ impl() [2/2]

const MultiMatrixImpl * Alien::CompositeMatrix::impl ( ) const
virtual

Get the multimatrix implementation.

Returns
The multimatrix implementation

Implements Alien::IMatrix.

Definition at line 180 of file data/CompositeMatrix.cc.

References Alien::MultiMatrixImpl::get().

◆ operator()() [1/2]

IMatrix & Alien::CompositeMatrix::operator() ( Arccore::Integer i,
Arccore::Integer j )

Get the (i,j) submatrix.

Parameters
[in]iThe row index of the submatrix
[in]jThe col index of the submatrix
Returns
The (i,j) submatrix

References Alien::IMatrix::IMatrix().

◆ operator()() [2/2]

const IMatrix & Alien::CompositeMatrix::operator() ( Arccore::Integer i,
Arccore::Integer j ) const

Get the (i,j) submatrix.

Parameters
[in]iThe row index of the submatrix
[in]jThe col index of the submatrix
Returns
The (i,j) submatrix

References clear(), free(), hasUserFeature(), Alien::IMatrix::IMatrix(), impl(), and setUserFeature().

◆ resize()

void Alien::CompositeMatrix::resize ( Arccore::Integer nc)

Resize the number of submatrices.

Parameters
[in]ncThe number of submatrices

Definition at line 80 of file data/CompositeMatrix.cc.

◆ rowSpace()

const ISpace & Alien::CompositeMatrix::rowSpace ( ) const
virtual

Get the row space of the global matrix.

Returns
The row space

Implements Alien::IMatrix.

Definition at line 102 of file data/CompositeMatrix.cc.

◆ setUserFeature()

void Alien::CompositeMatrix::setUserFeature ( Arccore::String feature)

Add a feature to the composite matrix.

Parameters
[in]featureThe feature to add

Definition at line 146 of file data/CompositeMatrix.cc.

Referenced by operator()().

◆ size()

Integer Alien::CompositeMatrix::size ( ) const

Get the number of submatrices.

Returns
The number of submatrices

Definition at line 93 of file data/CompositeMatrix.cc.

Referenced by clear(), and free().

◆ visit()

void Alien::CompositeMatrix::visit ( ICopyOnWriteMatrix & visit) const
virtual

Visit method.

Parameters
[in]visitVisit matrix method

Implements Alien::IMatrix.

Definition at line 72 of file data/CompositeMatrix.cc.


The documentation for this class was generated from the following files: