| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// Trilinos: An Object-Oriented Solver Framework |
| 4 |
// |
| 5 |
// Copyright 2001-2024 NTESS and the Trilinos contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
#ifndef SG_PRECONDITIONER_HPP |
| 11 |
#define SG_PRECONDITIONER_HPP |
| 12 |
|
| 13 |
#include "Teuchos_RCP.hpp" |
| 14 |
#include "Tpetra_Operator.hpp" |
| 15 |
#include "Tpetra_CrsMatrix.hpp" |
| 16 |
|
| 17 |
namespace Kokkos { |
| 18 |
namespace Example { |
| 19 |
|
| 20 |
/*! |
| 21 |
* \brief An abstract class to represent a generic stochastic Galerkin |
| 22 |
* preconditioner |
| 23 |
*/ |
| 24 |
template<class S, class LO, class GO, class N> |
| 25 |
class SGPreconditioner { |
| 26 |
public: |
| 27 |
|
| 28 |
//! Constructor |
| 29 |
SGPreconditioner() {} |
| 30 |
|
| 31 |
//! Destructor |
| 32 |
virtual ~SGPreconditioner() {} |
| 33 |
|
| 34 |
//! Setup preconditioner |
| 35 |
virtual |
| 36 |
Teuchos::RCP<Tpetra::Operator<S,LO,GO,N> > |
| 37 |
setupPreconditioner( |
| 38 |
const Teuchos::RCP<Tpetra::CrsMatrix<S,LO,GO,N> >& A, |
| 39 |
const Teuchos::RCP<Teuchos::ParameterList>& precParams, |
| 40 |
const Teuchos::RCP<Tpetra::MultiVector<double,LO,GO,N> >& coords) = 0; |
| 41 |
|
| 42 |
private: |
| 43 |
|
| 44 |
// Prohibit copying |
| 45 |
SGPreconditioner(const SGPreconditioner&); |
| 46 |
|
| 47 |
// Prohibit Assignment |
| 48 |
SGPreconditioner& operator=(const SGPreconditioner& b); |
| 49 |
}; // class SGPreconditioner |
| 50 |
|
| 51 |
} |
| 52 |
} |
| 53 |
#endif // SG_PRECONDITIONER_HPP |