BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
cluster_construction_helper.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_cluster_construction_helper_hpp
22 #define bempp_cluster_construction_helper_hpp
23 
24 #include "../common/common.hpp"
25 
26 #include "../common/armadillo_fwd.hpp"
27 #include "../common/shared_ptr.hpp"
28 #include "../fiber/scalar_traits.hpp"
29 #include "ahmed_aux_fwd.hpp"
30 
31 #include <memory>
32 
33 namespace Bempp
34 {
35 
37 template <typename BasisFunctionType> class Space;
38 template <typename CoordinateType> struct AhmedDofWrapper;
39 template <typename CoordinateType> struct Point3D;
40 template <typename CoordinateType> struct BoundingBox;
41 class AcaOptions;
42 class IndexPermutation;
45 template <typename BasisFunctionType>
47 {
48  typedef typename Fiber::ScalarTraits<BasisFunctionType>::RealType CoordinateType;
51  typedef bbxbemblcluster<AhmedDofType, AhmedDofType> AhmedBemBlcluster;
52 
53  static void constructBemCluster(
54  const Space<BasisFunctionType>& space,
55  bool indexWithGlobalDofs,
56  const AcaOptions& acaOptions,
57  shared_ptr<AhmedBemCluster>& cluster,
58  shared_ptr<IndexPermutation>& o2p,
59  shared_ptr<IndexPermutation>& p2o);
60 
61  static void constructBemCluster(
62  const arma::Mat<CoordinateType>& points,
63  int componentCount,
64  const AcaOptions& acaOptions,
65  shared_ptr<AhmedBemCluster>& cluster,
66  shared_ptr<IndexPermutation>& o2p,
67  shared_ptr<IndexPermutation>& p2o);
68 
69  static std::auto_ptr<AhmedBemBlcluster>
70  constructBemBlockCluster(
71  const AcaOptions& acaOptions,
72  bool symmetric,
73  AhmedBemCluster& testCluster,
74  AhmedBemCluster& trialCluster,
75  bool useStrongAdmissibilityCondition,
76  unsigned int& blockCount);
77 
78  static void truncateBemBlockCluster(blcluster *cluster,
79  const blcluster *refCluster);
80 
81  static void
82  getComponentDofPositions(
83  const arma::Mat<CoordinateType>& points,
84  int componentCount,
85  std::vector<Point3D<CoordinateType> >& positions);
86 
87  static void
88  getComponentBoundingBoxes(
89  const arma::Mat<CoordinateType>& points,
90  int componentCount,
91  std::vector<BoundingBox<CoordinateType> >& boundingBoxes);
92 };
93 
94 } // namespace Bempp
95 
96 #endif
Traits of scalar types.
Definition: scalar_traits.hpp:40
Definition: extended_bem_cluster.hpp:37
Function space.
Definition: assembled_potential_operator.hpp:35
Adaptive cross approximation (ACA) parameters.
Definition: aca_options.hpp:34
Bounding box with a reference point.
Definition: bounding_box.hpp:13
An Ahmed-compatible degree-of-freedom type.
Definition: ahmed_aux.hpp:89
Definition: cluster_construction_helper.hpp:46