7 #ifndef __IPSYMSCALEDMATRIX_HPP__
8 #define __IPSYMSCALEDMATRIX_HPP__
17 class SymScaledMatrixSpace;
42 void SetUnscaledMatrix(
47 void SetUnscaledMatrixNonConst(
63 virtual void MultVectorImpl(
70 virtual bool HasValidNumbersImpl()
const;
72 virtual void ComputeRowAMaxImpl(
77 virtual void PrintImpl(
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_;
SmartPtr< const Vector > RowColScaling() const
return the vector for the row and column scaling
bool IsValid(const SmartPtr< U > &smart_ptr)
SmartPtr< SymMatrix > nonconst_matrix_
non-const version of the unscaled matrix
SmartPtr< const SymMatrix > GetUnscaledMatrix() const
Return the unscaled matrix in const form.
double Number
Type of all numbers.
void ObjectChanged()
Objects derived from TaggedObject MUST call this method every time their internal state changes to up...
Class for a Matrix in conjunction with its scaling factors for row and column scaling.
EJournalLevel
Print Level Enum.
void SetUnscaledMatrix(const SmartPtr< const SymMatrix > unscaled_matrix)
Set the unscaled matrix.
This is the base class for all derived symmetric matrix types.
Template class for Smart Pointers.
SmartPtr< Vector > scaling_
Row scaling vector.
virtual Matrix * MakeNew() const
Pure virtual method for creating a new Matrix of the corresponding type.
U * GetRawPtr(const SmartPtr< U > &smart_ptr)
virtual SymMatrix * MakeNewSymMatrix() const
Pure virtual method for creating a new matrix of this specific type.
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...
int Index
Type of all indices of vectors, matrices etc.
SmartPtr< const SymMatrix > matrix_
const version of the unscaled matrix
This is the matrix space for SymScaledMatrix.
SmartPtr< const Vector > RowColScaling() const
return the vector for the row and column scaling
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
SymMatrixSpace base class, corresponding to the SymMatrix base class.
SymScaledMatrix * MakeNewSymScaledMatrix(bool allocate_unscaled_matrix=false) const
Method for creating a new matrix of this specific type.
Class responsible for all message output.
SmartPtr< SymMatrix > GetUnscaledMatrixNonConst()
Return the unscaled matrix in non-const form.
~SymScaledMatrixSpace()
Destructor.
SmartPtr< const SymMatrixSpace > unscaled_matrix_space_
unscaled matrix space
SmartPtr< const SymMatrixSpace > UnscaledMatrixSpace() const
return the matrix space for the unscaled matrix
EJournalCategory
Category Selection Enum.
SmartPtr< const SymScaledMatrixSpace > owner_space_
Matrix space stored as a SymScaledMatrixSpace.
void SetUnscaledMatrixNonConst(const SmartPtr< SymMatrix > &unscaled_matrix)
Set the unscaled matrix in a non-const version.