Skip to content

Commit

Permalink
Merge pull request #4395 from magnesj/minor-adjustments
Browse files Browse the repository at this point in the history
Minor adjustments
  • Loading branch information
bska authored Jan 6, 2025
2 parents 3a3b260 + 1b52437 commit 82a5575
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions opm/io/eclipse/ESmry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@ ESmry::ESmry(const std::string &filename, bool loadBaseRunData) :

void ESmry::read_ministeps_from_disk()
{
if (miniStepList.empty())
return;

auto specInd = std::get<0>(miniStepList[0]);
auto dataFileIndex = std::get<1>(miniStepList[0]);

Expand Down Expand Up @@ -841,6 +844,9 @@ std::vector<int> ESmry::makeKeywPosVector(int specInd) const

void ESmry::loadData() const
{
if (timeStepList.empty())
return;

std::fstream fileH;

auto specInd = std::get<0>(timeStepList[0]);
Expand Down
2 changes: 0 additions & 2 deletions opm/io/eclipse/RestartFileView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ Implementation(std::shared_ptr<ERst> restart_file,
return;
}

this->rst_file_->loadReportStepNumber(this->report_step_);

for (const auto& vector : this->rst_file_->listOfRstArrays(this->report_step_)) {
const auto& type = std::get<1>(vector);

Expand Down
9 changes: 7 additions & 2 deletions opm/io/eclipse/rst/header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ RstHeader::RstHeader(const Runspec& runspec_,
mday(intehead[VI::intehead::DAY]),
hour(intehead[VI::intehead::IHOURZ]),
minute(intehead[VI::intehead::IMINTS]),
microsecond(intehead[VI::intehead::ISECND]),
phase_sum(intehead[VI::intehead::PHASE]),
niwelz(intehead[VI::intehead::NIWELZ]),
nswelz(intehead[VI::intehead::NSWELZ]),
Expand Down Expand Up @@ -142,7 +141,13 @@ RstHeader::RstHeader(const Runspec& runspec_,
glift_min_wait(unit_system.to_si(M::time, doubhead[VI::doubhead::LOminInt])),
glift_rate_delta(unit_system.to_si(M::gas_surface_rate, doubhead[VI::doubhead::LOincrsz])),
glift_min_eco_grad(unit_system.to_si(M::identity, doubhead[VI::doubhead::LOminEcGrad]))
{}
{
if (intehead.size() > VI::intehead::ISECND) {
microsecond = intehead[VI::intehead::ISECND];
} else {
microsecond = 0;
}
}

std::time_t RstHeader::sim_time() const
{
Expand Down

0 comments on commit 82a5575

Please sign in to comment.