Epetra Package Browser (Single Doxygen Collection) Development
Loading...
Searching...
No Matches
List of all members
Epetra_LinearProblem Class Reference

Epetra_LinearProblem: The Epetra Linear Problem Class. More...

#include <Epetra_LinearProblem.h>

Set methods

enum  ProblemDifficultyLevel { easy , moderate , hard , unsure }
 
void AssertSymmetric ()
 
void SetPDL (ProblemDifficultyLevel PDL)
 Set problem difficulty level.
 
void SetOperator (Epetra_RowMatrix *A)
 Set Operator A of linear problem AX = B using an Epetra_RowMatrix.
 
void SetOperator (Epetra_Operator *A)
 Set Operator A of linear problem AX = B using an Epetra_Operator.
 
void SetLHS (Epetra_MultiVector *X)
 Set left-hand-side X of linear problem AX = B.
 
void SetRHS (Epetra_MultiVector *B)
 Set right-hand-side B of linear problem AX = B.
 

Accessor methods

Epetra_OperatorOperator_
 
Epetra_RowMatrixA_
 
Epetra_MultiVectorX_
 
Epetra_MultiVectorB_
 
bool OperatorSymmetric_
 
ProblemDifficultyLevel PDL_
 
bool LeftScaled_
 
bool RightScaled_
 
Epetra_VectorLeftScaleVector_
 
Epetra_VectorRightScaleVector_
 
Epetra_OperatorGetOperator () const
 Get a pointer to the operator A.
 
Epetra_RowMatrixGetMatrix () const
 Get a pointer to the matrix A.
 
Epetra_MultiVectorGetLHS () const
 Get a pointer to the left-hand-side X.
 
Epetra_MultiVectorGetRHS () const
 Get a pointer to the right-hand-side B.
 
ProblemDifficultyLevel GetPDL () const
 Get problem difficulty level.
 
bool IsOperatorSymmetric () const
 Get operator symmetry bool.
 
Epetra_LinearProblemoperator= (const Epetra_LinearProblem &Problem)
 

Constructors/Destructor

 Epetra_LinearProblem (void)
 Epetra_LinearProblem Default Constructor.
 
 Epetra_LinearProblem (Epetra_RowMatrix *A, Epetra_MultiVector *X, Epetra_MultiVector *B)
 Epetra_LinearProblem Constructor to pass in an operator as a matrix.
 
 Epetra_LinearProblem (Epetra_Operator *A, Epetra_MultiVector *X, Epetra_MultiVector *B)
 Epetra_LinearProblem Constructor to pass in a basic Epetra_Operator.
 
 Epetra_LinearProblem (const Epetra_LinearProblem &Problem)
 Epetra_LinearProblem Copy Constructor.
 
virtual ~Epetra_LinearProblem (void)
 Epetra_LinearProblem Destructor.
 

Integrity check method

int CheckInput () const
 Check input parameters for existence and size consistency.
 

Computational methods

int LeftScale (const Epetra_Vector &D)
 Perform left scaling of a linear problem.
 
int RightScale (const Epetra_Vector &D)
 Perform right scaling of a linear problem.
 

Detailed Description

Epetra_LinearProblem: The Epetra Linear Problem Class.

The Epetra_LinearProblem class is a wrapper that encapsulates the general information needed for solving a linear system of equations. Currently it accepts a Epetra matrix, initial guess and RHS and returns the solution. the elapsed time for each calling processor.

Definition at line 62 of file Epetra_LinearProblem.h.

Member Enumeration Documentation

◆ ProblemDifficultyLevel

Enumerator
easy 
moderate 
hard 
unsure 

Definition at line 112 of file Epetra_LinearProblem.h.

Constructor & Destructor Documentation

◆ Epetra_LinearProblem() [1/4]

Epetra_LinearProblem::Epetra_LinearProblem ( void  )

Epetra_LinearProblem Default Constructor.

Creates an empty Epetra_LinearProblem instance. The operator A, left-hand-side X and right-hand-side B must be set use the SetOperator(), SetLHS() and SetRHS() methods respectively.

Definition at line 50 of file Epetra_LinearProblem.cpp.

◆ Epetra_LinearProblem() [2/4]

Epetra_LinearProblem::Epetra_LinearProblem ( Epetra_RowMatrix A,
Epetra_MultiVector X,
Epetra_MultiVector B 
)

Epetra_LinearProblem Constructor to pass in an operator as a matrix.

Creates a Epetra_LinearProblem instance where the operator is passed in as a matrix.

Definition at line 64 of file Epetra_LinearProblem.cpp.

◆ Epetra_LinearProblem() [3/4]

Epetra_LinearProblem::Epetra_LinearProblem ( Epetra_Operator A,
Epetra_MultiVector X,
Epetra_MultiVector B 
)

Epetra_LinearProblem Constructor to pass in a basic Epetra_Operator.

Creates a Epetra_LinearProblem instance for the case where an operator is not necessarily a matrix.

Definition at line 81 of file Epetra_LinearProblem.cpp.

◆ Epetra_LinearProblem() [4/4]

Epetra_LinearProblem::Epetra_LinearProblem ( const Epetra_LinearProblem Problem)

Epetra_LinearProblem Copy Constructor.

Makes copy of an existing Epetra_LinearProblem instance.

Definition at line 98 of file Epetra_LinearProblem.cpp.

◆ ~Epetra_LinearProblem()

Epetra_LinearProblem::~Epetra_LinearProblem ( void  )
virtual

Epetra_LinearProblem Destructor.

Completely deletes a Epetra_LinearProblem object.

Definition at line 112 of file Epetra_LinearProblem.cpp.

Member Function Documentation

◆ CheckInput()

int Epetra_LinearProblem::CheckInput ( ) const

Check input parameters for existence and size consistency.

Returns 0 if all input parameters are valid. Returns +1 if operator is not a matrix. This is not necessarily an error, but no scaling can be done if the user passes in an Epetra_Operator that is not an Epetra_Matrix

Definition at line 147 of file Epetra_LinearProblem.cpp.

◆ AssertSymmetric()

void Epetra_LinearProblem::AssertSymmetric ( )
inline

Definition at line 110 of file Epetra_LinearProblem.h.

◆ SetPDL()

void Epetra_LinearProblem::SetPDL ( ProblemDifficultyLevel  PDL)
inline

Set problem difficulty level.

Sets Aztec options and parameters based on a definition of easy moderate or hard problem. Relieves the user from explicitly setting a large number of individual parameter values. This function can be used in conjunction with the SetOptions() and SetParams() functions.

Definition at line 119 of file Epetra_LinearProblem.h.

◆ SetOperator() [1/2]

void Epetra_LinearProblem::SetOperator ( Epetra_RowMatrix A)
inline

Set Operator A of linear problem AX = B using an Epetra_RowMatrix.

Sets a pointer to a Epetra_RowMatrix. No copy of the operator is made.

Definition at line 124 of file Epetra_LinearProblem.h.

◆ SetOperator() [2/2]

void Epetra_LinearProblem::SetOperator ( Epetra_Operator A)
inline

Set Operator A of linear problem AX = B using an Epetra_Operator.

Sets a pointer to a Epetra_Operator. No copy of the operator is made.

Definition at line 130 of file Epetra_LinearProblem.h.

◆ SetLHS()

void Epetra_LinearProblem::SetLHS ( Epetra_MultiVector X)
inline

Set left-hand-side X of linear problem AX = B.

Sets a pointer to a Epetra_MultiVector. No copy of the object is made.

Definition at line 136 of file Epetra_LinearProblem.h.

◆ SetRHS()

void Epetra_LinearProblem::SetRHS ( Epetra_MultiVector B)
inline

Set right-hand-side B of linear problem AX = B.

Sets a pointer to a Epetra_MultiVector. No copy of the object is made.

Definition at line 141 of file Epetra_LinearProblem.h.

◆ LeftScale()

int Epetra_LinearProblem::LeftScale ( const Epetra_Vector D)

Perform left scaling of a linear problem.

Applies the scaling vector D to the left side of the matrix A() and to the right hand side B(). Note that the operator must be an Epetra_RowMatrix, not just an Epetra_Operator (the base class of Epetra_RowMatrix).

Parameters
InD - Vector containing scaling values. D[i] will be applied to the ith row of A() and B().
Returns
Integer error code, set to 0 if successful. Return -1 if operator is not a matrix.

Definition at line 116 of file Epetra_LinearProblem.cpp.

◆ RightScale()

int Epetra_LinearProblem::RightScale ( const Epetra_Vector D)

Perform right scaling of a linear problem.

Applies the scaling vector D to the right side of the matrix A(). Apply the inverse of D to the initial guess. Note that the operator must be an Epetra_RowMatrix, not just an Epetra_Operator (the base class of Epetra_RowMatrix).

Parameters
InD - Vector containing scaling values. D[i] will be applied to the ith row of A(). 1/D[i] will be applied to the ith row of B().
Returns
Integer error code, set to 0 if successful. Return -1 if operator is not a matrix.

Definition at line 132 of file Epetra_LinearProblem.cpp.

◆ GetOperator()

Epetra_Operator * Epetra_LinearProblem::GetOperator ( ) const
inline

Get a pointer to the operator A.

Definition at line 173 of file Epetra_LinearProblem.h.

◆ GetMatrix()

Epetra_RowMatrix * Epetra_LinearProblem::GetMatrix ( ) const
inline

Get a pointer to the matrix A.

Definition at line 175 of file Epetra_LinearProblem.h.

◆ GetLHS()

Epetra_MultiVector * Epetra_LinearProblem::GetLHS ( ) const
inline

Get a pointer to the left-hand-side X.

Definition at line 177 of file Epetra_LinearProblem.h.

◆ GetRHS()

Epetra_MultiVector * Epetra_LinearProblem::GetRHS ( ) const
inline

Get a pointer to the right-hand-side B.

Definition at line 179 of file Epetra_LinearProblem.h.

◆ GetPDL()

ProblemDifficultyLevel Epetra_LinearProblem::GetPDL ( ) const
inline

Get problem difficulty level.

Definition at line 181 of file Epetra_LinearProblem.h.

◆ IsOperatorSymmetric()

bool Epetra_LinearProblem::IsOperatorSymmetric ( ) const
inline

Get operator symmetry bool.

Definition at line 183 of file Epetra_LinearProblem.h.

◆ operator=()

Epetra_LinearProblem & Epetra_LinearProblem::operator= ( const Epetra_LinearProblem Problem)
private

Member Data Documentation

◆ Operator_

Epetra_Operator* Epetra_LinearProblem::Operator_
private

Definition at line 188 of file Epetra_LinearProblem.h.

◆ A_

Epetra_RowMatrix* Epetra_LinearProblem::A_
private

Definition at line 189 of file Epetra_LinearProblem.h.

◆ X_

Epetra_MultiVector* Epetra_LinearProblem::X_
private

Definition at line 190 of file Epetra_LinearProblem.h.

◆ B_

Epetra_MultiVector* Epetra_LinearProblem::B_
private

Definition at line 191 of file Epetra_LinearProblem.h.

◆ OperatorSymmetric_

bool Epetra_LinearProblem::OperatorSymmetric_
private

Definition at line 193 of file Epetra_LinearProblem.h.

◆ PDL_

ProblemDifficultyLevel Epetra_LinearProblem::PDL_
private

Definition at line 194 of file Epetra_LinearProblem.h.

◆ LeftScaled_

bool Epetra_LinearProblem::LeftScaled_
private

Definition at line 195 of file Epetra_LinearProblem.h.

◆ RightScaled_

bool Epetra_LinearProblem::RightScaled_
private

Definition at line 196 of file Epetra_LinearProblem.h.

◆ LeftScaleVector_

Epetra_Vector* Epetra_LinearProblem::LeftScaleVector_
private

Definition at line 197 of file Epetra_LinearProblem.h.

◆ RightScaleVector_

Epetra_Vector* Epetra_LinearProblem::RightScaleVector_
private

Definition at line 198 of file Epetra_LinearProblem.h.


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