|
3 | 3 |
|
4 | 4 | #include <cmath> |
5 | 5 | #include <exception> |
| 6 | +#include <string> |
6 | 7 | #include <type_traits> |
7 | 8 | #include <vector> |
| 9 | +using namespace std; |
8 | 10 |
|
9 | 11 | #include <Eigen/Dense> |
10 | 12 | #include <boost/math/constants/constants.hpp> |
|
22 | 24 | template<typename scalar> |
23 | 25 | using Matrix = Eigen::Matrix<scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>; |
24 | 26 |
|
25 | | -using namespace std; |
26 | 27 |
|
27 | 28 | namespace pfasst |
28 | 29 | { |
@@ -86,45 +87,6 @@ namespace pfasst |
86 | 87 | } |
87 | 88 |
|
88 | 89 | } // ::pfasst::quadrature |
89 | | - |
90 | | - namespace config |
91 | | - { |
92 | | - // note: GCC fails with "error: explicit template specialization cannot have a storage class" |
93 | | - // if this template specialization is also declared 'static'; Clang does not care. |
94 | | - template<> |
95 | | - inline quadrature::QuadratureType get_value(const string& name) |
96 | | - { |
97 | | - const string type = options::get_instance().get_variables_map()[name].as<string>(); |
98 | | - if (type == "gauss-lobatto") { |
99 | | - return quadrature::QuadratureType::GaussLobatto; |
100 | | - } else if (type == "gauss-legendre") { |
101 | | - return quadrature::QuadratureType::GaussLegendre; |
102 | | - } else if (type == "gauss-radau") { |
103 | | - return quadrature::QuadratureType::GaussRadau; |
104 | | - } else if (type == "clenshaw-curtis") { |
105 | | - return quadrature::QuadratureType::ClenshawCurtis; |
106 | | - } else if (type == "uniform") { |
107 | | - return quadrature::QuadratureType::Uniform; |
108 | | - } else { |
109 | | - throw invalid_argument("Quadrature type '" + type + "' not known."); |
110 | | - } |
111 | | - } |
112 | | - |
113 | | - // note: GCC fails with "error: explicit template specialization cannot have a storage class" |
114 | | - // if this template specialization is also declared 'static'; Clang does not care. |
115 | | - template<> |
116 | | - inline quadrature::QuadratureType get_value(const string& name, |
117 | | - const quadrature::QuadratureType& default_value) |
118 | | - { |
119 | | - if (options::get_instance().get_variables_map().count(name) == 1) { |
120 | | - return get_value<quadrature::QuadratureType>(name); |
121 | | - } else { |
122 | | - return default_value; |
123 | | - } |
124 | | - } |
125 | | - |
126 | | - } // ::pfasst::config |
127 | | - |
128 | 90 | } // ::pfasst |
129 | 91 |
|
130 | 92 | #endif // _PFASST__QUADRATURE_HPP_ |
0 commit comments