Go to the documentation of this file.
7 #ifndef __IPSYMSCALEDMATRIX_HPP__
8 #define __IPSYMSCALEDMATRIX_HPP__
17 class SymScaledMatrixSpace;
42 void SetUnscaledMatrix(
47 void SetUnscaledMatrixNonConst(
81 const std::string& name,
83 const std::string& prefix
133 bool row_col_scaling_reciprocal,
137 unscaled_matrix_space_(unscaled_matrix_space)
139 scaling_ = row_col_scaling->MakeNewCopy();
140 if( row_col_scaling_reciprocal )
142 scaling_->ElementWiseReciprocal();
153 bool allocate_unscaled_matrix =
false
157 if( allocate_unscaled_matrix )
167 return MakeNewSymScaledMatrix();
172 return MakeNewSymScaledMatrix();
184 return unscaled_matrix_space_;
Class for a Matrix in conjunction with its scaling factors for row and column scaling.
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.
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.
virtual bool HasValidNumbersImpl() const
Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
~SymScaledMatrixSpace()
Destructor.
SymScaledMatrix()
Default Constructor.
SmartPtr< const SymScaledMatrixSpace > owner_space_
Matrix space stored as a SymScaledMatrixSpace.
SmartPtr< const SymMatrixSpace > unscaled_matrix_space_
unscaled matrix space
SymScaledMatrix(const SymScaledMatrix &)
Copy Constructor.
SmartPtr< SymMatrix > GetUnscaledMatrixNonConst()
Return the unscaled matrix in non-const form.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
double Number
Type of all numbers.
SmartPtr< const SymMatrix > GetUnscaledMatrix() const
Return the unscaled matrix in const form.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
EJournalLevel
Print Level Enum.
~SymScaledMatrix()
Destructor.
SymScaledMatrixSpace()
Default constructor.
void operator=(const SymScaledMatrix &)
Default Assignment Operator.
virtual void ComputeRowAMaxImpl(Vector &rows_norms, bool init) const
Compute the max-norm of the rows in the matrix.
void SetUnscaledMatrix(const SmartPtr< const SymMatrix > unscaled_matrix)
Set the unscaled matrix.
int Index
Type of all indices of vectors, matrices etc.
virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta, Vector &y) const
Matrix-vector multiply.
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
void SetUnscaledMatrixNonConst(const SmartPtr< SymMatrix > &unscaled_matrix)
Set the unscaled matrix in a non-const version.
SmartPtr< const SymMatrix > matrix_
const version of the unscaled matrix
Template class for Smart Pointers.
SymScaledMatrix(const SymScaledMatrixSpace *owner_space)
Constructor, taking the owner_space.
EJournalCategory
Category Selection Enum.
SmartPtr< const Vector > RowColScaling() const
return the vector for the row and column scaling
SmartPtr< const SymMatrixSpace > UnscaledMatrixSpace() const
return the matrix space for the unscaled matrix
SmartPtr< Vector > scaling_
Row scaling vector.
SmartPtr< const Vector > RowColScaling() const
return the vector for the row and column scaling
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
Class responsible for all message output.
SymScaledMatrixSpace(const SymScaledMatrixSpace &)
Copy Constructor.
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
This is the base class for all derived symmetric matrix types.
SymScaledMatrixSpace(const SmartPtr< const Vector > &row_col_scaling, bool row_col_scaling_reciprocal, const SmartPtr< const SymMatrixSpace > &unscaled_matrix_space)
Constructor, given the number of row and columns blocks, as well as the total number of rows and colu...
SymMatrixSpace base class, corresponding to the SymMatrix base class.
bool IsValid(const SmartPtr< U > &smart_ptr)
SymScaledMatrix * MakeNewSymScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
SmartPtr< SymMatrix > nonconst_matrix_
non-const version of the unscaled matrix
SymScaledMatrixSpace & operator=(const SymScaledMatrixSpace &)
Default Assignment Operator.
This is the matrix space for SymScaledMatrix.