mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Use In-place Construction of PerforationData Objects
This is (slightly) faster than construct + copy.
This commit is contained in:
parent
a7ee48c2d5
commit
4a87dcf5f3
@ -350,14 +350,13 @@ initializeWellPerfData()
|
|||||||
hasFirstConnection = true;
|
hasFirstConnection = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto pd = PerforationData{};
|
auto& pd = well_perf_data_[well_index].emplace_back();
|
||||||
|
|
||||||
pd.cell_index = active_index;
|
pd.cell_index = active_index;
|
||||||
pd.connection_transmissibility_factor = connection.CF();
|
pd.connection_transmissibility_factor = connection.CF();
|
||||||
pd.satnum_id = connection.satTableId();
|
pd.satnum_id = connection.satTableId();
|
||||||
pd.ecl_index = connection_index;
|
pd.ecl_index = connection_index;
|
||||||
|
|
||||||
well_perf_data_[well_index].push_back(pd);
|
|
||||||
|
|
||||||
parallelWellInfo.pushBackEclIndex(connection_index_above,
|
parallelWellInfo.pushBackEclIndex(connection_index_above,
|
||||||
connection_index);
|
connection_index);
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,12 @@ namespace Opm
|
|||||||
/// Static data associated with a well perforation.
|
/// Static data associated with a well perforation.
|
||||||
struct PerforationData
|
struct PerforationData
|
||||||
{
|
{
|
||||||
int cell_index;
|
int cell_index{};
|
||||||
double connection_transmissibility_factor;
|
double connection_transmissibility_factor{};
|
||||||
double connection_d_factor;
|
double connection_d_factor{};
|
||||||
int satnum_id;
|
int satnum_id{};
|
||||||
/// \brief The original index of the perforation in ECL Schedule
|
/// \brief The original index of the perforation in ECL Schedule
|
||||||
std::size_t ecl_index;
|
std::size_t ecl_index{};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PerforationRates
|
struct PerforationRates
|
||||||
|
Loading…
Reference in New Issue
Block a user