7 #ifndef __IPCOMPOUNDSYMMATRIX_HPP__ 8 #define __IPCOMPOUNDSYMMATRIX_HPP__ 17 class CompoundSymMatrixSpace;
73 return ConstComp(irow, jcol);
88 return Comp(irow, jcol);
101 Index NComps_Dim()
const;
105 virtual void MultVectorImpl(
113 virtual bool HasValidNumbersImpl()
const;
115 virtual void ComputeRowAMaxImpl(
120 virtual void PrintImpl(
124 const std::string& name,
126 const std::string& prefix
154 std::vector<std::vector<SmartPtr<Matrix> > >
comps_;
166 bool MatricesValid()
const;
176 if(
IsValid(comps_[irow][jcol]) )
180 else if(
IsValid(const_comps_[irow][jcol]) )
182 return GetRawPtr(const_comps_[irow][jcol]);
199 if(
IsValid(comps_[irow][jcol]) )
257 bool auto_allocate =
false 271 return comp_spaces_[irow][jcol];
275 Index NComps_Dim()
const 278 return ncomp_spaces_;
283 CompoundSymMatrix* MakeNewCompoundSymMatrix()
const;
287 return MakeNewCompoundSymMatrix();
339 bool DimensionsSet()
const;
bool matrices_valid_
boolean indicating if the compound matrix is in a "valid" state
bool IsValid(const SmartPtr< U > &smart_ptr)
SmartPtr< const MatrixSpace > GetCompSpace(Index irow, Index jcol) const
Obtain the component MatrixSpace in block row irow and block column jcol.
bool dimensions_set_
boolean indicating if the compound matrix space is in a "valid" state
std::vector< std::vector< SmartPtr< const Matrix > > > const_comps_
Vector of vectors containing the const components.
SmartPtr< const Matrix > GetComp(Index irow, Index jcol) const
Method for retrieving one block from the compound matrix.
SmartPtr< Matrix > GetCompNonConst(Index irow, Index jcol)
Non const version of GetComp.
Matrix * Comp(Index irow, Index jcol)
Internal method to return a non-const pointer to one of the comps.
bool IsNull(const SmartPtr< U > &smart_ptr)
std::vector< Index > block_dim_
Vector of the number of rows in each comp column.
EJournalLevel
Print Level Enum.
ipindex Index
Type of all indices of vectors, matrices etc.
CompoundSymMatrix * MakeNewCompoundSymMatrix() const
Method for creating a new matrix of this specific type.
This file contains a base class for all exceptions and a set of macros to help with exceptions...
Class for symmetric matrices consisting of other matrices.
This is the base class for all derived symmetric matrix types.
Template class for Smart Pointers.
const Matrix * ConstComp(Index irow, Index jcol) const
Internal method to return a const pointer to one of the comps.
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
MatrixSpace base class, corresponding to the Matrix base class.
ipnumber Number
Type of all numbers.
std::vector< std::vector< SmartPtr< Matrix > > > comps_
Vector of vectors containing the components.
This is the matrix space for CompoundSymMatrix.
const CompoundSymMatrixSpace * owner_space_
Copy of the owner_space ptr as a CompoundSymMatrixSpace.
SmartPtr< CompoundSymMatrix > MakeNewCompoundSymMatrix() const
Method for creating a new matrix of this specific type.
SymMatrixSpace base class, corresponding to the SymMatrix base class.
Index ncomp_spaces_
Number of components per row and column.
Class responsible for all message output.
std::vector< std::vector< bool > > allocate_block_
2-dim std::vector of booleans deciding whether to allocate a new matrix for the blocks automagically ...
EJournalCategory
Category Selection Enum.
std::vector< std::vector< SmartPtr< const MatrixSpace > > > comp_spaces_
2-dim std::vector of matrix spaces for the components.
~CompoundSymMatrixSpace()
Destructor.