ROL
Functions
LinearAlgebra.hpp File Reference
#include "Teuchos_LAPACK.hpp"
#include "ROL_StdVector.hpp"

Go to the source code of this file.

Functions

template<class Real >
void trisolve (ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const std::vector< Real > &a, const std::vector< Real > &b, const std::vector< Real > &c, const std::vector< Real > &r, std::vector< Real > &x)
 Solve a tridiagonal system. More...
 
template<class Real >
void lusolve (ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const std::vector< Real > &A, const std::vector< Real > &B, std::vector< Real > &X)
 
template<class Real >
void cholsolve (ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const std::vector< Real > &A, const std::vector< Real > &B, std::vector< Real > &X)
 

Function Documentation

template<class Real >
void trisolve ( ROL::Ptr< Teuchos::LAPACK< int, Real > >  lapack,
const std::vector< Real > &  a,
const std::vector< Real > &  b,
const std::vector< Real > &  c,
const std::vector< Real > &  r,
std::vector< Real > &  x 
)

Solve a tridiagonal system.

Parameters
[in]lapackpointer to LAPACK interface
[in]asubdiagonal band ( length N-1 )
[in]bdiagonal band ( length N )
[in]csuperidiagonal band ( length N-1 )
[in]rright-hand-side ( length N )
[out]xsolution vector ( length N )

Definition at line 24 of file LinearAlgebra.hpp.

Referenced by rec_lobatto().

template<class Real >
void lusolve ( ROL::Ptr< Teuchos::LAPACK< int, Real > >  lapack,
const std::vector< Real > &  A,
const std::vector< Real > &  B,
std::vector< Real > &  X 
)

Solve a general system AX=B, with optional multiple (M) right-hand-sides using the LU factorization

Parameters
[in]lapackpointer to LAPACK interface
[in]Avector of column-stacked LHS matrix elements ( length N*N )
[in]Bvector of column-stacked RHS matrix elements ( length N*M )
[in]Xvector of column-stacked solution matrix elements ( length N*M )

Definition at line 59 of file LinearAlgebra.hpp.

template<class Real >
void cholsolve ( ROL::Ptr< Teuchos::LAPACK< int, Real > >  lapack,
const std::vector< Real > &  A,
const std::vector< Real > &  B,
std::vector< Real > &  X 
)

Solve a general system AX=B, with optional multiple (M) right-hand-sides using the Cholesky factorization

Parameters
[in]lapackpointer to LAPACK interface
[in]Avector of column-stacked LHS matrix elements ( length N*N )
[in]Bvector of column-stacked RHS matrix elements ( length N*M )
[in]Xvector of column-stacked solution matrix elements ( length N*M )

Definition at line 90 of file LinearAlgebra.hpp.