BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
helmholtz_3d_potential_operator_base_imp.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_helmholtz_3d_potential_operator_base_imp_hpp
22 #define bempp_helmholtz_3d_potential_operator_base_imp_hpp
23 
24 #include "helmholtz_3d_potential_operator_base.hpp"
25 
26 namespace Bempp
27 {
28 
29 namespace
30 {
31 
32 template <typename Impl>
33 inline typename Impl::KernelType waveNumberImpl(const Impl& impl)
34 {
35  return impl.kernels.functor().waveNumber() *
36  typename Impl::KernelType(0., 1.);
37 }
38 
39 } // namespace
40 
41 template <typename Impl, typename BasisFunctionType>
44  m_impl(new Impl(waveNumber))
45 {
46 }
47 
48 template <typename Impl, typename BasisFunctionType>
51  m_impl(new Impl(*other.m_impl))
52 {
53 }
54 
55 template <typename Impl, typename BasisFunctionType>
58 {
59 }
60 
61 template <typename Impl, typename BasisFunctionType>
65 {
66  if (this != &rhs) {
67  Base::operator=(rhs);
68  m_impl.reset(new Impl(*rhs.m_impl));
69  }
70  return *this;
71 }
72 
73 template <typename Impl, typename BasisFunctionType>
76 waveNumber() const
77 {
78  return waveNumberImpl(*m_impl);
79 }
80 
81 template <typename Impl, typename BasisFunctionType>
83 CollectionOfKernels&
85 kernels() const
86 {
87  return m_impl->kernels;
88 }
89 
90 template <typename Impl, typename BasisFunctionType>
92 CollectionOfBasisTransformations&
95 {
96  return m_impl->transformations;
97 }
98 
99 template <typename Impl, typename BasisFunctionType>
101 KernelTrialIntegral&
103 integral() const
104 {
105  return m_impl->integral;
106 }
107 
108 } // namespace Bempp
109 
110 #endif
Helmholtz3dPotentialOperatorBase & operator=(const Helmholtz3dPotentialOperatorBase &rhs)
Assignment operator.
Definition: helmholtz_3d_potential_operator_base_imp.hpp:64
virtual const KernelTrialIntegral & integral() const
Return an object representing the integral used to evaluate the potential of a charge distribution...
Definition: helmholtz_3d_potential_operator_base_imp.hpp:103
virtual ~Helmholtz3dPotentialOperatorBase()
Destructor.
Definition: helmholtz_3d_potential_operator_base_imp.hpp:57
Base class for potential operators for the Helmholtz equation in 3D.
Definition: helmholtz_3d_potential_operator_base.hpp:44
Helmholtz3dPotentialOperatorBase(KernelType waveNumber)
Constructor.
Definition: helmholtz_3d_potential_operator_base_imp.hpp:43
KernelType waveNumber() const
Return the wave number set previously in the constructor.
Definition: helmholtz_3d_potential_operator_base_imp.hpp:76
virtual const CollectionOfBasisTransformations & trialTransformations() const
Return the collection of transformations of the charge distribution that occur in the weak form of th...
Definition: helmholtz_3d_potential_operator_base_imp.hpp:94
Base::KernelType KernelType
Type of the values of kernel functions.
Definition: helmholtz_3d_potential_operator_base.hpp:60
virtual const CollectionOfKernels & kernels() const
Return the collection of kernel functions occurring in the integrand of this operator.
Definition: helmholtz_3d_potential_operator_base_imp.hpp:85