7 #ifndef __IPCOMPOUNDMATRIX_HPP__
8 #define __IPCOMPOUNDMATRIX_HPP__
17 class CompoundMatrixSpace;
75 void CreateBlockFromSpace(
88 return ConstComp(irow, jcol);
104 return Comp(irow, jcol);
108 inline Index NComps_Rows()
const;
111 inline Index NComps_Cols()
const;
116 virtual void MultVectorImpl(
123 virtual void TransMultVectorImpl(
130 virtual void AddMSinvZImpl(
137 virtual void SinvBlrmZMTdBrImpl(
146 virtual bool HasValidNumbersImpl()
const;
148 virtual void ComputeRowAMaxImpl(
153 virtual void ComputeColAMaxImpl(
158 virtual void PrintImpl(
162 const std::string& name,
164 const std::string& prefix
190 std::vector<std::vector<SmartPtr<Matrix> > >
comps_;
204 bool MatricesValid()
const;
206 inline const Matrix* ConstComp(
278 bool auto_allocate =
false
292 return comp_spaces_[irow][jcol];
321 return MakeNewCompoundMatrix();
379 bool DimensionsSet()
const;
bool Diagonal() const
True if the blocks lie on the diagonal - can make some operations faster.
bool IsValid(const SmartPtr< U > &smart_ptr)
bool diagonal_
true if the CompoundMatrixSpace only has Matrix spaces along the diagonal.
SmartPtr< const Matrix > GetComp(Index irow, Index jcol) const
Method for retrieving one block from the compound matrix as a const Matrix.
~CompoundMatrixSpace()
Destructor.
double Number
Type of all numbers.
This is the matrix space for CompoundMatrix.
SmartPtr< const MatrixSpace > GetCompSpace(Index irow, Index jcol) const
Obtain the component MatrixSpace in block row irow and block column jcol.
Index NComps_Rows() const
Number of block rows.
EJournalLevel
Print Level Enum.
Matrix * Comp(Index irow, Index jcol)
bool matrices_valid_
boolean indicating if the compound matrix is in a "valid" state
Template class for Smart Pointers.
std::vector< std::vector< SmartPtr< const MatrixSpace > > > comp_spaces_
2-dim std::vector of matrix spaces for the components
Index ncomps_rows_
Number of block rows.
std::vector< std::vector< SmartPtr< Matrix > > > comps_
Matrix of matrix's containing the components.
bool dimensions_set_
Store whether or not the dimensions are valid.
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
const Matrix * ConstComp(Index irow, Index jcol) const
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
SmartPtr< Matrix > GetCompNonConst(Index irow, Index jcol)
Method for retrieving one block from the compound matrix as a non-const Matrix.
MatrixSpace base class, corresponding to the Matrix base class.
std::vector< std::vector< bool > > allocate_block_
2-dim std::vector of booleans deciding whether to allocate a new matrix for the blocks automagically ...
int Index
Type of all indices of vectors, matrices etc.
Index NComps_Cols() const
Number of block columns.
std::vector< std::vector< SmartPtr< const Matrix > > > const_comps_
Matrix of const matrix's containing the components.
Index NComps_Rows() const
Number of block rows of this compound matrix.
Index NComps_Cols() const
Number of block colmuns of this compound matrix.
Class responsible for all message output.
std::vector< Index > block_rows_
Vector of the number of rows in each comp column.
const CompoundMatrixSpace * owner_space_
Copy of the owner_space ptr as a CompoundMatrixSpace instead of MatrixSpace.
std::vector< Index > block_cols_
Vector of the number of cols in each comp row.
Index ncomps_cols_
Number of block columns.
Class for Matrices consisting of other matrices.
EJournalCategory
Category Selection Enum.