mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
PerforationData: template Scalar type
This commit is contained in:
@@ -83,7 +83,7 @@ struct SetupTest {
|
||||
std::shared_ptr<Opm::Python> python;
|
||||
std::unique_ptr<const Opm::Schedule> schedule;
|
||||
std::unique_ptr<Opm::SummaryState> summaryState;
|
||||
std::vector<std::vector<Opm::PerforationData>> well_perf_data;
|
||||
std::vector<std::vector<Opm::PerforationData<double>>> well_perf_data;
|
||||
int current_timestep;
|
||||
};
|
||||
|
||||
@@ -125,8 +125,8 @@ BOOST_AUTO_TEST_CASE(TestStandardWellInput) {
|
||||
rateConverter.reset(new RateConverterType (phaseUsage,
|
||||
std::vector<int>(10, 0)));
|
||||
|
||||
Opm::PerforationData dummy;
|
||||
std::vector<Opm::PerforationData> pdata(well.getConnections().size(), dummy);
|
||||
Opm::PerforationData<double> dummy;
|
||||
std::vector<Opm::PerforationData<double>> pdata(well.getConnections().size(), dummy);
|
||||
for (auto c = 0*pdata.size(); c < pdata.size(); ++c) {
|
||||
pdata[c].ecl_index = c;
|
||||
}
|
||||
@@ -160,8 +160,8 @@ BOOST_AUTO_TEST_CASE(TestBehavoir) {
|
||||
// Compute reservoir volumes for RESV controls.
|
||||
rateConverter.reset(new RateConverterType (phaseUsage,
|
||||
std::vector<int>(10, 0)));
|
||||
Opm::PerforationData dummy;
|
||||
std::vector<Opm::PerforationData> pdata(wells_ecl[w].getConnections().size(), dummy);
|
||||
Opm::PerforationData<double> dummy;
|
||||
std::vector<Opm::PerforationData<double>> pdata(wells_ecl[w].getConnections().size(), dummy);
|
||||
for (auto c = 0*pdata.size(); c < pdata.size(); ++c) {
|
||||
pdata[c].ecl_index = c;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <opm/common/ErrorMacros.hpp>
|
||||
#include <opm/simulators/wells/GlobalWellInfo.hpp>
|
||||
#include <opm/simulators/wells/ParallelWellInfo.hpp>
|
||||
#include <opm/simulators/wells/PerforationData.hpp>
|
||||
#include <opm/simulators/wells/WellState.hpp>
|
||||
#include <opm/simulators/wells/SingleWellState.hpp>
|
||||
#include <opm/simulators/wells/SegmentState.hpp>
|
||||
@@ -106,7 +107,7 @@ struct Setup
|
||||
+ std::to_string(k) + " not found in grid (well = " + well.name() + ").");
|
||||
OPM_THROW(std::runtime_error, msg);
|
||||
} else {
|
||||
Opm::PerforationData pd;
|
||||
Opm::PerforationData<double> pd;
|
||||
pd.cell_index = active_index;
|
||||
pd.connection_transmissibility_factor = completion.CF();
|
||||
pd.connection_d_factor = completion.dFactor();
|
||||
@@ -132,7 +133,7 @@ struct Setup
|
||||
std::shared_ptr<Opm::Python> python;
|
||||
Opm::Schedule sched;
|
||||
Opm::SummaryState st;
|
||||
std::vector<std::vector<Opm::PerforationData>> well_perf_data;
|
||||
std::vector<std::vector<Opm::PerforationData<double>>> well_perf_data;
|
||||
};
|
||||
|
||||
namespace {
|
||||
@@ -581,7 +582,7 @@ BOOST_AUTO_TEST_CASE(TESTPerfData) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestSingleWellState) {
|
||||
Opm::ParallelWellInfo pinfo;
|
||||
std::vector<Opm::PerforationData> connections = {{0,1,1,0,0},{1,1,1,0,1},{2,1,1,0,2}};
|
||||
std::vector<Opm::PerforationData<double>> connections = {{0,1,1,0,0},{1,1,1,0,1},{2,1,1,0,2}};
|
||||
Opm::PhaseUsage pu;
|
||||
|
||||
// This is totally bonkers, but the pu needs a complete deck to initialize properly
|
||||
|
||||
Reference in New Issue
Block a user