/usr/include/trilinos/Tpetra_Operator.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | // @HEADER
// ***********************************************************************
//
// Tpetra: Templated Linear Algebra Services Package
// Copyright (2008) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
//
// ***********************************************************************
// @HEADER
#ifndef TPETRA_OPERATOR_HPP
#define TPETRA_OPERATOR_HPP
#include <Kokkos_DefaultNode.hpp>
#include <Teuchos_Describable.hpp>
#include <Teuchos_RCP.hpp>
#include "Tpetra_Map.hpp"
#include "Tpetra_MultiVector.hpp"
namespace Tpetra {
//! \brief Abstract interface for linear operators accepting Tpetra MultiVector objects.
/*! This class is templated on \c Scalar, \c LocalOrdinal, \c GlobalOrdinal and \c Node.
The \c LocalOrdinal type, if omitted, defaults to \c int. The \c GlobalOrdinal
type, if omitted, defaults to the \c LocalOrdinal type Node is by defult of type Kokkos::DefaultNode::DefaultNodeType.
A Operator object applies a linear operator to a MultiVector, storing the result in another MultiVector. The scalar type \c Scalar
of the Operator specifies the scalar field of the input and output MultiVector objects, not that of the underlying linear operator. Operator is an
abstract base class, and interfaces exist for this interface from numerous other classes, including sparse matrices, direct solvers, iterative solvers,
and preconditioners.
*/
template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Operator : virtual public Teuchos::Describable {
public:
/** \name Pure virtual functions to be overridden by subclasses. */
//@{
//! Returns the Map associated with the domain of this operator, which must be compatible with X.getMap().
virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getDomainMap() const = 0;
//! Returns the Map associated with the range of this operator, which must be compatible with Y.getMap().
virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRangeMap() const = 0;
//! \brief Computes the operator-multivector application.
/*! Loosely, performs \f$Y = \alpha \cdot A^{\textrm{mode}} \cdot X + \beta \cdot Y\f$. However, the details of operation
vary according to the values of \c alpha and \c beta. Specifically
- if <tt>beta == 0</tt>, apply() <b>must</b> overwrite \c Y, so that any values in \c Y (including NaNs) are ignored.
- if <tt>alpha == 0</tt>, apply() <b>may</b> short-circuit the operator, so that any values in \c X (including NaNs) are ignored.
*/
virtual void apply(const MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
Teuchos::ETransp mode = Teuchos::NO_TRANS,
Scalar alpha = Teuchos::ScalarTraits<Scalar>::one(),
Scalar beta = Teuchos::ScalarTraits<Scalar>::zero()) const = 0;
//! Indicates whether this operator supports applying the adjoint operator.
virtual bool hasTransposeApply() const;
//@}
};
template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
bool Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node>::hasTransposeApply() const {
return false;
}
} // Tpetra namespace
#endif // TPETRA_OPERATOR_HPP
|