BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
evaluation_options.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_evaluation_options_hpp
23 #define bempp_evaluation_options_hpp
24 
25 #include "../common/common.hpp"
26 
27 #include "aca_options.hpp"
28 
29 #include "../common/deprecated.hpp"
30 #include "../fiber/opencl_options.hpp"
31 #include "../fiber/parallelization_options.hpp"
32 #include "../fiber/verbosity_level.hpp"
33 
34 namespace Bempp
35 {
36 
40 
45 {
46 public:
47  enum { AUTO = -1 };
48 
51 
56  enum Mode {
61  };
62 
97  void switchToDenseMode();
98 
118 
123  Mode evaluationMode() const;
124 
129  const AcaOptions& acaOptions() const;
130 
135  // Temporarily removed (OpenCl support is broken).
136  // void enableOpenCl(const OpenClOptions& openClOptions);
137  // void disableOpenCl();
138 
143  void setMaxThreadCount(int maxThreadCount);
144 
148  BEMPP_DEPRECATED void switchToTbb(int maxThreadCount = AUTO);
149 
152 
161  void setVerbosityLevel(VerbosityLevel::Level level);
162 
164  VerbosityLevel::Level verbosityLevel() const;
165 
168 private:
170  Mode m_evaluationMode;
171  AcaOptions m_acaOptions;
172  ParallelizationOptions m_parallelizationOptions;
173  VerbosityLevel::Level m_verbosityLevel;
175 };
176 
177 } // namespace Bempp
178 
179 #endif
Assemble dense matrices.
Definition: evaluation_options.hpp:58
Mode evaluationMode() const
Return current evaluation mode.
Definition: evaluation_options.cpp:43
Options controlling evaluation of potentials.
Definition: evaluation_options.hpp:44
BEMPP_DEPRECATED void switchToTbb(int maxThreadCount=AUTO)
Set the maximum number of threads used during evaluation of potentials.
Definition: evaluation_options.cpp:61
Parallel operation settings.
Definition: parallelization_options.hpp:32
Adaptive cross approximation (ACA) parameters.
Definition: aca_options.hpp:34
#define BEMPP_DEPRECATED
Macro used to mark deprecated functions or classes.
Definition: deprecated.hpp:41
Verbosity level.
Definition: verbosity_level.hpp:30
const AcaOptions & acaOptions() const
Return the current adaptive cross approximation (ACA) settings.
Definition: evaluation_options.cpp:47
const ParallelizationOptions & parallelizationOptions() const
Return current parallelization options.
Definition: evaluation_options.cpp:66
Mode
Possible evaluation modes.
Definition: evaluation_options.hpp:56
void setVerbosityLevel(VerbosityLevel::Level level)
Set the verbosity level.
Definition: evaluation_options.cpp:71
Definition: opencl_options.hpp:29
void setMaxThreadCount(int maxThreadCount)
Set the maximum number of threads used during evaluation of potentials.
Definition: evaluation_options.cpp:56
VerbosityLevel::Level verbosityLevel() const
Return the verbosity level.
Definition: evaluation_options.cpp:76
void switchToAcaMode(const AcaOptions &acaOptions)
Use adaptive cross approximation (ACA) to obtain hierarchical-matrix representations of potential ope...
Definition: evaluation_options.cpp:37
Assemble hierarchical matrices using adaptive cross approximation (ACA).
Definition: evaluation_options.hpp:60
EvaluationOptions()
Constructor.
Definition: evaluation_options.cpp:26
void switchToDenseMode()
Use dense-matrix representations of elementary potential operators.
Definition: evaluation_options.cpp:32