25#include <alien/kernels/composite/CompositeMatrix.h>
26#include <alien/kernels/composite/CompositeMultiMatrixImpl.h>
29#include <alien/functional/NullMatrix.h>
30#include <alien/kernels/composite/CompositeSpace.h>
31#include <alien/utils/ICopyOnWriteObject.h>
39using namespace Arccore;
47 return m.composite(i, j);
62, m_composite_matrix(m_impl->get<
Alien::BackEnd::tag::composite>(false))
64 m_impl->setFeature(
"composite");
82 m_composite_matrix.resize(nc);
84 for (Integer i = 0; i < nc; ++i)
85 for (Integer j = 0; j < nc; ++j)
86 m_composite_matrix.setComposite(i, j,
new NullMatrix());
95 return m_composite_matrix.size();
104 return m_impl->rowSpace();
113 return m_impl->colSpace();
122 return m_composite_matrix.element(i, j);
131 return m_composite_matrix(i, j);
140 return m_composite_matrix(i, j);
148 m_impl->setFeature(feature);
156 return m_impl->hasFeature(feature);
190 for (Integer i = 0; i < this->
size(); ++i)
191 for (Integer j = 0; j < this->
size(); ++j) {
192 if (m_composite_matrix(i, j).
impl())
193 m_composite_matrix(i, j).impl()->free();
202 for (Integer i = 0; i < this->
size(); ++i)
203 for (Integer j = 0; j < this->
size(); ++j) {
204 if (m_composite_matrix(i, j).
impl())
205 m_composite_matrix(i, j).impl()->clear();
Composite matrix for heterogenous matrices.
Element composite(Arccore::Integer i, Arccore::Integer j)
Get the (i,j) element.
void visit(ICopyOnWriteMatrix &visit) const
Visit method.
const ISpace & colSpace() const
Get the col space of the global matrix.
const ISpace & rowSpace() const
Get the row space of the global matrix.
MultiMatrixImpl * impl()
Get the multimatrix implementation.
void free()
Free the composite matrix.
void clear()
Clear the composite matrix.
void resize(Arccore::Integer nc)
Resize the number of submatrices.
CompositeMatrix()
Constructor.
void setUserFeature(Arccore::String feature)
Add a feature to the composite matrix.
CompositeKernel::MatrixElement Element
Type of submatrix element.
Arccore::Integer size() const
Get the number of submatrices.
IMatrix & operator()(Arccore::Integer i, Arccore::Integer j)
Get the (i,j) submatrix.
bool hasUserFeature(Arccore::String feature) const
Check if the composite matrix has a feature.
Interface for all matrices.
Interface for algebraic space objects.
Multi matrices representation container.
const AlgebraTraits< tag >::matrix_type & get() const
Get a specific matrix implementation.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --