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

Composite matrix for heterogenous matrices. More...

#include <core/alien/data/CompositeMatrix.h>

Inheritance diagram for Alien::CompositeMatrix:
Collaboration diagram for Alien::CompositeMatrix:

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 ISpacerowSpace () const
 Get the row space of the global matrix.
const ISpacecolSpace () const
 Get the col space of the global matrix.
Element composite (Arccore::Integer i, Arccore::Integer j)
 Get the (i,j) element.
IMatrixoperator() (Arccore::Integer i, Arccore::Integer j)
 Get the (i,j) submatrix.
const IMatrixoperator() (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.
MultiMatrixImplimpl ()
 Get the multimatrix implementation.
const MultiMatrixImplimpl () const
 Get the multimatrix implementation.
void free ()
 Free the composite matrix.
void clear ()
 Clear the composite matrix.

Private Attributes

std::shared_ptr< CompositeKernel::MultiMatrixImplm_impl
 The multimatrix implementation.
CompositeKernel::Matrixm_composite_matrix
 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 Alien::CompositeKernel::Matrix::clear(), impl(), m_composite_matrix, and size().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

References m_impl.

◆ 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.

References m_composite_matrix.

◆ free()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

References m_impl.

Referenced by operator()().

Here is the caller graph for this function:

◆ 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 m_impl.

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

Here is the caller graph for this function:

◆ 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 m_impl.

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

Here is the call graph for this function:

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

Here is the call graph for this function:

◆ 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.

References m_composite_matrix.

◆ 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.

References m_impl.

◆ 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.

References m_impl.

Referenced by operator()().

Here is the caller graph for this function:

◆ 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.

References m_composite_matrix.

Referenced by clear(), and free().

Here is the caller graph for this function:

◆ 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.

References m_impl.

Member Data Documentation

◆ m_composite_matrix

CompositeKernel::Matrix& Alien::CompositeMatrix::m_composite_matrix
private

The composite matrix.

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

Referenced by clear(), composite(), free(), resize(), and size().

◆ m_impl

std::shared_ptr<CompositeKernel::MultiMatrixImpl> Alien::CompositeMatrix::m_impl
private

The multimatrix implementation.

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

Referenced by colSpace(), hasUserFeature(), impl(), impl(), rowSpace(), setUserFeature(), and visit().


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