mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-24 22:57:42 -05:00
Merge pull request #6497 from blattms/bugfix/build-ppc64el-quadmath
Fix quadmath problems on ppc64el with IEEE long double
This commit is contained in:
2 files changed
+7
-3
No files matched your search
+5
-1
@@ -370,8 +370,12 @@ macro (sources_hook)
|
||||
endif()
|
||||
if(QuadMath_FOUND)
|
||||
get_target_property(qm_defs QuadMath::QuadMath INTERFACE_COMPILE_DEFINITIONS)
|
||||
list(APPEND qm_defs HAVE_QUAD=1)
|
||||
get_target_property(qm_options QuadMath::QuadMath INTERFACE_COMPILE_OPTIONS)
|
||||
if(qm_defs)
|
||||
list(APPEND qm_defs HAVE_QUAD=1)
|
||||
else()
|
||||
set(qm_defs HAVE_QUAD=1)
|
||||
endif()
|
||||
set_source_files_properties(opm/models/nonlinear/newtonmethodparams.cpp
|
||||
opm/models/utils/parametersystem.cpp
|
||||
opm/models/utils/simulatorutils.cpp
|
||||
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
}
|
||||
|
||||
// make the weight of the temperature primary variable inversly proportional to its value
|
||||
return std::max(1.0 / 1000,
|
||||
return std::max(static_cast<Scalar>(1.0) / 1000,
|
||||
1.0 / model.solution(/*timeIdx=*/0)[globalDofIdx][temperatureIdx]);
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
|
||||
// approximate change of internal energy of 1kg of liquid water for a temperature
|
||||
// change of 30K
|
||||
return 1.0 / (4.184e3 * 30.0);
|
||||
return static_cast<Scalar>(1.0) / (4.184e3 * 30.0);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user