NOX::Epetra::Scaling Class Reference

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

#include <NOX_Epetra_Scaling.H>

Collaboration diagram for NOX::Epetra::Scaling:

Collaboration graph
[legend]

List of all members.

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< ScaleTypescaleType
 Scaling type.
vector< SourceTypesourceType
 Source type.
vector< Teuchos::RCP
< Epetra_Vector > > 
scaleVector
 Scaling vector pointer.
Teuchos::RCP< Epetra_Vector > tmpVectorPtr
 Temporary vector.


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.

Definition at line 64 of file NOX_Epetra_Scaling.H.


Member Enumeration Documentation

Describes where the scaling vector comes from.

Definition at line 69 of file NOX_Epetra_Scaling.H.

Describes the type of scaling to apply.

Definition at line 72 of file NOX_Epetra_Scaling.H.


Constructor & Destructor Documentation

NOX::Epetra::Scaling::Scaling (  ) 

Constructor.

Definition at line 48 of file NOX_Epetra_Scaling.C.

NOX::Epetra::Scaling::~Scaling (  )  [virtual]

Virtual destructor.

Definition at line 53 of file NOX_Epetra_Scaling.C.


Member Function Documentation

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.


Member Data Documentation

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]

Teuchos::RCP<Epetra_Vector> NOX::Epetra::Scaling::tmpVectorPtr [private]


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

Generated on Wed Oct 21 14:28:46 2009 for Nonlinear Solver Project by  doxygen 1.5.9