45 #ifndef STOKHOS_GSPRECONDITIONER_HPP 46 #define STOKHOS_GSPRECONDITIONER_HPP 48 #include "Teuchos_RCP.hpp" 50 #include "Teuchos_SerialDenseMatrix.hpp" 51 #include "Teuchos_LAPACK.hpp" 55 template <
typename ordinal_type,
typename value_type>
62 const Teuchos::SerialDenseMatrix<ordinal_type,value_type> & A_,
71 const Teuchos::SerialDenseMatrix<ordinal_type, value_type>& Input,
72 Teuchos::SerialDenseMatrix<ordinal_type, value_type>& Result,
80 Teuchos::SerialDenseMatrix<ordinal_type, value_type> L(
A);
90 Teuchos::SerialDenseMatrix<ordinal_type, value_type> D(n,n);
98 Teuchos::SerialDenseMatrix<ordinal_type, value_type> U(
A);
106 Result.assign(Input);
109 Teuchos::SerialDenseMatrix<ordinal_type, value_type> M(n,n);
110 M.multiply(Teuchos::NO_TRANS,Teuchos::NO_TRANS,1.0, L, D, 0.0);
113 lapack.TRTRS(
'L',
'N',
'N', M.numRows(), 1, M.values(), M.stride(), Result.values(), Result.stride(),&info);
116 lapack.TRTRS(
'U',
'N',
'N', U.numRows(), 1, U.values(), U.stride(), Result.values(), Result.stride(),&info);
120 lapack.TRTRS(
'L',
'N',
'N', L.numRows(), 1, L.values(), L.stride(), Result.values(), Result.stride(),&info);
127 const Teuchos::SerialDenseMatrix<ordinal_type,value_type> &
A;
134 #endif // STOKHOS_GSPRECONDITIONER_HPP virtual ~GSPreconditioner()
Destructor.
GSPreconditioner(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A_, const ordinal_type sym_)
Constructor.
Top-level namespace for Stokhos classes and functions.
virtual ordinal_type ApplyInverse(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Input, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Result, ordinal_type m) const
Returns the result of a Operator inverse applied to a Teuchos::SerialDenseMatrix Input in Result...
const Teuchos::SerialDenseMatrix< ordinal_type, value_type > & A