Ifpack2 Templated Preconditioning Package  Version 1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Ifpack2_BorderedOperator_decl.hpp
1 /*@HEADER
2 // ***********************************************************************
3 //
4 // Ifpack2: Tempated Object-Oriented Algebraic Preconditioner Package
5 // Copyright (2009) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ***********************************************************************
40 //@HEADER
41 */
42 
43 //-----------------------------------------------------
44 // Ifpack2::BorderedOperator is a translation of the
45 // LOCA_BorderedSolver_EpetraHouseholder
46 // implementation written by Eric Phipps.
47 // DMD.
48 //------------------------------------------------------
49 
50 
51 #ifndef IFPACK2_BORDEREDOPERATOR_DECL_HPP
52 #define IFPACK2_BORDEREDOPERATOR_DECL_HPP
53 
54 #include "Ifpack2_ConfigDefs.hpp"
55 #include "Kokkos_DefaultNode.hpp"
56 
57 #include "Tpetra_Operator.hpp"
59 #include "Teuchos_ScalarTraits.hpp"
60 #include <iostream>
61 
62 namespace Ifpack2 {
64 
86 template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType >
87 class BorderedOperator : virtual public Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node > {
88 
89  public:
90 
92  virtual ~BorderedOperator(){}
93 
96 
99 
102 
103 
104  bool hasTransposeApply() const;
105 
106 
108  void apply(const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &X,
109  Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &Y,
111  Scalar alpha = Teuchos::ScalarTraits<Scalar>::one(),
112  Scalar beta = Teuchos::ScalarTraits<Scalar>::zero()) const;
113 
115 
117  BorderedOperator(const Teuchos::RCP< const Tpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A);
118 
119  private:
120 
123 
124 };//class BorderedOperator
125 
126 }//namespace Ifpack2
127 
128 #endif // IFPACK2_BORDEREDOPERATOR_DECL_HPP
void apply(const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, Tpetra::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
Applies the effect of the bordered operator.
Definition: Ifpack2_BorderedOperator_def.hpp:89
virtual const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > & getDomainMap() const
Returns the Map associated with the domain of this operator, which must be compatible with X...
Definition: Ifpack2_BorderedOperator_def.hpp:69
Ifpack2 bordered operator.
Definition: Ifpack2_BorderedOperator_decl.hpp:87
BorderedOperator(const Teuchos::RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &A)
constuctor with Tpetra::Operator input.
Definition: Ifpack2_BorderedOperator_def.hpp:56
virtual ~BorderedOperator()
Destructor.
Definition: Ifpack2_BorderedOperator_decl.hpp:92
virtual const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > & getRangeMap() const
Returns the Map associated with the range of this operator, which must be compatible with Y...
Definition: Ifpack2_BorderedOperator_def.hpp:76