45 #ifndef STOKHOS_JACOBIPRECONDITIONER_HPP
46 #define STOKHOS_JACOBIPRECONDITIONER_HPP
48 #include "Teuchos_RCP.hpp"
50 #include "Teuchos_SerialDenseMatrix.hpp"
54 template <
typename ordinal_type,
typename value_type>
62 const Teuchos::SerialDenseMatrix<ordinal_type, value_type>& A_) :
A(A_) {}
68 const Teuchos::SerialDenseMatrix<ordinal_type, value_type>& Input,
69 Teuchos::SerialDenseMatrix<ordinal_type, value_type>& Result,
72 Teuchos::SerialDenseMatrix<ordinal_type, value_type> G(Teuchos::Copy,
A);
73 Teuchos::SerialDenseMatrix<ordinal_type, value_type> z(n,1);
77 z(i,0)=Input(i,0)/
A(i,i);
86 G(i,
j)=-
A(i,
j)/
A(i,i);
92 Result.multiply(Teuchos::NO_TRANS,Teuchos::NO_TRANS,1.0, G, z, 1.0);
101 const Teuchos::SerialDenseMatrix<ordinal_type, value_type>&
A;
106 #endif // STOKHOS_JACOBIPRECONDITIONER_HPP