BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
discrete_boundary_operator_composition.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 #ifndef bempp_discrete_boundary_operator_composition_hpp
22 #define bempp_discrete_boundary_operator_composition_hpp
23 
24 #include "bempp/common/config_trilinos.hpp"
25 
26 #include "../common/common.hpp"
27 
28 #include "discrete_boundary_operator.hpp"
29 
30 #include "../common/shared_ptr.hpp"
31 
32 #ifdef WITH_TRILINOS
33 #include <Teuchos_RCP.hpp>
34 #endif
35 
36 namespace Bempp
37 {
38 
42 template <typename ValueType>
44 {
45 public:
47 
56  DiscreteBoundaryOperatorComposition(const shared_ptr<const Base>& outer,
57  const shared_ptr<const Base>& inner);
58 
59  virtual unsigned int rowCount() const;
60  virtual unsigned int columnCount() const;
61 
62  virtual void addBlock(const std::vector<int>& rows,
63  const std::vector<int>& cols,
64  const ValueType alpha,
65  arma::Mat<ValueType>& block) const;
66 
67 #ifdef WITH_TRILINOS
68 public:
69  virtual Teuchos::RCP<const Thyra::VectorSpaceBase<ValueType> > domain() const;
70  virtual Teuchos::RCP<const Thyra::VectorSpaceBase<ValueType> > range() const;
71 
72 protected:
73  virtual bool opSupportedImpl(Thyra::EOpTransp M_trans) const;
74 #endif
75 
76 private:
77  virtual void applyBuiltInImpl(const TranspositionMode trans,
78  const arma::Col<ValueType>& x_in,
79  arma::Col<ValueType>& y_inout,
80  const ValueType alpha,
81  const ValueType beta) const;
82 private:
84  shared_ptr<const Base> m_outer, m_inner;
86 };
87 
88 } // namespace Bempp
89 
90 #endif
virtual unsigned int columnCount() const
Number of columns of the operator.
Definition: discrete_boundary_operator_composition.cpp:55
Composition (product) of discrete linear operators stored separately.
Definition: discrete_boundary_operator_composition.hpp:43
TranspositionMode
Enumeration determining how a discrete boundary operator is transformed before being applied...
Definition: transposition_mode.hpp:37
Discrete boundary operator.
Definition: assembled_potential_operator.hpp:33
virtual void addBlock(const std::vector< int > &rows, const std::vector< int > &cols, const ValueType alpha, arma::Mat< ValueType > &block) const
Add a subblock of this operator to a matrix.
Definition: discrete_boundary_operator_composition.cpp:61
DiscreteBoundaryOperatorComposition(const shared_ptr< const Base > &outer, const shared_ptr< const Base > &inner)
Constructor.
Definition: discrete_boundary_operator_composition.cpp:31
virtual unsigned int rowCount() const
Number of rows of the operator.
Definition: discrete_boundary_operator_composition.cpp:48