7#ifndef __IPCOMPOUNDSYMMATRIX_HPP__
8#define __IPCOMPOUNDSYMMATRIX_HPP__
17class CompoundSymMatrixSpace;
124 const std::string&
name,
154 std::vector<std::vector<SmartPtr<Matrix> > >
comps_;
278 return ncomp_spaces_;
287 return MakeNewCompoundSymMatrix();
This is the matrix space for CompoundSymMatrix.
~CompoundSymMatrixSpace()
Destructor.
CompoundSymMatrixSpace(const CompoundSymMatrix &)
Copy Constructor.
CompoundSymMatrixSpace()
Default constructor.
Index ncomp_spaces_
Number of components per row and column.
void SetBlockDim(Index irow_jcol, Index dim)
Set the dimension dim for block row (or column) irow_jcol.
SmartPtr< const MatrixSpace > GetCompSpace(Index irow, Index jcol) const
Obtain the component MatrixSpace in block row irow and block column jcol.
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.
bool dimensions_set_
boolean indicating if the compound matrix space is in a "valid" state
CompoundSymMatrixSpace(Index ncomp_spaces, Index total_dim)
Constructor, given the number of blocks (same for rows and columns), as well as the total dimension o...
void SetCompSpace(Index irow, Index jcol, const MatrixSpace &mat_space, bool auto_allocate=false)
Set the component SymMatrixSpace.
std::vector< std::vector< bool > > allocate_block_
2-dim std::vector of booleans deciding whether to allocate a new matrix for the blocks automagically
Index GetBlockDim(Index irow_jcol) const
Get the dimension dim for block row (or column) irow_jcol.
CompoundSymMatrix * MakeNewCompoundSymMatrix() const
Method for creating a new matrix of this specific type.
std::vector< std::vector< SmartPtr< const MatrixSpace > > > comp_spaces_
2-dim std::vector of matrix spaces for the components.
std::vector< Index > block_dim_
Vector of the number of rows in each comp column.
bool DimensionsSet() const
Method to check whether or not the spaces are valid.
CompoundSymMatrixSpace & operator=(const CompoundSymMatrixSpace &)
Default Assignment Operator.
Class for symmetric matrices consisting of other matrices.
SmartPtr< CompoundSymMatrix > MakeNewCompoundSymMatrix() const
Method for creating a new matrix of this specific type.
void SetCompNonConst(Index irow, Index jcol, Matrix &matrix)
Non const version of the same method.
Index NComps_Dim() const
Number of block rows and columns.
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
SmartPtr< Matrix > GetCompNonConst(Index irow, Index jcol)
Non const version of GetComp.
std::vector< std::vector< SmartPtr< const Matrix > > > const_comps_
Vector of vectors containing the const components.
CompoundSymMatrix()
Default Constructor.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
void SetComp(Index irow, Index jcol, const Matrix &matrix)
Method for setting an individual component at position (irow, icol) in the compound matrix.
void operator=(const CompoundSymMatrix &)
Default Assignment Operator.
virtual void PrintImpl(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
Print detailed information about the matrix.
std::vector< std::vector< SmartPtr< Matrix > > > comps_
Vector of vectors containing the components.
const CompoundSymMatrixSpace * owner_space_
Copy of the owner_space ptr as a CompoundSymMatrixSpace.
Matrix * Comp(Index irow, Index jcol)
Internal method to return a non-const pointer to one of the comps.
const Matrix * ConstComp(Index irow, Index jcol) const
Internal method to return a const pointer to one of the comps.
SmartPtr< const Matrix > GetComp(Index irow, Index jcol) const
Method for retrieving one block from the compound matrix.
CompoundSymMatrix(const CompoundSymMatrixSpace *owner_space)
Constructor, taking only the number for block components into the row and column direction.
CompoundSymMatrix(const CompoundSymMatrix &)
Copy Constructor.
bool MatricesValid() const
method to check wether or not the matrices are valid
~CompoundSymMatrix()
Destructor.
bool matrices_valid_
boolean indicating if the compound matrix is in a "valid" state
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
Templated class which stores one entry for the CachedResult class.
Class responsible for all message output.
MatrixSpace base class, corresponding to the Matrix base class.
SymMatrixSpace base class, corresponding to the SymMatrix base class.
This is the base class for all derived symmetric matrix types.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
bool IsValid(const SmartPtr< U > &smart_ptr)
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
ipindex Index
Type of all indices of vectors, matrices etc.
EJournalCategory
Category Selection Enum.
EJournalLevel
Print Level Enum.
ipnumber Number
Type of all numbers.
bool IsNull(const SmartPtr< U > &smart_ptr)