GEOSX
Public Member Functions | List of all members
geosx::SuiteSparse Class Reference

This class provides an interface for UMFPACK direct solver from SuiteSparse linear algebra package. More...

#include <SuiteSparse.hpp>

Public Member Functions

 SuiteSparse ()
 Constructor.
 
 SuiteSparse (LinearSolverParameters const &params)
 Constructor with parameters. More...
 
 ~SuiteSparse ()
 Destructor.
 
void create (LinearSolverParameters const &params)
 Creates the SuiteSparse data structure. More...
 
int setup ()
 Factorizes a linear system with SuiteSparse. More...
 
int solveWorkingRank (real64 *b, real64 *x, bool transpose=false)
 Solves a linear system with SuiteSparse (matrix has already been factorized) More...
 
void syncTimes ()
 Sycronizes times across ranks.
 
real64 condEst () const
 Estimates the condition number of the matrix. More...
 
real64 relativeTolerance () const
 Estimates the relative tolerance for the matrix. More...
 
void destroy ()
 Deallocates a SuiteSparse data structure.
 
void setWorkingRank (int const workingRank)
 Sets the working rank. More...
 
int workingRank () const
 Returns the working rank. More...
 
void setSubCommWorkingRank (int const subCommWorkingRank)
 Sets the working rank in the sub-communicator. More...
 
int subCommWorkingRank () const
 Returns the working rank in the sub-communicator. More...
 
void setComm (MPI_Comm const comm)
 Sets the communicator. More...
 
MPI_Comm getComm () const
 Returns the communicator. More...
 
void setSubComm (MPI_Comm const subComm)
 Sets the subcommunicator. More...
 
MPI_Comm getSubComm () const
 Returns the subcommunicator. More...
 
SSInt numRows () const
 Returns the number of rows. More...
 
SSInt numCols () const
 Returns the number of columns. More...
 
SSInt nonZeros () const
 Returns the number of non zeros. More...
 
void resize (SSInt const numRows, SSInt const numCols, SSInt const nonZeros)
 Allocate the internal data storage arrays. More...
 
arrayView1d< SSIntrowPtr ()
 Returns the array with the row pointers. More...
 
arrayView1d< SSIntcolIndices ()
 Returns the array with the column indices. More...
 
arrayView1d< real64values ()
 Returns the array with the matrix values. More...
 
real64 setupTime () const
 Provides the setup time. More...
 
real64 solveTime () const
 Provides the solve time. More...
 
real64 precisionTolerance () const
 Returns the precision tolarance used in SuiteSparse class. More...
 

Detailed Description

This class provides an interface for UMFPACK direct solver from SuiteSparse linear algebra package.

Definition at line 50 of file SuiteSparse.hpp.

Constructor & Destructor Documentation

◆ SuiteSparse()

geosx::SuiteSparse::SuiteSparse ( LinearSolverParameters const &  params)

Constructor with parameters.

Parameters
[in]paramsthe linear solver parameters

Member Function Documentation

◆ colIndices()

arrayView1d< SSInt > geosx::SuiteSparse::colIndices ( )

Returns the array with the column indices.

Returns
the array with the column indices

◆ condEst()

real64 geosx::SuiteSparse::condEst ( ) const

Estimates the condition number of the matrix.

Returns
the estimated condition number

◆ create()

void geosx::SuiteSparse::create ( LinearSolverParameters const &  params)

Creates the SuiteSparse data structure.

Parameters
[in]paramsthe linear solver parameters

◆ getComm()

MPI_Comm geosx::SuiteSparse::getComm ( ) const

Returns the communicator.

Returns
the communicator

◆ getSubComm()

MPI_Comm geosx::SuiteSparse::getSubComm ( ) const

Returns the subcommunicator.

Returns
the subcommunicator

◆ nonZeros()

SSInt geosx::SuiteSparse::nonZeros ( ) const

Returns the number of non zeros.

Returns
the number of non zeros

◆ numCols()

SSInt geosx::SuiteSparse::numCols ( ) const

Returns the number of columns.

Returns
the number of columns

◆ numRows()

SSInt geosx::SuiteSparse::numRows ( ) const

Returns the number of rows.

Returns
the number of rows

◆ precisionTolerance()

real64 geosx::SuiteSparse::precisionTolerance ( ) const

Returns the precision tolarance used in SuiteSparse class.

Returns
the precision tolerance used in SuiteSparse class

◆ relativeTolerance()

real64 geosx::SuiteSparse::relativeTolerance ( ) const

Estimates the relative tolerance for the matrix.

Returns
the relative tolerance (condEst * eps)

◆ resize()

void geosx::SuiteSparse::resize ( SSInt const  numRows,
SSInt const  numCols,
SSInt const  nonZeros 
)

Allocate the internal data storage arrays.

Parameters
[in]numRowsthe number of rows
[in]numColsthe number of columns
[in]nonZerosthe number of non zeros

◆ rowPtr()

arrayView1d< SSInt > geosx::SuiteSparse::rowPtr ( )

Returns the array with the row pointers.

Returns
the array with the row pointers

◆ setComm()

void geosx::SuiteSparse::setComm ( MPI_Comm const  comm)

Sets the communicator.

Parameters
[in]commthe MPI communicator

◆ setSubComm()

void geosx::SuiteSparse::setSubComm ( MPI_Comm const  subComm)

Sets the subcommunicator.

Parameters
[in]subCommthe MPI subcommunicator

◆ setSubCommWorkingRank()

void geosx::SuiteSparse::setSubCommWorkingRank ( int const  subCommWorkingRank)

Sets the working rank in the sub-communicator.

Parameters
[in]subCommWorkingRankthe working rank in the sub-communicator

◆ setup()

int geosx::SuiteSparse::setup ( )

Factorizes a linear system with SuiteSparse.

Returns
info error code

◆ setupTime()

real64 geosx::SuiteSparse::setupTime ( ) const

Provides the setup time.

Returns
the setup time

◆ setWorkingRank()

void geosx::SuiteSparse::setWorkingRank ( int const  workingRank)

Sets the working rank.

Parameters
[in]workingRankthe working rank

◆ solveTime()

real64 geosx::SuiteSparse::solveTime ( ) const

Provides the solve time.

Returns
the solve time

◆ solveWorkingRank()

int geosx::SuiteSparse::solveWorkingRank ( real64 b,
real64 x,
bool  transpose = false 
)

Solves a linear system with SuiteSparse (matrix has already been factorized)

Parameters
[in]bthe right-hand side
[out]xthe solution
[in]transposewhether to solve for the original or the transpose matrix
Returns
info error code

◆ subCommWorkingRank()

int geosx::SuiteSparse::subCommWorkingRank ( ) const

Returns the working rank in the sub-communicator.

Returns
the working rank in the sub-communicator

◆ values()

arrayView1d< real64 > geosx::SuiteSparse::values ( )

Returns the array with the matrix values.

Returns
the array with the matrix values

◆ workingRank()

int geosx::SuiteSparse::workingRank ( ) const

Returns the working rank.

Returns
the working rank

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