mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5132 from blattms/fix-shared-linking
Fix linking errors when using shared libraries.
This commit is contained in:
@@ -350,7 +350,6 @@ if (HAVE_OPM_TESTS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
||||||
target_sources(test_LogOutputHelper PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
|
||||||
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
||||||
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
||||||
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
|
|||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const SummaryConfig& summaryConfig,
|
const SummaryConfig& summaryConfig,
|
||||||
const SummaryState& summaryState,
|
const SummaryState& summaryState,
|
||||||
|
const std::string& moduleVersion,
|
||||||
bool enableEnergy,
|
bool enableEnergy,
|
||||||
bool enableTemperature,
|
bool enableTemperature,
|
||||||
bool enableMech,
|
bool enableMech,
|
||||||
@@ -189,7 +190,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
|
|||||||
, interRegionFlows_(numCells(eclState),
|
, interRegionFlows_(numCells(eclState),
|
||||||
defineInterRegionFlowArrays(eclState, summaryConfig),
|
defineInterRegionFlowArrays(eclState, summaryConfig),
|
||||||
declaredMaxRegionID(eclState.runspec()))
|
declaredMaxRegionID(eclState.runspec()))
|
||||||
, logOutput_(eclState, schedule, summaryState)
|
, logOutput_(eclState, schedule, summaryState, moduleVersion)
|
||||||
, enableEnergy_(enableEnergy)
|
, enableEnergy_(enableEnergy)
|
||||||
, enableTemperature_(enableTemperature)
|
, enableTemperature_(enableTemperature)
|
||||||
, enableMech_(enableMech)
|
, enableMech_(enableMech)
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ protected:
|
|||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const SummaryConfig& summaryConfig,
|
const SummaryConfig& summaryConfig,
|
||||||
const SummaryState& summaryState,
|
const SummaryState& summaryState,
|
||||||
|
const std::string& moduleVersionName,
|
||||||
bool enableEnergy,
|
bool enableEnergy,
|
||||||
bool enableTemperature,
|
bool enableTemperature,
|
||||||
bool enableMech,
|
bool enableMech,
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
#include <ebos/eclbasevanguard.hh>
|
#include <ebos/eclbasevanguard.hh>
|
||||||
#include <ebos/eclgenericoutputblackoilmodule.hh>
|
#include <ebos/eclgenericoutputblackoilmodule.hh>
|
||||||
|
#include <opm/simulators/utils/moduleVersion.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <opm/common/Exceptions.hpp>
|
#include <opm/common/Exceptions.hpp>
|
||||||
#include <opm/common/TimingMacros.hpp>
|
#include <opm/common/TimingMacros.hpp>
|
||||||
@@ -144,6 +146,7 @@ public:
|
|||||||
simulator.vanguard().schedule(),
|
simulator.vanguard().schedule(),
|
||||||
simulator.vanguard().summaryConfig(),
|
simulator.vanguard().summaryConfig(),
|
||||||
simulator.vanguard().summaryState(),
|
simulator.vanguard().summaryState(),
|
||||||
|
moduleVersionName(),
|
||||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||||
getPropValue<TypeTag, Properties::EnableTemperature>(),
|
getPropValue<TypeTag, Properties::EnableTemperature>(),
|
||||||
getPropValue<TypeTag, Properties::EnableMech>(),
|
getPropValue<TypeTag, Properties::EnableMech>(),
|
||||||
|
|||||||
@@ -85,13 +85,13 @@ namespace Opm {
|
|||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
LogOutputHelper<Scalar>::LogOutputHelper(const EclipseState& eclState,
|
LogOutputHelper<Scalar>::LogOutputHelper(const EclipseState& eclState,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const SummaryState& summaryState)
|
const SummaryState& summaryState,
|
||||||
|
const std::string& moduleVersionName)
|
||||||
: eclState_(eclState)
|
: eclState_(eclState)
|
||||||
, schedule_(schedule)
|
, schedule_(schedule)
|
||||||
, summaryState_(summaryState)
|
, summaryState_(summaryState)
|
||||||
{
|
, flowVersionName_(moduleVersionName)
|
||||||
flowVersionName_ = moduleVersionName();
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
void LogOutputHelper<Scalar>::
|
void LogOutputHelper<Scalar>::
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ class LogOutputHelper {
|
|||||||
public:
|
public:
|
||||||
LogOutputHelper(const EclipseState& eclState,
|
LogOutputHelper(const EclipseState& eclState,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const SummaryState& st);
|
const SummaryState& st,
|
||||||
|
const std::string& moduleVersionName);
|
||||||
|
|
||||||
//! \brief Write cumulative production and injection reports to output.
|
//! \brief Write cumulative production and injection reports to output.
|
||||||
void cumulative(const std::size_t reportStepNum) const;
|
void cumulative(const std::size_t reportStepNum) const;
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE(Cumulative)
|
|||||||
st.set(p.first, p.second * 1e3);
|
st.set(p.first, p.second * 1e3);
|
||||||
}
|
}
|
||||||
|
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
helper.cumulative(0);
|
helper.cumulative(0);
|
||||||
std::string data = trimStream(str);
|
std::string data = trimStream(str);
|
||||||
BOOST_CHECK_EQUAL(data, reference);
|
BOOST_CHECK_EQUAL(data, reference);
|
||||||
@@ -194,7 +194,7 @@ Finding the dew point pressure failed for 3 cells [(5,1,1), (6,1,1), (7,1,1)]
|
|||||||
Opm::EclipseState eclState(deck);
|
Opm::EclipseState eclState(deck);
|
||||||
|
|
||||||
Opm::SummaryState st;
|
Opm::SummaryState st;
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
|
|
||||||
str.str(""); // clear out parser errors
|
str.str(""); // clear out parser errors
|
||||||
helper.error({1,20,30}, {4,5,6});
|
helper.error({1,20,30}, {4,5,6});
|
||||||
@@ -254,7 +254,7 @@ BOOST_AUTO_TEST_CASE(Fip)
|
|||||||
Opm::EclipseState eclState(deck);
|
Opm::EclipseState eclState(deck);
|
||||||
Opm::SummaryState st;
|
Opm::SummaryState st;
|
||||||
|
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
Opm::Inplace initial, current;
|
Opm::Inplace initial, current;
|
||||||
const auto& phases = current.phases();
|
const auto& phases = current.phases();
|
||||||
int offset = 17;
|
int offset = 17;
|
||||||
@@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(FipResv)
|
|||||||
Opm::EclipseState eclState(deck);
|
Opm::EclipseState eclState(deck);
|
||||||
Opm::SummaryState st;
|
Opm::SummaryState st;
|
||||||
|
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
Opm::Inplace current;
|
Opm::Inplace current;
|
||||||
const auto& phases = current.phases();
|
const auto& phases = current.phases();
|
||||||
int offset = 17;
|
int offset = 17;
|
||||||
@@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE(Injection)
|
|||||||
st.set(p.first, p.second);
|
st.set(p.first, p.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
helper.injection(0);
|
helper.injection(0);
|
||||||
std::string data = trimStream(str);
|
std::string data = trimStream(str);
|
||||||
BOOST_CHECK_EQUAL(data, reference);
|
BOOST_CHECK_EQUAL(data, reference);
|
||||||
@@ -452,7 +452,7 @@ BOOST_AUTO_TEST_CASE(Production)
|
|||||||
st.set(p.first, p.second);
|
st.set(p.first, p.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
Opm::LogOutputHelper<double> helper(eclState, schedule, st);
|
Opm::LogOutputHelper<double> helper(eclState, schedule, st, "dummy version");
|
||||||
helper.production(0);
|
helper.production(0);
|
||||||
std::string data = trimStream(str);
|
std::string data = trimStream(str);
|
||||||
BOOST_CHECK_EQUAL(data, reference);
|
BOOST_CHECK_EQUAL(data, reference);
|
||||||
|
|||||||
Reference in New Issue
Block a user