BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
general_elementary_singular_integral_operator_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_general_elementary_singular_integral_operator_imp_hpp
22 #define bempp_general_elementary_singular_integral_operator_imp_hpp
23 
24 #include "general_elementary_singular_integral_operator.hpp"
25 
26 #include "../fiber/default_collection_of_kernels.hpp"
27 #include "../fiber/default_collection_of_basis_transformations.hpp"
28 #include "../fiber/default_test_kernel_trial_integral.hpp"
29 
30 namespace Bempp
31 {
32 
33 template <typename BasisFunctionType_, typename KernelType_, typename ResultType_>
34 template <typename KernelFunctor,
35  typename TestTransformationsFunctor,
36  typename TrialTransformationsFunctor,
37  typename IntegrandFunctor>
38 GeneralElementarySingularIntegralOperator<
39 BasisFunctionType_, KernelType_, ResultType_>::
40 GeneralElementarySingularIntegralOperator(
41  const shared_ptr<const Space<BasisFunctionType_> >& domain,
42  const shared_ptr<const Space<BasisFunctionType_> >& range,
43  const shared_ptr<const Space<BasisFunctionType_> >& dualToRange,
44  const std::string& label,
45  int symmetry,
46  const KernelFunctor& kernelFunctor,
47  const TestTransformationsFunctor& testTransformationsFunctor,
48  const TrialTransformationsFunctor& trialTransformationsFunctor,
49  const IntegrandFunctor& integrandFunctor) :
50  Base(domain, range, dualToRange, label, symmetry),
51  m_kernels(
52  new Fiber::DefaultCollectionOfKernels<KernelFunctor>(kernelFunctor)),
53  m_testTransformations(
54  new Fiber::DefaultCollectionOfShapesetTransformations<TestTransformationsFunctor>(
55  testTransformationsFunctor)),
56  m_trialTransformations(
57  new Fiber::DefaultCollectionOfShapesetTransformations<TrialTransformationsFunctor>(
58  trialTransformationsFunctor)),
59  m_integral(
60  new Fiber::DefaultTestKernelTrialIntegral<IntegrandFunctor>(
61  integrandFunctor))
62 {
63 }
64 
65 template <typename BasisFunctionType_, typename KernelType_, typename ResultType_>
66 template <typename KernelFunctor,
67  typename TestTransformationsFunctor,
68  typename TrialTransformationsFunctor>
70 BasisFunctionType_, KernelType_, ResultType_>::
72  const shared_ptr<const Space<BasisFunctionType_> >& domain,
73  const shared_ptr<const Space<BasisFunctionType_> >& range,
74  const shared_ptr<const Space<BasisFunctionType_> >& dualToRange,
75  const std::string& label,
76  int symmetry,
77  const KernelFunctor& kernelFunctor,
78  const TestTransformationsFunctor& testTransformationsFunctor,
79  const TrialTransformationsFunctor& trialTransformationsFunctor,
80  const shared_ptr<Fiber::TestKernelTrialIntegral<
81  BasisFunctionType_, KernelType_, ResultType_> >& integral) :
82  Base(domain, range, dualToRange, label, symmetry),
83  m_kernels(
84  new Fiber::DefaultCollectionOfKernels<KernelFunctor>(kernelFunctor)),
85  m_testTransformations(
86  new Fiber::DefaultCollectionOfShapesetTransformations<TestTransformationsFunctor>(
87  testTransformationsFunctor)),
88  m_trialTransformations(
89  new Fiber::DefaultCollectionOfShapesetTransformations<TrialTransformationsFunctor>(
90  trialTransformationsFunctor)),
91  m_integral(integral)
92 {
93 }
94 
95 template <typename BasisFunctionType_, typename KernelType_, typename ResultType_>
97 BasisFunctionType_, KernelType_, ResultType_>::
99  const shared_ptr<const Space<BasisFunctionType_> >& domain,
100  const shared_ptr<const Space<BasisFunctionType_> >& range,
101  const shared_ptr<const Space<BasisFunctionType_> >& dualToRange,
102  const std::string& label,
103  int symmetry,
104  const shared_ptr<Fiber::CollectionOfKernels<KernelType_> >& kernels,
106  testTransformations,
108  trialTransformations,
109  const shared_ptr<Fiber::TestKernelTrialIntegral<
110  BasisFunctionType_, KernelType_, ResultType_> >& integral) :
111  Base(domain, range, dualToRange, label, symmetry),
112  m_kernels(kernels),
113  m_testTransformations(testTransformations),
114  m_trialTransformations(trialTransformations),
115  m_integral(integral)
116 {
117 }
118 
119 } // namespace Bempp
120 
121 #endif
An integral representing the weak form of an integral operator.
Definition: test_kernel_trial_integral.hpp:70
Collection of kernels.
Definition: collection_of_kernels.hpp:59
Function space.
Definition: assembled_potential_operator.hpp:35
Standard implementation of an elementary singular integral operator.
Definition: general_elementary_singular_integral_operator.hpp:59
Base class of ElementaryIntegralOperator, containing functionality independent from KernelType...
Definition: elementary_integral_operator_base.hpp:53