NOX Development
Loading...
Searching...
No Matches
NOX::Epetra::Scaling Class Reference

Object to control scaling of vectors and linear systems. More...

#include <NOX_Epetra_Scaling.H>

Public Types

enum  SourceType { None , RowSum , ColSum , UserDefined }
 Describes where the scaling vector comes from.
enum  ScaleType { Left , Right }
 Describes the type of scaling to apply.

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 (std::ostream &os)
 Printing.

Detailed Description

Object to control scaling of vectors and linear systems.

Currently this assumes a diagonal scaling only! Once epetra can do matrix-matrix multiplies we will expand this class.

Member Function Documentation

◆ addColSumScaling()

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.

References Epetra_Vector::Epetra_Vector().

◆ addRowSumScaling()

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.

References Epetra_Vector::Epetra_Vector().

◆ addUserScaling()

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.

References Epetra_Vector::Epetra_Vector().

◆ applyLeftScaling()

void NOX::Epetra::Scaling::applyLeftScaling ( const Epetra_Vector & input,
Epetra_Vector & result )
virtual

Applies any LEFT scaling vectors to an input vector.

References Epetra_MultiVector::Multiply(), and Epetra_MultiVector::Reciprocal().

◆ applyRightScaling()

void NOX::Epetra::Scaling::applyRightScaling ( const Epetra_Vector & input,
Epetra_Vector & result )
virtual

Applies any RIGHT scaling vectors to an input vector.

References Epetra_MultiVector::Multiply(), and Epetra_MultiVector::Reciprocal().

◆ computeScaling()

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.

References Epetra_LinearProblem::GetOperator(), Epetra_RowMatrix::InvColSums(), Epetra_RowMatrix::InvRowSums(), and Epetra_MultiVector::Reciprocal().

◆ scaleLinearSystem()

void NOX::Epetra::Scaling::scaleLinearSystem ( Epetra_LinearProblem & problem)
virtual

Scales the linear system.

References Epetra_LinearProblem::LeftScale(), and Epetra_LinearProblem::RightScale().

◆ unscaleLinearSystem()

void NOX::Epetra::Scaling::unscaleLinearSystem ( Epetra_LinearProblem & problem)
virtual

Remove the scaling from the linear system.

References Epetra_LinearProblem::LeftScale(), and Epetra_LinearProblem::RightScale().


The documentation for this class was generated from the following files: