19#include "CompositeMatrix.h"
20#include "CompositeMultiMatrixImpl.h"
21#include "CompositeSpace.h"
29using namespace Arccore;
34namespace CompositeKernel
45 cout() <<
"CompositeMatrix(const Alien::MultiMatrixImpl*) : Not implemented";
54 , m_row_space(multi_impl->
rowSpace())
55 , m_col_space(multi_impl->
colSpace())
57 alien_debug([&] { cout() <<
"Construct CompositeMatrix " <<
this; });
64 alien_debug([&] { cout() <<
"Clear CompositeMatrix" <<
this; });
66 for (
auto& m : m_matrices) {
76 alien_debug([&] { cout() <<
"Free CompositeMatrix" <<
this; });
78 for (
auto& m : m_matrices) {
86 void Matrix::resize(Integer nc)
89 cout() <<
"Resize CompositeMatrix" <<
this;
90 cout() <<
" - old size = " << m_nb_composite;
91 cout() <<
" - new size = " << nc;
94 m_row_space.resizeSubSpace(nc);
95 m_col_space.resizeSubSpace(nc);
99 m_matrices.resize(nc * nc);
104 Integer Matrix::size()
const {
return m_nb_composite; }
110 ALIEN_ASSERT(i < size(),
"Bound error");
111 ALIEN_ASSERT(j < size(),
"Bound error");
112 return MatrixElement(
113 m_matrices[i + j * m_nb_composite], m_row_space[i], m_col_space[j], *
this);
118 IMatrix& Matrix::operator()(Integer i, Integer j)
120 ALIEN_ASSERT(i < size(),
"Bound error");
121 ALIEN_ASSERT(j < size(),
"Bound error");
122 return *m_matrices[i + j * m_nb_composite];
127 const IMatrix& Matrix::operator()(Integer i, Integer j)
const
129 ALIEN_ASSERT(i < size(),
"Bound error");
130 ALIEN_ASSERT(j < size(),
"Bound error");
131 return *m_matrices[i + j * m_nb_composite];
136 void Matrix::setComposite(Integer i, Integer j, IMatrix* m)
138 ALIEN_ASSERT(i < size(),
"Bound error");
139 ALIEN_ASSERT(j < size(),
"Bound error");
140 m_matrices[i + j * m_nb_composite].reset(m);
Matrix(MultiMatrixImpl *multi_impl)
Constructor from a composite.
void clear()
Wipe out internal data.
virtual const ISpace & rowSpace() const
Get the row space associated to the matrix \ returns The row space.
virtual const ISpace & colSpace() const
Get the row space associated to the matrix \ returns The row space.
IMatrixImpl(const MultiMatrixImpl *multi_impl, BackEndId backend="")
Constructor.
Multi matrices representation container.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --