mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
writeECLData: avoid unnecessary temporary
This commit is contained in:
parent
301f01eb41
commit
a7740a3ef4
@ -54,7 +54,7 @@ namespace {
|
|||||||
createIntehead(const int nx, const int ny, const int nz, const int nactive,
|
createIntehead(const int nx, const int ny, const int nz, const int nactive,
|
||||||
const time_t time_stamp)
|
const time_t time_stamp)
|
||||||
{
|
{
|
||||||
const auto ih = ::Opm::RestartIO::InteHEAD{}
|
return ::Opm::RestartIO::InteHEAD{}
|
||||||
.dimensions (nx, ny, nz)
|
.dimensions (nx, ny, nz)
|
||||||
.numActive (nactive)
|
.numActive (nactive)
|
||||||
.unitConventions (Opm::UnitSystem::newMETRIC())
|
.unitConventions (Opm::UnitSystem::newMETRIC())
|
||||||
@ -62,9 +62,8 @@ namespace {
|
|||||||
.wellTableDimensions({ 0, 0, 0, 0, 0, 0, 0 })
|
.wellTableDimensions({ 0, 0, 0, 0, 0, 0, 0 })
|
||||||
.calendarDate (timeStamp(time_stamp))
|
.calendarDate (timeStamp(time_stamp))
|
||||||
.activePhases (phases())
|
.activePhases (phases())
|
||||||
.variousParam (201702, 100);
|
.variousParam (201702, 100)
|
||||||
|
.data();
|
||||||
return ih.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double>
|
std::vector<double>
|
||||||
@ -82,10 +81,9 @@ namespace {
|
|||||||
>(start), dur
|
>(start), dur
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto dh = ::Opm::RestartIO::DoubHEAD{}
|
return ::Opm::RestartIO::DoubHEAD{}
|
||||||
.timeStamp(ts);
|
.timeStamp(ts)
|
||||||
|
.data();
|
||||||
return dh.data();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user