using global index when accessing pore volume in numerical aquifer

This commit is contained in:
Kai Bao
2020-11-26 20:39:50 +01:00
parent 65bde5d65b
commit b6fdb7cc8e
2 changed files with 13 additions and 3 deletions

View File

@@ -183,6 +183,13 @@ BlackoilAquiferModel<TypeTag>::init()
}
// Get all the carter tracy aquifer properties data and put it in aquifers vector
const auto& ugrid = simulator_.vanguard().grid();
const int number_of_cells = simulator_.gridView().size(0);
const int* global_cell = Opm::UgGridHelpers::globalCell(ugrid);
cartesian_to_compressed_ = cartesianToCompressed(number_of_cells,
global_cell);
const auto& connections = aquifer.connections();
for (const auto& aq : aquifer.ct()) {
aquifers_CarterTracy.emplace_back(connections[aq.aquiferID],
@@ -197,7 +204,7 @@ BlackoilAquiferModel<TypeTag>::init()
if (aquifer.hasNumericalAquifer()) {
for (const auto& elem : aquifer.numericalAquifers().aquifers()) {
this->aquifers_numerical.emplace_back(elem.second,
this->cartesian_to_compressed_, this->simulator_);
this->cartesian_to_compressed_, this->simulator_, global_cell);
}
}
}