Commit Graph

53 Commits

Author SHA1 Message Date
Bård Skaflestad
d9863d5e32 Don't Require Floating Point from_chars() Function
This commit broadens the scope of commit c1e2a3a9b (PR #922) to
apply to all compilers/libraries, not just Clang/libc++, which do
not have support for floating-point types in std::from_chars().
While hopefully a transient situation, this enables building the
parameter system with GCC versions prior to GCC 11.  We expect to
require version 11 in the not too distant future, though.  At that
point we should revert this commit.

We use a configure-time feature test of the compiler (CMake command
'try_compile') to detect whether or not the compiler supports
floating-point overloads of std::from_chars() and emit the result to
config.h as the new preprocessor symbol

    HAVE_FLOATING_POINT_FROM_CHARS

We use std::strtod() as the fall-back alternative for floating point
conversion if this symbol is defined to false (zero).
2024-08-15 18:16:38 +02:00
Bård Skaflestad
6b724aacc1 Merge pull request #921 from akva2/typetag_free_params_no_downstream
Start moving parameters to new parameter system
2024-08-12 19:45:28 +02:00
Arne Morten Kvarving
d2096030e5 move FlashTwoPhaseMethod to TypeTag-free parameter system 2024-08-12 15:40:28 +02:00
Arne Morten Kvarving
3d737c0303 ParameterSystem: add support for quad Scalar 2024-08-12 15:20:28 +02:00
Atgeirr Flø Rasmussen
c1e2a3a9b3 Add workaround from libc++ incomplete from_chars().
Float version not included in current version (15).
2024-08-12 13:32:40 +02:00
Arne Morten Kvarving
129e15bd0a ParameterSystem: add overloads for typetag free parameter system 2024-08-09 15:24:43 +02:00
Arne Morten Kvarving
add584ffb4 rename Parameters::ParamRegFinalizer to ParamRegFinalizerTT
for the transition phase we need a finalizer that uses the
typetag. this class will eventually disappear
2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
b682b7da03 Parameters::parseCommandLineOptions: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
0e5ea0f567 Parameters::parseParameterFile: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
b60f390a21 Parameters::printUsage: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
b9d46da4e2 Parameters::printValues: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
6a43a7ef71 Parameters::printUnused: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
85e48bd157 Parameters::getLists: remove unused TypeTag tparam 2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
a5b4f827fe Parameters::endParamRegistration
rename to endRegistration and drop unsed TypeTag tparam
2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
32b0015afe changed: remove the typetag for using the parameter system
also remove the typetag parameter for the metadata backing store.
2024-08-09 11:30:27 +02:00
Arne Morten Kvarving
ac909fefc4 replace iterators with range based loops 2024-04-15 11:38:32 +02:00
Arne Morten Kvarving
fee52d410a ParameterSystem: drop unnecessary Param struct
move code to the appropriate template functions instead
2024-04-15 11:38:32 +02:00
Arne Morten Kvarving
43cbc059bd remove Param::check_
there is no way to inconsistently access parameters any more
so this sanity check is unnecessary
2024-04-15 11:19:12 +02:00
Arne Morten Kvarving
b02eb95477 Parameters::isSet: pass parameter struct instead of stringified 2024-04-15 10:23:39 +02:00
Arne Morten Kvarving
078b0e8679 remove macro EWOMS_GET_PARAM 2024-04-05 14:54:53 +02:00
Arne Morten Kvarving
4d2486196f remove macro EWOMS_GET_PARAM_ 2024-04-05 14:54:53 +02:00
Arne Morten Kvarving
fe06454112 pass property struct to Parameters::get
use this to obtain default value and parameter name
2024-04-05 14:54:53 +02:00
Arne Morten Kvarving
72322ec6ff Parameter::get: remove unused overload 2024-04-05 14:01:44 +02:00
Arne Morten Kvarving
5dea27c960 remove unused propName param in Parameters::get
it is always the same as paramName
2024-04-05 14:01:44 +02:00
Arne Morten Kvarving
04273d31c3 Parameters::hideParam
pass property struct instead of name of stringified parameter.
2024-04-05 12:55:57 +02:00
Arne Morten Kvarving
48fa0f3c59 drop macro EWOMS_REGISTER_PARAM 2024-04-05 10:05:30 +02:00
Arne Morten Kvarving
22a5aab10e Parameters::registerParam: grab name from struct
optionally allow a member to override
2024-04-05 10:03:36 +02:00
Arne Morten Kvarving
069161bd84 Parameters::registerParam: pass Property struct and use parameter type from its definition 2024-04-05 10:03:36 +02:00
Arne Morten Kvarving
8b02ba2efc Parameters::registerParam: remove propertyName
it is always the same as paramName
2024-04-04 12:51:07 +02:00
Arne Morten Kvarving
b3090888b5 remove EWOMS_HIDE_PARAM macro
it adds no simplicity and only obfuscates
2024-04-04 08:17:16 +02:00
Arne Morten Kvarving
f22f51a833 Parameters::hideParam: remove unused parameter 2024-04-04 08:17:16 +02:00
Arne Morten Kvarving
399e39b31b remove EWOMS_GET_PARAM_LISTS macro
it adds no simplicity and only obfuscates
2024-04-03 22:35:40 +02:00
Bård Skaflestad
a2ff5e98ee Merge pull request #885 from akva2/remove_ewoms_param_is_set_macro
remove macro EWOMS_PARAM_IS_SET macro
2024-04-03 21:46:25 +02:00
Arne Morten Kvarving
4f6bc9280d remove macro EWOMS_PARAM_IS_SET macro
it simplifies nothing, only obscures.
remove unused different propTagName and use paramName.
2024-04-03 19:54:10 +02:00
Arne Morten Kvarving
783eaa2882 remove EWOMS_END_PARAM_REGISTRATION macro
it adds no simplicity and only obfuscates
2024-04-03 16:23:21 +02:00
Arne Morten Kvarving
0da838faa3 remove unused macro EWOMS_RESET_PARAMS_ 2024-04-03 13:39:46 +02:00
Arne Morten Kvarving
967738ee91 use OPM, not EWOMS in header guard 2024-04-03 13:39:46 +02:00
Arne Morten Kvarving
d6c378e6a9 remove use of Unused.hpp 2022-08-02 11:24:40 +02:00
Arne Morten Kvarving
c559e348d4 anonymized unused parameters 2021-05-14 13:55:12 +02:00
Atgeirr Flø Rasmussen
3c83f5df0f Add --help-all option that also prints hidden options. 2020-10-16 13:55:45 +02:00
Joakim Hove
b2cac8fa44 Remove unused #include of Exceptions 2020-09-21 10:57:42 +02:00
Atgeirr Flø Rasmussen
4e189a28df Merge pull request #617 from OPM/replace-property-macro-calls
Replace property macro calls
2020-06-19 11:51:10 +02:00
Bernd Flemisch
d72de0f308 [cleanup] replace typedef by using 2020-06-10 13:49:42 +02:00
Bernd Flemisch
bdb7bac3e8 [properties] replace remaining macro calls 2020-06-10 13:07:19 +02:00
Bernd Flemisch
725c022e69 [properties] replace BEGIN/END_PROPERTIES macro calls 2020-06-08 17:11:48 +02:00
Bernd Flemisch
880c5223ac [properties] replace macro calls by native C++ 2020-06-08 16:41:02 +02:00
Arne Morten Kvarving
016e5a75d8 anonoymize unused parameter
quells compiler warnings
2020-06-08 10:14:29 +02:00
Bernd Flemisch
196e0b9b9b [parameters] restore full functionality of getting parameters 2020-05-19 13:52:34 +02:00
Bernd Flemisch
2fe69dfd9b [properties] fix macros that are used in opm-simulators, change include order 2020-05-18 15:53:58 +02:00
Bernd Flemisch
58182fe379 [properties] clean up 2020-05-18 15:53:58 +02:00