#include <NOX_Epetra_Scaling.H>
Public Types | |
enum | SourceType { None, RowSum, ColSum, UserDefined } |
Describes where the scaling vector comes from. More... | |
enum | ScaleType { Left, Right } |
Describes the type of scaling to apply. More... | |
Public Member Functions | |
Scaling () | |
Constructor. | |
virtual | ~Scaling () |
Virtual destructor. | |
virtual void | addUserScaling (ScaleType type, const Teuchos::RCP< Epetra_Vector > &D) |
Add a user supplied diagonal scale vector to the scaling object. | |
virtual void | addRowSumScaling (ScaleType type, const Teuchos::RCP< Epetra_Vector > &D) |
Add "Row Sum" scaling to the scaling object. The supplied vector is used to store the current row sum vector. | |
virtual void | addColSumScaling (ScaleType type, const Teuchos::RCP< Epetra_Vector > &D) |
Add "Col Sum" scaling to the scaling object. The supplied vector is used to store the current column sum vector. | |
virtual void | computeScaling (const Epetra_LinearProblem &problem) |
Computes Row Sum scaling diagonal vectors. Only needs to be called if a row or column sum scaling has been requested. | |
virtual void | scaleLinearSystem (Epetra_LinearProblem &problem) |
Scales the linear system. | |
virtual void | unscaleLinearSystem (Epetra_LinearProblem &problem) |
Remove the scaling from the linear system. | |
virtual void | applyRightScaling (const Epetra_Vector &input, Epetra_Vector &result) |
Applies any RIGHT scaling vectors to an input vector. | |
virtual void | applyLeftScaling (const Epetra_Vector &input, Epetra_Vector &result) |
Applies any LEFT scaling vectors to an input vector. | |
virtual void | print (ostream &os) |
Printing. | |
Private Attributes | |
vector< ScaleType > | scaleType |
Scaling type. | |
vector< SourceType > | sourceType |
Source type. | |
vector< Teuchos::RCP < Epetra_Vector > > | scaleVector |
Scaling vector pointer. | |
Teuchos::RCP< Epetra_Vector > | tmpVectorPtr |
Temporary vector. |
Currently this assumes a diagonal scaling only! Once epetra can do matrix-matrix multiplies we will expand this class.
Definition at line 64 of file NOX_Epetra_Scaling.H.
NOX::Epetra::Scaling::Scaling | ( | ) |
NOX::Epetra::Scaling::~Scaling | ( | ) | [virtual] |
void NOX::Epetra::Scaling::addUserScaling | ( | ScaleType | type, | |
const Teuchos::RCP< Epetra_Vector > & | D | |||
) | [virtual] |
Add a user supplied diagonal scale vector to the scaling object.
Definition at line 58 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, sourceType, and tmpVectorPtr.
void NOX::Epetra::Scaling::addRowSumScaling | ( | ScaleType | type, | |
const Teuchos::RCP< Epetra_Vector > & | D | |||
) | [virtual] |
Add "Row Sum" scaling to the scaling object. The supplied vector is used to store the current row sum vector.
Definition at line 68 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, sourceType, and tmpVectorPtr.
void NOX::Epetra::Scaling::addColSumScaling | ( | ScaleType | type, | |
const Teuchos::RCP< Epetra_Vector > & | D | |||
) | [virtual] |
Add "Col Sum" scaling to the scaling object. The supplied vector is used to store the current column sum vector.
Definition at line 78 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, sourceType, and tmpVectorPtr.
void NOX::Epetra::Scaling::computeScaling | ( | const Epetra_LinearProblem & | problem | ) | [virtual] |
Computes Row Sum scaling diagonal vectors. Only needs to be called if a row or column sum scaling has been requested.
Definition at line 88 of file NOX_Epetra_Scaling.C.
References scaleVector, and sourceType.
void NOX::Epetra::Scaling::scaleLinearSystem | ( | Epetra_LinearProblem & | problem | ) | [virtual] |
Scales the linear system.
Definition at line 138 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, and tmpVectorPtr.
void NOX::Epetra::Scaling::unscaleLinearSystem | ( | Epetra_LinearProblem & | problem | ) | [virtual] |
Remove the scaling from the linear system.
Definition at line 160 of file NOX_Epetra_Scaling.C.
References scaleType, and scaleVector.
void NOX::Epetra::Scaling::applyRightScaling | ( | const Epetra_Vector & | input, | |
Epetra_Vector & | result | |||
) | [virtual] |
Applies any RIGHT scaling vectors to an input vector.
Definition at line 177 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, and tmpVectorPtr.
void NOX::Epetra::Scaling::applyLeftScaling | ( | const Epetra_Vector & | input, | |
Epetra_Vector & | result | |||
) | [virtual] |
Applies any LEFT scaling vectors to an input vector.
Definition at line 198 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, and tmpVectorPtr.
void NOX::Epetra::Scaling::print | ( | ostream & | os | ) | [virtual] |
Printing.
Definition at line 219 of file NOX_Epetra_Scaling.C.
References scaleType, scaleVector, and sourceType.
vector<ScaleType> NOX::Epetra::Scaling::scaleType [private] |
Scaling type.
Definition at line 112 of file NOX_Epetra_Scaling.H.
Referenced by addColSumScaling(), addRowSumScaling(), addUserScaling(), applyLeftScaling(), applyRightScaling(), print(), scaleLinearSystem(), and unscaleLinearSystem().
vector<SourceType> NOX::Epetra::Scaling::sourceType [private] |
Source type.
Definition at line 115 of file NOX_Epetra_Scaling.H.
Referenced by addColSumScaling(), addRowSumScaling(), addUserScaling(), computeScaling(), and print().
vector< Teuchos::RCP<Epetra_Vector> > NOX::Epetra::Scaling::scaleVector [private] |
Scaling vector pointer.
Definition at line 118 of file NOX_Epetra_Scaling.H.
Referenced by addColSumScaling(), addRowSumScaling(), addUserScaling(), applyLeftScaling(), applyRightScaling(), computeScaling(), print(), scaleLinearSystem(), and unscaleLinearSystem().
Teuchos::RCP<Epetra_Vector> NOX::Epetra::Scaling::tmpVectorPtr [private] |
Temporary vector.
Definition at line 121 of file NOX_Epetra_Scaling.H.
Referenced by addColSumScaling(), addRowSumScaling(), addUserScaling(), applyLeftScaling(), applyRightScaling(), and scaleLinearSystem().