Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | Related Functions
Amesos2::Superludist< Matrix, Vector > Class Template Reference

Amesos2 interface to the distributed memory version of SuperLU. More...

#include <Amesos2_Superludist_decl.hpp>

Inheritance diagram for Amesos2::Superludist< Matrix, Vector >:
Inheritance graph
[legend]
Collaboration diagram for Amesos2::Superludist< Matrix, Vector >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Superludist< Matrix,
Vector > 
type
typedef SolverCore
< Amesos2::Superludist, Matrix,
Vector > 
super_type
typedef Matrix matrix_type
typedef Vector vector_type
typedef super_type::scalar_type scalar_type
typedef
super_type::local_ordinal_type 
local_ordinal_type
typedef
super_type::global_ordinal_type 
global_ordinal_type
typedef
super_type::global_size_type 
global_size_type
typedef super_type::node_type node_type
typedef TypeMap
< Amesos2::Superludist,
scalar_type > 
type_map
typedef type_map::type slu_type
typedef type_map::magnitude_type magnitude_type
typedef FunctionMap
< Amesos2::Superludist,
slu_type > 
function_map
typedef Amesos2::Superludist
< Matrix, Vector > 
solver_type

Public Member Functions

bool matrixShapeOK ()
 Returns true if the solver can handle this matrix shape.
void setA (const Teuchos::RCP< const Matrix > a, EPhase keep_phase=CLEAN)
 Sets the matrix A of this solver.
void setA (const Matrix *a, EPhase keep_phase=CLEAN)
 Sets the matrix A of this solver.
void setX (const Teuchos::RCP< Vector > x)
 Sets the LHS vector X.
void setX (Vector *x)
 Sets the LHS vector X using a raw pointer.
const Teuchos::RCP< Vector > getX ()
 Returns the vector that is the LHS of the linear system.
Vector * getXRaw ()
 Returns a raw pointer to the LHS of the linear system.
void setB (const Teuchos::RCP< const Vector > b)
 Sets the RHS vector B.
void setB (const Vector *b)
 Sets the RHS vector B using a raw pointer.
const Teuchos::RCP< const Vector > getB ()
 Returns the vector that is the RHS of the linear system.
const Vector * getBRaw ()
 Returns a raw pointer to the RHS of the linear system.
std::string description () const
 Returns a short description of this Solver.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
void printTiming (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 Prints timing information about the current solver.
void getTiming (Teuchos::ParameterList &timingParameterList) const
 Extracts timing information from the current solver.
std::string name () const
 Return the name of this solver.
Constructor/Destructor methods
 Superludist (Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B)
 Initialize from Teuchos::RCP.
 ~Superludist ()
 Destructor.
Mathematical functions
super_typepreOrdering ()
 Pre-orders the matrix A for minimal fill-in.
super_typesymbolicFactorization ()
 Performs symbolic factorization on the matrix A.
super_typenumericFactorization ()
 Performs numeric factorization on the matrix A.
void solve ()
 Solves $ A X = B$ (or $ A^T X = B$ )
void solve (const Teuchos::Ptr< Vector > X, const Teuchos::Ptr< const Vector > B) const
 Solve $ A X = B$ using the given X and B vectors.
void solve (Vector *X, const Vector *B) const
 Solve $ A X = B$ using the given X and B vectors.
Parameter methods
super_typesetParameters (const Teuchos::RCP< Teuchos::ParameterList > &parameterList)
 Set/update internal variables and solver options.
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const
 Return a const parameter list of all of the valid parameters that this->setParameterList(...) will accept.
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &parameterList)
 Set or update internal variables and solver options.
Teuchos::RCP
< Teuchos::ParameterList > 
getNonconstParameterList ()
 This is a empty stub.
Teuchos::RCP
< Teuchos::ParameterList > 
unsetParameterList ()
 This is an empty stub.
Accessor methods
Teuchos::RCP< const
Teuchos::Comm< int > > 
getComm () const
 Returns a pointer to the Teuchos::Comm communicator with this operator.
StatusgetStatus () const
 Returns a reference to this solver's internal status object.

Static Public Attributes

static const char * name = "SuperLU_DIST"
 Name of this solver interface.

Protected Member Functions

void setNnzLU (size_t nnz)
 Set the number of non-zero values in the $L$ and $U$ factors.

Protected Attributes

Teuchos::RCP< const
MatrixAdapter< Matrix > > 
matrixA_
 The LHS operator.
bool matrix_loaded_
Teuchos::RCP< Vector > multiVecX_
 The LHS vector/multi-vector.
Teuchos::RCP< const Vector > multiVecB_
 The RHS vector/multi-vector.
global_size_type globalNumRows_
 Number of global rows in matrixA_.
global_size_type globalNumCols_
 Number of global columns in matrixA_.
global_size_type globalNumNonZeros_
 Number of global non-zero values in matrixA_.
Status status_
 Holds status information about a solver.
Control control_
 Parameters for solving.
Timers timers_
 Various timing statistics.
int rank_
 The MPI rank of this image.
bool root_
 If true, then this is the root processor.
int nprocs_
 Number of process images in the matrix communicator.

Private Member Functions

int preOrdering_impl ()
 Performs pre-ordering on the matrix to increase efficiency.
int symbolicFactorization_impl ()
 Perform symbolic factorization of the matrix using SuperLU_DIST.
int numericFactorization_impl ()
 SuperLU_DIST specific numeric factorization.
int solve_impl (const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
 SuperLU_DIST specific solve.
bool matrixShapeOK_impl () const
 Determines whether the shape of the matrix is OK for this solver.
void setParameters_impl (const Teuchos::RCP< Teuchos::ParameterList > &parameterList)
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters_impl () const
void get_default_grid_size (int nprocs, SLUD::int_t &nprow, SLUD::int_t &npcol) const
bool loadA_impl (EPhase current_phase)
 Reads matrix data into internal solver structures.

Private Attributes

struct
Amesos2::Superludist::SLUData 
data_
Teuchos::Array< slu_type > nzvals_
 Stores the values of the nonzero entries for SuperLU_DIST.
Teuchos::Array< int > colind_
 Stores the row indices of the nonzero entries.
Teuchos::Array< int > rowptr_
 Stores the location in Ai_ and Aval_ that starts row j.
Teuchos::Array< slu_type > bvals_
 1D store for B values
Teuchos::Array< slu_type > xvals_
 1D store for X values
bool in_grid_
 true if this processor is in SuperLU_DISTS's 2D process grid
bool same_symbolic_
bool same_solve_struct_
Teuchos::RCP< const
Tpetra::Map
< local_ordinal_type,
global_ordinal_type, node_type > > 
superlu_rowmap_
 Maps rows of the matrix to processors in the SuperLU_DIST processor grid.

Friends

class SolverCore< Amesos2::Superludist, Matrix, Vector >

Related Functions

(Note that these are not member functions.)

template<class Matrix , class Vector >
Solver< Matrix, Vector > * create (const Matrix *A, Vector *X, const Vector *B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix,
Vector > > 
create (Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create (const char *solverName, const Matrix *A, Vector *X, const Vector *B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix,
Vector > > 
create (const char *solverName, const Teuchos::RCP< const Matrix > A, const Teuchos::RCP< Vector > X, const Teuchos::RCP< const Vector > B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create (const std::string solverName, const Matrix *A, Vector *X, const Vector *B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix,
Vector > > 
create (const std::string solverName, const Teuchos::RCP< const Matrix > A, const Teuchos::RCP< Vector > X, const Teuchos::RCP< const Vector > B)
 Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create (const std::string solverName, const Matrix *A)
 Creates an Amesos2 Solver interface with Matrix A.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix,
Vector > > 
create (const std::string solverName, const Teuchos::RCP< const Matrix > A)
 Creates an Amesos2 Solver interface with Matrix A.
bool query (const char *solverName)
 Queries the Factory for support of the named third-party library.
bool query (const std::string solverName)
 Queries the Factory for support of the named third-party library.

Detailed Description

template<class Matrix, class Vector>
class Amesos2::Superludist< Matrix, Vector >

Amesos2 interface to the distributed memory version of SuperLU.

The distributed memory version of SuperLU, SuperLU_DIST, is supported by this Amesos2 interface. Currently support is for the SuperLU_DIST 2.5 version.

This interface to SuperLU_DIST currently does not support row permutations due to a sequential bottleneck present in SuperLU_DIST when calculating such a row permutation (i.e. the matrix must be brought to the root processor, which then finds the row permutation and broadcasts this permutation to the other processors). In the future we may support row permutations through Zoltan. By not supporting this option, we make use of the entirely distributed interface to SuperLU_DIST. On the other hand, if you absolutely need row permutations and your matrix will fit on a single node, then you may consider using Amesos2's SuperLU_MT interface instead.

SuperLU_DIST does not provide a means to directly get the number of non-zeros in the L and U factors.

Warning:
After creation, the size of the matrix should not change (i.e. when using setA())

Constructor & Destructor Documentation

template<class Matrix , class Vector >
Amesos2::Superludist< Matrix, Vector >::Superludist ( Teuchos::RCP< const Matrix >  A,
Teuchos::RCP< Vector >  X,
Teuchos::RCP< const Vector >  B 
)

Member Function Documentation

template<class Matrix , class Vector >
int Amesos2::Superludist< Matrix, Vector >::preOrdering_impl ( ) [private]

Performs pre-ordering on the matrix to increase efficiency.

SuperLU_DIST supports several forms of column permutations. Refer to slu_mt_options for the available ColPerm options.

template<class Matrix , class Vector >
int Amesos2::Superludist< Matrix, Vector >::symbolicFactorization_impl ( ) [private]

Perform symbolic factorization of the matrix using SuperLU_DIST.

Called second in the sequence before numericFactorization.

Exceptions:
std::runtime_errorSuperLU_DIST is not able to factor the matrix.
template<class Matrix , class Vector >
int Amesos2::Superludist< Matrix, Vector >::numericFactorization_impl ( ) [private]

SuperLU_DIST specific numeric factorization.

SuperLU_DIST factors the matrix in a shared memory environment using nprocs threads, where nprocs defaults to 1 if it is not changed through setParameters().

Exceptions:
std::runtime_errorSuperLU_DIST is not able to factor the matrix
template<class Matrix , class Vector >
int Amesos2::Superludist< Matrix, Vector >::solve_impl ( const Teuchos::Ptr< MultiVecAdapter< Vector > >  X,
const Teuchos::Ptr< const MultiVecAdapter< Vector > >  B 
) const [private]

SuperLU_DIST specific solve.

Uses the symbolic and numeric factorizations, along with the RHS vector B to solve the sparse system of equations. The solution is placed in X.

Exceptions:
std::runtime_errorSuperLU_DIST is not able to solve the system.
template<class Matrix , class Vector >
bool Amesos2::Superludist< Matrix, Vector >::matrixShapeOK_impl ( ) const [private]

Determines whether the shape of the matrix is OK for this solver.

SuperLU_DIST supports square matrices.

template<class Matrix , class Vector >
void Amesos2::Superludist< Matrix, Vector >::setParameters_impl ( const Teuchos::RCP< Teuchos::ParameterList > &  parameterList) [private]

Currently, the following SuperLU_DIST parameters/options are recognized:

  • "npcol"(int) and "nprow"(int) : Specified together, these parameters set the size of the SuperLU_DIST processor grid to nprow rows by npcol columns. If these parameters are not set, the SuperLU_DIST interface uses a heuristic to pick the grid dimensions based on the number of processors in the matrix' communicator.
  • "ColPerm" which takes one of the following:
    • "NATURAL" : natural column ordering.
    • "PARMETIS" : use the ParMETIS TPL to order the columns. (default)
  • "ReplaceTinyPivot" : { true | false }. Specifies whether to replace tiny diagonals with $\sqrt{\epsilon}\cdot\| A \|$ during LU factorization. (default: true)
template<class Matrix , class Vector >
Teuchos::RCP< const Teuchos::ParameterList > Amesos2::Superludist< Matrix, Vector >::getValidParameters_impl ( ) const [private]

Hooked in by Amesos2::Solver parent class.

Returns:
a const Teuchos::ParameterList of all valid parameters for this solver.
template<class Matrix , class Vector >
void Amesos2::Superludist< Matrix, Vector >::get_default_grid_size ( int  nprocs,
SLUD::int_t &  nprow,
SLUD::int_t &  npcol 
) const [private]

Calculates a SuperLU_DIST grid size of nprow by npcol processes which will try to utilize all nprocs available processes, but in case of failure, will return a square grid that may not use all nprocs processes.

If you're ever not pleased with how the algorithm's heuristics treat prime numbers, don't give a prime for nprocs.

Note:
the nprocs , nprow and npcol parameters may be set together directly with setParameters()

Referenced by Amesos2::Superludist< Matrix, Vector >::Superludist().

template<class Matrix , class Vector >
bool Amesos2::Superludist< Matrix, Vector >::loadA_impl ( EPhase  current_phase) [private]

Reads matrix data into internal solver structures.

Loads data from the matrix A into the internal SuperLU_DIST matrix structure. This function requires communication accross all processors as the matrix is redistributed as necessary to the processors in the SuperLU_DIST process grid.

Postcondition:
  • nzvals_, colind_, and rowptr_ arrays are sized to match the portion of the matrix on this processor.
Returns:
true if the matrix was loaded, false if not
super_type& Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::preOrdering ( void  ) [virtual, inherited]

Pre-orders the matrix A for minimal fill-in.

Rearranges the rows and columns of the matrix A to minimize the amount of fill-in of the non-zero entries of the matrix. Pre-ordering may or may not be supported by the underlying solver. If not supported, a call to this method simply does nothing.

Returns:
a reference to this .
See also:
symbolicFactorization(), numericFactorization(), and solve()

Implements Amesos2::Solver< Matrix, Vector >.

super_type& Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::symbolicFactorization ( void  ) [virtual, inherited]

Performs symbolic factorization 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().

Precondition:
Postcondition:
  • Symbolic factorization will be performed (or marked to be performed) allowing numericFactorization() and solve() to be called.
Returns:
a reference to this .
See also:
preOrdering(), numericFactorization(), and solve()

Implements Amesos2::Solver< Matrix, Vector >.

super_type& Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::numericFactorization ( void  ) [virtual, inherited]

Performs numeric factorization 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 values without a subsequent call to numericFactorization().

Precondition:
  • The non-zero structure of the matrix should not have changed since the last call to symbolicFactorization(). Other changes can have arbitrary consequences.
  • The distribution of the matrix should not have changed since the last call to symbolicFactorization().
Postcondition:
Numeric factorization will be performed (or marked to be performed) allowing solve() to be performed correctly despite a potential change in the matrix values (though not in the non-zero structure).
Returns:
a reference to this
See also:
preOrdering(), symbolicFactorization(), and solve()

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::solve ( void  ) [virtual, inherited]

Solves $ A X = B$ (or $ A^T X = B$ )

Precondition:
  • The non-zero structure of the matrix should not have changed since the last call to symbolicFactorization().
  • The distribution of the matrix should not have changed since the last call to symbolicFactorization().
  • The matrix should not have changed since the last call to numericFactorization().
Postcondition:
X will be set such that $ A X = B$ (or $ A^T X = B$ ), within the limits of the accuracy of the underlying solver.
Returns:
void
See also:
preOrdering(), symbolicFactorization(), and numericFactorization()

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::solve ( const Teuchos::Ptr< Vector >  X,
const Teuchos::Ptr< const Vector >  B 
) const [virtual, inherited]

Solve $ A X = B$ using the given X and B vectors.

This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.

If a permanent change of X and B are required, see the setX() and setB() methods.

Postcondition:
  • The (multi)vector X contains the solution to the system
  • The X and B given at construction time (if any) are unchanged.

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::solve ( Vector *  X,
const Vector *  B 
) const [virtual, inherited]

Solve $ A X = B$ using the given X and B vectors.

This overload of solve uses the given X and B vectors when solving. This X and B are used in place of any X and B that were given upon construction of the Amesos2 solver instance and are used only for this solve.

If a permanent change of X and B are required, see the setX() and setB() methods.

Postcondition:
  • The (multi)vector X contains the solution to the system
  • The X and B given at construction time (if any) are unchanged.

Implements Amesos2::Solver< Matrix, Vector >.

bool Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::matrixShapeOK ( void  ) [virtual, inherited]

Returns true if the solver can handle this matrix shape.

Returns true if the matrix shape is one that the underlying concrete sparse direct solver can handle. Classes that work only on square matrices should return false for rectangular matrices. Classes that work only on symmetric matrices would return false for non-symmetric matrices. etc.

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::setA ( const Teuchos::RCP< const Matrix >  a,
EPhase  keep_phase = CLEAN 
) [virtual, inherited]

Sets the matrix A of this solver.

Parameters:
[in]aAn RCP to a matrix will will be used for future computation steps
[in]keep_phaseThis parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter.

The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::setA ( const Matrix *  a,
EPhase  keep_phase = CLEAN 
) [inline, virtual, inherited]

Sets the matrix A of this solver.

Parameters:
[in]aAn raw C pointer to a matrix will will be used for future computation steps.
[in]keep_phaseThis parameter tells the solver what state it should keep. For example, you may want to replace the matrix but keep the symbolic factorization because you know the structure of the new matrix is the same as the structure of the old matrix. In this case you would pass Amesos2::SYMBFACT as this parameter.

The default value for the second parameter is Amesos2::CLEAN, which means that the internal state of the solver will be completely reset. It will be as if no previous computational steps were performed.

Implements Amesos2::Solver< Matrix, Vector >.

super_type& Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::setParameters ( const Teuchos::RCP< Teuchos::ParameterList > &  parameterList) [virtual, inherited]

Set/update internal variables and solver options.

The setParameters method is consistent over all concrete solvers. It accepts general status and control parameters, as well as parameters specific to a given solver. If the solver does not recognize the parameter, then it will simply be ignored

Postcondition:
  • Internal variables controlling the factorization and solve will be updated and take effect on all subsequent calls to numericFactorization() and solve().
  • All parameters whose value is to differ from the default values must be included in parameterList. Parameters not specified in parameterList revert to their default values.
Returns:
a reference to this

Implements Amesos2::Solver< Matrix, Vector >.

Referenced by Amesos2::Superludist< Matrix, Vector >::Superludist().

Teuchos::RCP<const Teuchos::ParameterList> Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::getValidParameters ( void  ) const [virtual, inherited]

Return a const parameter list of all of the valid parameters that this->setParameterList(...) will accept.

Note:
Check the documentation for your concrete solver to see a complete list of the values that each parameter may take. A solver may also recognize multiple data types as arguments for a particular parameters (eg. recognizing "YES" and "NO" as well as true and false ).

Implements Amesos2::Solver< Matrix, Vector >.

Referenced by Amesos2::Superludist< Matrix, Vector >::Superludist().

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::setParameterList ( const Teuchos::RCP< Teuchos::ParameterList > &  parameterList) [inline, inherited]

Set or update internal variables and solver options.

Redefined from Teuchos::ParameterListAcceptor

Note:
Alias for setParameters()
Parameters:
[in]parameterList
Teuchos::RCP<Teuchos::ParameterList> Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::getNonconstParameterList ( ) [inline, inherited]

This is a empty stub.

Returns:
Teuchos::RCP<Teuchos::ParameterList> Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::unsetParameterList ( ) [inline, inherited]

This is an empty stub.

Returns:
void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual, inherited]

Prints the status information about the current solver with some level of verbosity

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::printTiming ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel 
) const [virtual, inherited]

Prints timing information about the current solver.

The Amesos2::SolverCore base class takes care of tracking total time spent in the Amesos2 interface. Concrete solver interface class are responsible for reporting other timing statistics, which include time spent in:

  • Redistribution of matrix objects,
  • Conversion of matrix objects to solver-specific formats,
  • Redistribution of multi-vector objects,
  • Conversion of multi-vector objects to solver formats,
  • TPL symbolic factorizations,
  • TPL numeric factorizations, and
  • TPL solves

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::getTiming ( Teuchos::ParameterList &  timingParameterList) const [virtual, inherited]

Extracts timing information from the current solver.

Results are placed into the parameter list timingParameterList.

Parameters:
[out]timingParameterListAccepts timing information from the current solver

Implements Amesos2::Solver< Matrix, Vector >.

std::string Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::name ( void  ) const [virtual, inherited]

Return the name of this solver.

The name is given by the underlying concrete solver instance

Returns:
A std::string which is the name of this solver

Implements Amesos2::Solver< Matrix, Vector >.

void Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::setNnzLU ( size_t  nnz) [inline, protected, inherited]

Set the number of non-zero values in the $L$ and $U$ factors.

Concrete solver classes may call this method if they wish to (or are able to) report the number of conbined non-zero count for the $L$ and $U$ factors.


Friends And Related Function Documentation

template<class Matrix , class Vector >
Solver< Matrix, Vector > * create ( const Matrix *  A,
Vector *  X,
const Vector *  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

This is the default option which interfaces with the native KLU2 solver.

Parameters:
[in]Apointer to a matrix of coefficients
[in]Xpointer to LHS solution vector
[in]Bpointer to RHS vector
Returns:
A C pointer to a KLU2 solver interface.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix, Vector > > create ( Teuchos::RCP< const Matrix >  A,
Teuchos::RCP< Vector >  X,
Teuchos::RCP< const Vector >  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

This is the default option which interfaces with the native KLU2 solver.

Parameters:
[in]ATeuchos::RCP to the coefficient matrix
[in]XTeuchos::RCP to LHS solution vector
[in]BTeuchos::RCP to RHS vector
Returns:
A Teuchos::RCP to a KLU2 solver interface.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create ( const char *  solverName,
const Matrix *  A,
Vector *  X,
const Vector *  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

Parameters:
[in]solverNameA C character string with the name of the underlying third-party solver desired.
[in]Apointer to a matrix of coefficients
[in]Xpointer to LHS solution vector
[in]Bpointer to RHS vector
Returns:
A C pointer to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix, Vector > > create ( const char *  solverName,
const Teuchos::RCP< const Matrix >  A,
const Teuchos::RCP< Vector >  X,
const Teuchos::RCP< const Vector >  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

Parameters:
[in]solverNameThe name of the desired third-party solver
[in]ATeuchos::RCP to the coefficient matrix
[in]XTeuchos::RCP to LHS solution vector
[in]BTeuchos::RCP to RHS vector
Returns:
A Teuchos::RCP to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create ( const std::string  solverName,
const Matrix *  A,
Vector *  X,
const Vector *  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

Parameters:
[in]solverNameThe name of the desired third-party solver
[in]AC pointer to the coefficient matrix
[in]XC pointer to LHS solution vector
[in]BC pointer to RHS vector
Returns:
A C pointer to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix, Vector > > create ( const std::string  solverName,
const Teuchos::RCP< const Matrix >  A,
const Teuchos::RCP< Vector >  X,
const Teuchos::RCP< const Vector >  B 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A, LHS vector X, and RHS vector B.

Parameters:
[in]solverNameThe name of the desired third-party solver
[in]ATeuchos::RCP to the coefficient matrix
[in]XTeuchos::RCP to LHS solution vector
[in]BTeuchos::RCP to RHS vector
Returns:
A Teuchos::RCP to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
Solver< Matrix, Vector > * create ( const std::string  solverName,
const Matrix *  A 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A.

Suitable for cases where numeric factorization must be performed before the X and B vectors are known. Before a solve, the setX() and setB() functions should be used to set X and B, or the overloaded solve(X,B) method should be used.

Parameters:
[in]solverNameThe name of the desired third-party solver
[in]AC pointer to the coefficient matrix
Returns:
A C pointer to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
Teuchos::RCP< Solver< Matrix, Vector > > create ( const std::string  solverName,
const Teuchos::RCP< const Matrix >  A 
) [related, inherited]

Creates an Amesos2 Solver interface with Matrix A.

Suitable for cases where numeric factorization must be performed before the X and B vectors are known. Before a solve, the setX() and setB() functions should be used to set X and B, or the overloaded solve(X,B) method should be used.

Parameters:
[in]solverNameThe name of the desired third-party solver
[in]ATeuchos::RCP to the coefficient matrix
Returns:
A Teuchos::RCP to an Amesos2 solver interface.
Exceptions:
std::invalid_argumentThe third-party solver named by solverName is not supported.
template<class Matrix , class Vector >
bool query ( const char *  solverName) [related, inherited]

Queries the Factory for support of the named third-party library.

Returns:
true if the solver is supported.
template<class Matrix , class Vector >
bool query ( const std::string  solverName) [related, inherited]

Queries the Factory for support of the named third-party library.

Returns:
true if the solver is supported.

Member Data Documentation

bool Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::matrix_loaded_ [protected, inherited]

If true indicates that the current matrix A has been loaded into internal solver structures.

Teuchos::RCP<const Vector> Amesos2::SolverCore< Amesos2::Superludist , Matrix, Vector >::multiVecB_ [protected, inherited]

The RHS vector/multi-vector.

We point to a const Vector because Amesos2 should never directly modify B.


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