46#ifndef STOKHOS_DIAGPRECONDITIONER_HPP
47#define STOKHOS_DIAGPRECONDITIONER_HPP
49#include "Teuchos_RCP.hpp"
51#include "Teuchos_SerialDenseMatrix.hpp"
55 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,
70 ordinal_type m)
const {
71 ordinal_type n=Input.numRows();
72 for (ordinal_type i=0; i<n; i++){
73 Result(i,0)=Input(i,0)/
A(i,i);
79 const Teuchos::SerialDenseMatrix<ordinal_type, value_type>&
A;
DiagPreconditioner(const Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A_)
Constructor.
const Teuchos::SerialDenseMatrix< ordinal_type, value_type > & A
virtual ~DiagPreconditioner()
Destructor.
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.
Top-level namespace for Stokhos classes and functions.