BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
aca_global_assembler.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 
22 #ifndef bempp_aca_global_assembler_hpp
23 #define bempp_aca_global_assembler_hpp
24 
25 #include "../common/common.hpp"
26 
27 #include "../common/armadillo_fwd.hpp"
28 #include "../common/shared_ptr.hpp"
29 #include "../fiber/scalar_traits.hpp"
30 
31 #include <memory>
32 #include <vector>
33 
34 class Epetra_CrsMatrix;
35 
36 namespace Fiber
37 {
38 
40 template <typename ResultType> class LocalAssemblerForIntegralOperators;
41 template <typename ResultType> class LocalAssemblerForPotentialOperators;
44 } // namespace Fiber
45 
46 namespace Bempp
47 {
48 
50 class AssemblyOptions;
51 class EvaluationOptions;
52 template <typename ValueType> class DiscreteBoundaryOperator;
53 template <typename BasisFunctionType> class Space;
54 template <typename BasisFunctionType, typename ResultType> class Context;
60 template <typename BasisFunctionType, typename ResultType>
62 {
63  typedef typename Fiber::ScalarTraits<ResultType>::RealType CoordinateType;
64 
65 public:
73 
74  static std::auto_ptr<DiscreteBndOp> assembleDetachedWeakForm(
75  const Space<BasisFunctionType>& testSpace,
76  const Space<BasisFunctionType>& trialSpace,
77  const std::vector<LocalAssemblerForIntegralOperators*>& localAssemblers,
78  const std::vector<LocalAssemblerForIntegralOperators*>&
79  localAssemblersForAdmissibleBlocks,
80  const std::vector<const DiscreteBndOp*>& sparseTermsToAdd,
81  const std::vector<ResultType>& denseTermMultipliers,
82  const std::vector<ResultType>& sparseTermMultipliers,
84  int symmetry);
85 
86  static std::auto_ptr<DiscreteBndOp> assembleDetachedWeakForm(
87  const Space<BasisFunctionType>& testSpace,
88  const Space<BasisFunctionType>& trialSpace,
89  LocalAssemblerForIntegralOperators& localAssembler,
90  LocalAssemblerForIntegralOperators& localAssemblerForAdmissibleBlocks,
92  int symmetry); // used to be "bool symmetric"; fortunately "true"
93  // is converted to 1 == SYMMETRIC
94 
95  static std::auto_ptr<DiscreteBndOp> assemblePotentialOperator(
96  const arma::Mat<CoordinateType>& points,
97  const Space<BasisFunctionType>& trialSpace,
98  const std::vector<LocalAssemblerForPotentialOperators*>& localAssemblers,
99  const std::vector<ResultType>& termMultipliers,
100  const EvaluationOptions& options);
101 
102  static std::auto_ptr<DiscreteBndOp> assemblePotentialOperator(
103  const arma::Mat<CoordinateType>& points,
104  const Space<BasisFunctionType>& trialSpace,
105  LocalAssemblerForPotentialOperators& localAssembler,
106  const EvaluationOptions& options);
107 };
108 
109 } // namespace Bempp
110 
111 #endif
Traits of scalar types.
Definition: scalar_traits.hpp:40
Options controlling evaluation of potentials.
Definition: evaluation_options.hpp:44
Function space.
Definition: assembled_potential_operator.hpp:35
Abstract interface of a local assembler for potential operators.
Definition: local_assembler_for_potential_operators.hpp:54
Assembly context.
Definition: context.hpp:30
Abstract interface of a local assembler for integral operators.
Definition: local_assembler_for_integral_operators.hpp:48
Discrete boundary operator.
Definition: assembled_potential_operator.hpp:33
ACA-mode assembler.
Definition: aca_global_assembler.hpp:61