Fixing segfault due to use of uninitialized grid properties

This commit is contained in:
Vegard Kippe
2023-09-18 11:43:33 +02:00
parent 6e0e302796
commit 6755ff8328

View File

@@ -1898,9 +1898,8 @@ std::vector<double> EclipseGrid::createDVector(const std::array<int,3>& dims, st
const size_t global_index = this->getGlobalIndex(i, j, k);
this->m_aquifer_cells.insert(global_index);
const double depth = record.getItem<AQUNUM::DEPTH>().defaultApplied(0) ?
this->computeCellGeometricDepth(global_index) : record.getItem<AQUNUM::DEPTH>().getSIDouble(0);
this->m_aquifer_cell_depths.insert_or_assign(global_index, depth);
if (! record.getItem<AQUNUM::DEPTH>().defaultApplied(0))
this->m_aquifer_cell_depths.insert_or_assign(global_index, record.getItem<AQUNUM::DEPTH>().getSIDouble(0));
}
}
}