Merge pull request #2375 from GitPaean/aquifer_cell_volumes

function to ouput the cell volume for numerical aquifer cells
This commit is contained in:
Joakim Hove
2021-03-22 22:33:30 +01:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -44,6 +44,8 @@ namespace Opm {
std::unordered_map<size_t, const NumericalAquiferCell*> allAquiferCells() const;
std::unordered_map<size_t, double> aquiferCellVolumes() const;
std::vector<NNCdata> aquiferNNCs(const EclipseGrid& grid, const FieldPropsManager& fp) const;
std::unordered_map<size_t, AquiferCellProps> aquiferCellProps() const;

View File

@@ -168,4 +168,13 @@ namespace Opm {
}
return nncs;
}
std::unordered_map<size_t, double> NumericalAquifers::aquiferCellVolumes() const {
std::unordered_map<size_t, double> cell_volumes;
const auto aquifer_cells = this->allAquiferCells();
for (const auto& [global_index, cell] : aquifer_cells) {
cell_volumes.insert(std::make_pair(global_index, cell->cellVolume()));
}
return cell_volumes;
}
}