fixed: instance CO2Tables for quad if QuadMath was found
This commit is contained in:
parent
1ef0492763
commit
27ecbe5c98
@ -151,6 +151,14 @@ macro (sources_hook)
|
||||
endif()
|
||||
set_source_files_properties(src/opm/input/eclipse/Python/Python.cpp
|
||||
PROPERTIES COMPILE_FLAGS -Wno-shadow)
|
||||
if(QuadMath_FOUND)
|
||||
get_target_property(qm_defs QuadMath::QuadMath INTERFACE_COMPILE_DEFINITIONS)
|
||||
get_target_property(qm_options QuadMath::QuadMath INTERFACE_COMPILE_OPTIONS)
|
||||
set_source_files_properties(src/opm/material/components/CO2.cpp
|
||||
PROPERTIES COMPILE_DEFINITIONS "${qm_defs}"
|
||||
COMPILE_OPTIONS "${qm_options}")
|
||||
endif()
|
||||
|
||||
endmacro (sources_hook)
|
||||
|
||||
macro (fortran_hook)
|
||||
|
@ -28,5 +28,6 @@ list(APPEND opm-common_DEPS
|
||||
# cannot format UDQVarType. Hence we use the same version
|
||||
# as the embedded one.
|
||||
"fmt 7.0.3"
|
||||
"QuadMath"
|
||||
)
|
||||
find_package_deps(opm-common)
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/material/components/CO2.hpp>
|
||||
#if HAVE_QUAD
|
||||
#include <opm/material/common/quad.hpp>
|
||||
#endif
|
||||
|
||||
#include "co2tables.inc"
|
||||
|
||||
@ -36,6 +39,7 @@ const UniformTabulated2DFunction<double>&
|
||||
CO2<double>::tabulatedDensity = CO2Tables::tabulatedDensity;
|
||||
template<>
|
||||
const double CO2<double>::brineSalinity = CO2Tables::brineSalinity;
|
||||
|
||||
template<>
|
||||
const UniformTabulated2DFunction<double>&
|
||||
CO2<float>::tabulatedEnthalpy = CO2Tables::tabulatedEnthalpy;
|
||||
@ -45,4 +49,15 @@ CO2<float>::tabulatedDensity = CO2Tables::tabulatedDensity;
|
||||
template<>
|
||||
const float CO2<float>::brineSalinity = CO2Tables::brineSalinity;
|
||||
|
||||
#if HAVE_QUAD
|
||||
template<>
|
||||
const UniformTabulated2DFunction<double>&
|
||||
CO2<quad>::tabulatedEnthalpy = CO2Tables::tabulatedEnthalpy;
|
||||
template<>
|
||||
const UniformTabulated2DFunction<double>&
|
||||
CO2<quad>::tabulatedDensity = CO2Tables::tabulatedDensity;
|
||||
template<>
|
||||
const quad CO2<quad>::brineSalinity = CO2Tables::brineSalinity;
|
||||
#endif
|
||||
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user