Amesos Development
Public Member Functions
Amesos_Superludist Class Reference

Amesos_Superludist: An object-oriented wrapper for Superludist. More...

#include <Amesos_Superludist.h>

Inheritance diagram for Amesos_Superludist:
Inheritance graph
[legend]
Collaboration diagram for Amesos_Superludist:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int SetParameters (Teuchos::ParameterList &ParameterList)
 Updates internal variables.
int NumSymbolicFact () const
 Returns the number of symbolic factorizations performed by this object.
int NumNumericFact () const
 Returns the number of numeric factorizations performed by this object.
int NumSolve () const
 Returns the number of solves performed by this object.
void PrintTiming () const
 Print various timig.
void PrintStatus () const
 Print various information about the parameters used by Superludist.
void GetTiming (Teuchos::ParameterList &TimingParameterList) const
 Extracts timing information from the current solver and places it in the parameter list.
 Amesos_Superludist (const Epetra_LinearProblem &LinearProblem)
 Amesos_Superludist Constructor.
 ~Amesos_Superludist (void)
 Amesos_Superludist Destructor.
int SymbolicFactorization ()
 Performs SymbolicFactorization on the matrix A.
int NumericFactorization ()
 Performs NumericFactorization on the matrix A.
int Solve ()
 Solves A X = B (or AT x = B)
int SetUseTranspose (bool UseTranspose)
 Amesos_Superludist does not support transpose at this time.
const Epetra_LinearProblemGetProblem () const
 Returns the Epetra_LinearProblem.
bool MatrixShapeOK () const
 Returns true if SUPERLUDIST can handle this matrix shape.
bool UseTranspose () const
 Always returns false. Superludist doesn't support transpose solve.

Detailed Description

Amesos_Superludist: An object-oriented wrapper for Superludist.

Amesos_Superludist will solve a linear systems of equations: A X = B using Epetra objects and the Superludist solver library, where A is an Epetra_RowMatrix and X and B are Epetra_MultiVector objects.


Constructor & Destructor Documentation

Amesos_Superludist::Amesos_Superludist ( const Epetra_LinearProblem LinearProblem)
Amesos_Superludist::~Amesos_Superludist ( void  )

Member Function Documentation

const Epetra_LinearProblem* Amesos_Superludist::GetProblem ( ) const [inline, virtual]

Returns the Epetra_LinearProblem.

Warning! Do not call return->SetOperator(...) to attempt to change the Epetra_Operator object (even if the new matrix has the same structure). This new operator matrix will be ignored!

Implements Amesos_BaseSolver.

Referenced by MatrixShapeOK().

bool Amesos_Superludist::MatrixShapeOK ( ) const [virtual]

Returns true if SUPERLUDIST can handle this matrix shape.

Returns true if the matrix shape is one that SUPERLUDIST can handle. SUPERLUDIST only works with square matrices.

Implements Amesos_BaseSolver.

References GetProblem().

Referenced by NumericFactorization().

int Amesos_Superludist::NumericFactorization ( ) [virtual]

Performs NumericFactorization on the matrix A.

In addition to performing numeric factorization on the matrix A, the call to NumericFactorization() implies that no change will be made to the underlying matrix without a subsequent call to NumericFactorization().

<br >Preconditions:

  • GetProblem().GetOperator() != 0 (return -1)
  • MatrixShapeOk(GetProblem().GetOperator()) == true (return -6)
  • The non-zero structure of the matrix should not have changed since the last call to SymbolicFactorization(). (return -2 if the number of non-zeros changes) Other changes can have arbitrary consequences.
  • The distribution of the matrix should not have changed since the last call to SymbolicFactorization()
  • The matrix should be indexed from 0 to n-1, unless the parameter "Reindex" was set to "true" prior to the call to SymbolicFactorization(). (return -3 - if caught)
  • The paremeter "Reindex" should not be set to "true" except on CrsMatrices. (return -4)
  • The paremeter "Reindex" should not be set to "true" unless Amesos was built with EpetraExt, i.e. with --enable-epetraext on the configure line. (return -4)
  • Internal errors retur -5.

<br >Postconditions:

  • Numeric Factorization will be performed (or marked to be performed) allowing Solve() to be performed correctly despite a potential change in in the matrix values (though not in the non-zero structure).
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

References Amesos_Time::CreateTimer(), Epetra_LinearProblem::GetOperator(), MatrixShapeOK(), and Amesos_Status::NumNumericFact_.

Referenced by Solve().

int Amesos_Superludist::SetParameters ( Teuchos::ParameterList ParameterList) [virtual]

Updates internal variables.

<br >Preconditions:

  • None.

<br >Postconditions:

  • Internal variables controlling the factorization and solve will be updated and take effect on all subseuent calls to NumericFactorization() and Solve().
  • All parameters whose value are to differ from the default values must be included in ParameterList. Parameters not specified in ParameterList revert to their default values.
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

References Teuchos::ParameterList::get(), Teuchos::ParameterList::isParameter(), Teuchos::ParameterList::isSublist(), and Teuchos::ParameterList::sublist().

Referenced by Amesos_Superludist().

int Amesos_Superludist::SetUseTranspose ( bool  UseTranspose) [inline, virtual]

Amesos_Superludist does not support transpose at this time.

returns 0 if UseTranspose is set to false, else 1 (failure)

Implements Amesos_BaseSolver.

int Amesos_Superludist::Solve ( ) [virtual]

Solves A X = B (or AT x = B)

<br >Preconditions:

<br >Postconditions:

  • X will be set such that A X = B (or AT X = B), within the limits of the accuracy of the underlying solver.
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

References Amesos_Time::AddTime(), Amesos_Utils::ComputeTrueResidual(), Amesos_Status::ComputeTrueResidual_, Amesos_Utils::ComputeVectorNorms(), Amesos_Status::ComputeVectorNorms_, Epetra_DistObject::Export(), Epetra_LinearProblem::GetLHS(), Epetra_LinearProblem::GetRHS(), Insert, NumericFactorization(), Amesos_Status::NumSolve_, Epetra_MultiVector::NumVectors(), Teuchos::rcp(), Amesos_Time::ResetTimer(), Epetra_MultiVector::Update(), and UseTranspose().

int Amesos_Superludist::SymbolicFactorization ( ) [virtual]

Performs SymbolicFactorization on the matrix A.

In addition to performing symbolic factorization on the matrix A, the call to SymbolicFactorization() implies that no change will be made to the non-zero structure of the underlying matrix without a subsequent call to SymbolicFactorization().

<br >Preconditions:

<br >Postconditions:

Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends