BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
hypersingular_integral_operator.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_hypersingular_integral_operator_hpp
22 #define bempp_hypersingular_integral_operator_hpp
23 
24 #include "../common/common.hpp"
25 
26 #include "abstract_boundary_operator.hpp"
27 #include "../common/types.hpp"
28 #include "../fiber/types.hpp"
29 
30 #include <vector>
31 #include "../common/armadillo_fwd.hpp"
32 
33 namespace Fiber
34 {
35 
37 template <typename CoordinateType> class CollectionOfShapesetTransformations;
38 template <typename KernelType> class CollectionOfKernels;
39 template <typename BasisFunctionType, typename KernelType, typename ResultType>
40 class TestKernelTrialIntegral;
41 template <typename ResultType> class LocalAssemblerForOperators;
44 } // namespace Fiber
45 
46 namespace Bempp
47 {
48 
50 class EvaluationOptions;
51 template <typename BasisFunctionType, typename ResultType> class GridFunction;
52 template <typename ValueType> class InterpolatedFunction;
104 template <typename BasisFunctionType_, typename KernelType_, typename ResultType_>
106  public AbstractBoundaryOperator<BasisFunctionType_, ResultType_>
107 {
109 public:
113  typedef typename Base::ResultType ResultType;
121  typedef KernelType_ KernelType;
136 
139  const shared_ptr<const Space<BasisFunctionType> >& domain,
140  const shared_ptr<const Space<BasisFunctionType> >& range,
141  const shared_ptr<const Space<BasisFunctionType> >& dualToRange,
142  const std::string& label,
143  int symmetry);
144 
146  virtual bool isLocal() const;
147 
148 protected:
149  virtual shared_ptr<DiscreteBoundaryOperator<ResultType_> >
151  const Context<BasisFunctionType, ResultType>& context) const;
152 
153 private:
156  virtual const CollectionOfKernels& kernels() const = 0;
157 
162  testTransformations() const = 0;
163 
168  trialTransformations() const = 0;
169 
179  virtual const TestKernelTrialIntegral& integral() const = 0;
180 
185  virtual const CollectionOfKernels& offDiagonalKernels() const = 0;
186 
196  offDiagonalTestTransformations() const = 0;
197 
208 
219  virtual const TestKernelTrialIntegral& offDiagonalIntegral() const = 0;
220 
221 private:
224  std::pair<shared_ptr<LocalAssembler>, shared_ptr<LocalAssembler> >
225  makeAssemblers(
226  const QuadratureStrategy& quadStrategy,
227  const AssemblyOptions& options) const;
228 
229  std::pair<shared_ptr<LocalAssembler>, shared_ptr<LocalAssembler> >
230  reallyMakeAssemblers(
231  const QuadratureStrategy& quadStrategy,
232  const shared_ptr<const GeometryFactory>& testGeometryFactory,
233  const shared_ptr<const GeometryFactory>& trialGeometryFactory,
234  const shared_ptr<const Fiber::RawGridGeometry<CoordinateType> >& testRawGeometry,
235  const shared_ptr<const Fiber::RawGridGeometry<CoordinateType> >& trialRawGeometry,
236  const shared_ptr<const std::vector<const Fiber::Shapeset<BasisFunctionType>*> >& testShapesets,
237  const shared_ptr<const std::vector<const Fiber::Shapeset<BasisFunctionType>*> >& trialShapesets,
238  const shared_ptr<const Fiber::OpenClHandler>& openClHandler,
239  const ParallelizationOptions& parallelizationOptions,
240  VerbosityLevel::Level verbosityLevel,
241  bool cacheSingularIntegrals,
242  bool makeSeparateOffDiagonalAssembler) const;
243 
244  shared_ptr<DiscreteBoundaryOperator<ResultType_> >
245  assembleWeakFormInternal(
246  LocalAssembler& standardAssembler, LocalAssembler& offDiagonalAssembler,
247  const Context<BasisFunctionType, ResultType>& context) const;
248 
249  std::auto_ptr<DiscreteBoundaryOperator<ResultType_> >
250  assembleWeakFormInDenseMode(
251  LocalAssembler& assembler,
252  const Context<BasisFunctionType, ResultType>& context) const;
253  std::auto_ptr<DiscreteBoundaryOperator<ResultType_> >
254  assembleWeakFormInAcaMode(
255  LocalAssembler& standardAssembler, LocalAssembler& offDiagonalAssembler,
256  const Context<BasisFunctionType, ResultType>& context) const;
257 
259 };
260 
261 } // namespace Bempp
262 
263 #endif
Fiber::TestKernelTrialIntegral< BasisFunctionType, KernelType, ResultType > TestKernelTrialIntegral
Type of the appropriate instantiation of Fiber::TestKernelTrialIntegral.
Definition: hypersingular_integral_operator.hpp:135
std::string label() const
Return the label of the operator.
Definition: abstract_boundary_operator.cpp:149
Fiber::CollectionOfShapesetTransformations< CoordinateType > CollectionOfShapesetTransformations
Type of the appropriate instantiation of Fiber::CollectionOfShapesetTransformations.
Definition: hypersingular_integral_operator.hpp:124
Fiber::LocalAssemblerForIntegralOperators< ResultType > LocalAssembler
Type of the appropriate instantiation of Fiber::LocalAssemblerForOperators.
Definition: hypersingular_integral_operator.hpp:119
Base class for quadrature strategies.
Definition: quadrature_strategy.hpp:242
Parallel operation settings.
Definition: parallelization_options.hpp:32
Function space.
Definition: assembled_potential_operator.hpp:35
virtual const CollectionOfShapesetTransformations & offDiagonalTrialTransformations() const =0
Return the collection of trial-function transformations occurring in the second representation of the...
Base::CoordinateType CoordinateType
Type used to represent coordinates.
Definition: hypersingular_integral_operator.hpp:115
Assembly context.
Definition: context.hpp:30
virtual const TestKernelTrialIntegral & integral() const =0
Return an object representing the integral that is the first representation of the weak form of this ...
virtual const CollectionOfKernels & offDiagonalKernels() const =0
Return the collection of kernel functions occurring in the in the second representation of the weak f...
BasisFunctionType_ BasisFunctionType
Type of the values of the (components of the) basis functions into which functions acted upon by the ...
Definition: abstract_boundary_operator.hpp:95
shared_ptr< const Space< BasisFunctionType > > range() const
Range.
Definition: abstract_boundary_operator.cpp:135
int symmetry() const
Return the symmetry properties of the operator.
Definition: abstract_boundary_operator.cpp:156
Base::QuadratureStrategy QuadratureStrategy
Type of the appropriate instantiation of Fiber::QuadratureStrategy.
Definition: hypersingular_integral_operator.hpp:117
Fiber::CollectionOfKernels< KernelType > CollectionOfKernels
Type of the appropriate instantiation of Fiber::CollectionOfKernels.
Definition: hypersingular_integral_operator.hpp:132
Collection of shape functions defined on a reference element.
Definition: default_local_assembler_for_operators_on_surfaces_utilities.hpp:34
virtual shared_ptr< DiscreteBoundaryOperator< ResultType_ > > assembleWeakFormImpl(const Context< BasisFunctionType, ResultType > &context) const
Assemble and return the operator&#39;s weak form.
Definition: hypersingular_integral_operator.cpp:165
Abstract (non-discretized) boundary operator.
Definition: abstract_boundary_operator.hpp:90
Abstract interface of a local assembler for integral operators.
Definition: local_assembler_for_integral_operators.hpp:48
ScalarTraits< ResultType >::RealType CoordinateType
Type used to represent coordinates.
Definition: abstract_boundary_operator.hpp:99
shared_ptr< const Space< BasisFunctionType > > dualToRange() const
Dual to range.
Definition: abstract_boundary_operator.cpp:142
Hypersingular integral boundary operator.
Definition: hypersingular_integral_operator.hpp:105
shared_ptr< const Space< BasisFunctionType > > domain() const
Domain.
Definition: abstract_boundary_operator.cpp:128
ResultType_ ResultType
Type used to represent elements of the weak form of the operator.
Definition: abstract_boundary_operator.hpp:97
Definition: default_local_assembler_for_operators_on_surfaces_utilities.hpp:35
Base::BasisFunctionType BasisFunctionType
Type of the values of the (components of the) basis functions into which functions acted upon by the ...
Definition: hypersingular_integral_operator.hpp:111
virtual const CollectionOfShapesetTransformations & testTransformations() const =0
Return the collection of test-function transformations occurring in the first representation of the w...
virtual bool isLocal() const
Return false.
Definition: hypersingular_integral_operator.cpp:59
HypersingularIntegralOperator(const shared_ptr< const Space< BasisFunctionType > > &domain, const shared_ptr< const Space< BasisFunctionType > > &range, const shared_ptr< const Space< BasisFunctionType > > &dualToRange, const std::string &label, int symmetry)
Constructor.
Definition: hypersingular_integral_operator.cpp:47
Fiber::CollectionOfShapesetTransformations< CoordinateType > CollectionOfBasisTransformations
Type of the appropriate instantiation of Fiber::CollectionOfBasisTransformations. ...
Definition: hypersingular_integral_operator.hpp:130
Options determining how weak-form assembly is done.
Definition: assembly_options.hpp:43
KernelType_ KernelType
Type of the values of the (components of the) kernel functions.
Definition: hypersingular_integral_operator.hpp:121
virtual const TestKernelTrialIntegral & offDiagonalIntegral() const =0
Return an object representing the integral that is the second representation of the weak form of this...
Base::ResultType ResultType
Type used to represent elements of the weak form of the operator.
Definition: hypersingular_integral_operator.hpp:113
virtual const CollectionOfShapesetTransformations & offDiagonalTestTransformations() const =0
Return the collection of test-function transformations occurring in the second representation of the ...
virtual const CollectionOfShapesetTransformations & trialTransformations() const =0
Return the collection of trial-function transformations occurring in the first representation of the ...
virtual const CollectionOfKernels & kernels() const =0
Return the collection of kernel functions occurring in the weak form of this operator.