BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
real_wrapper_of_complex_thyra_preconditioner.hpp
1 // Copyright (C) 2011-2012 by the BEM++ Authors
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 // THE SOFTWARE.
20 
21 #include "bempp/common/config_trilinos.hpp"
22 
23 #ifndef bempp_real_wrapper_of_complex_thyra_preconditioner_hpp
24 #define bempp_real_wrapper_of_complex_thyra_preconditioner_hpp
25 
26 #include "../common/common.hpp"
27 
28 #ifdef WITH_TRILINOS
29 #include <Thyra_PreconditionerBase.hpp>
30 
31 namespace Bempp
32 {
33 
34 template <typename ValueType>
36  : public Thyra::PreconditionerBase<ValueType>
37 {
38 public:
39  typedef std::complex<ValueType> ComplexValueType;
40  typedef Thyra::PreconditionerBase<std::complex<ValueType> > ComplexPreconditioner;
41 
43  const Teuchos::RCP<const ComplexPreconditioner>& complexPreconditioner);
44 
48  virtual bool isLeftPrecOpConst() const;
49 
57  virtual Teuchos::RCP<Thyra::LinearOpBase<ValueType> > getNonconstLeftPrecOp();
58 
62  virtual Teuchos::RCP<const Thyra::LinearOpBase<ValueType> > getLeftPrecOp() const;
63 
67  virtual bool isRightPrecOpConst() const;
68 
76  virtual Teuchos::RCP<Thyra::LinearOpBase<ValueType> > getNonconstRightPrecOp();
77 
81  virtual Teuchos::RCP<const Thyra::LinearOpBase<ValueType> > getRightPrecOp() const;
82 
86  virtual bool isUnspecifiedPrecOpConst() const;
87 
91  virtual Teuchos::RCP<Thyra::LinearOpBase<ValueType> > getNonconstUnspecifiedPrecOp();
92 
100  virtual Teuchos::RCP<const Thyra::LinearOpBase<ValueType> > getUnspecifiedPrecOp() const;
101 
102 private:
103  Teuchos::RCP<const ComplexPreconditioner> m_complexPreconditioner;
104 };
105 
106 
107 } // namespace Bempp
108 
109 #endif // WITH_TRILINOS
110 
111 #endif
virtual Teuchos::RCP< Thyra::LinearOpBase< ValueType > > getNonconstUnspecifiedPrecOp()
Return a non-const generic preconditioner linear operator that is not designed or targeted to be appl...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:113
virtual bool isLeftPrecOpConst() const
Return if the underlying left preconditioner operator is const-only or allows non-const access...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:45
virtual Teuchos::RCP< const Thyra::LinearOpBase< ValueType > > getRightPrecOp() const
Return a const right preconditioner linear operator if one is designed or targeted to be applied on t...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:91
virtual bool isRightPrecOpConst() const
Return if the underlying right preconditioner operator is const-only or allows non-const access...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:75
virtual Teuchos::RCP< const Thyra::LinearOpBase< ValueType > > getUnspecifiedPrecOp() const
Return a const generic preconditioner linear operator that is not designed or targeted to be applied ...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:122
virtual bool isUnspecifiedPrecOpConst() const
Return if the underlying unspecified preconditioner operator is const-only or allows non-const access...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:106
virtual Teuchos::RCP< Thyra::LinearOpBase< ValueType > > getNonconstRightPrecOp()
Return a non-const right preconditioner linear operator if one is designed or targeted to be applied ...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:82
virtual Teuchos::RCP< const Thyra::LinearOpBase< ValueType > > getLeftPrecOp() const
Return a const left preconditioner linear operator if one is designed or targeted to be applied on th...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:61
virtual Teuchos::RCP< Thyra::LinearOpBase< ValueType > > getNonconstLeftPrecOp()
Return a non-const left preconditioner linear operator if one is designed or targeted to be applied o...
Definition: real_wrapper_of_complex_thyra_preconditioner.cpp:52
Definition: real_wrapper_of_complex_thyra_preconditioner.hpp:35