My Project
|
Collection of intersected cells and associate properties for all simulation grids, i.e., the main grid and all LGRs in the simulation run. More...
#include <ScheduleGrid.hpp>
Public Member Functions | |
ScheduleGrid (CompletedCells &completed_cells) | |
Constructor. | |
ScheduleGrid (CompletedCells &completed_cells, std::vector< CompletedCells > &completed_cells_lgr, const std::unordered_map< std::string, std::size_t > &label_to_index_) | |
Constructor. | |
ScheduleGrid (const EclipseGrid &ecl_grid, const FieldPropsManager &fpm, CompletedCells &completed_cells) | |
Constructor. | |
ScheduleGrid (const EclipseGrid &ecl_grid, const FieldPropsManager &fpm, CompletedCells &completed_cells, std::vector< CompletedCells > &completed_cells_lgr, const std::unordered_map< std::string, std::size_t > &label_to_index_) | |
Constructor. | |
void | include_numerical_aquifers (const NumericalAquifers &num_aquifers) |
Make collection aware of numerical aquifers. | |
const CompletedCells::Cell & | get_cell (std::size_t i, std::size_t j, std::size_t k) const |
Retrieve particular intersected cell in main grid. | |
const CompletedCells::Cell & | get_cell (std::size_t i, std::size_t j, std::size_t k, const std::optional< std::string > &tag) const |
Retrieve particular intersected cell. | |
const EclipseGrid * | get_grid () const |
Retrieve underlying grid object. | |
int | get_lgr_grid_number (const std::optional< std::string > &lgr_label) const |
Translate LGR name into a numeric grid index. | |
Collection of intersected cells and associate properties for all simulation grids, i.e., the main grid and all LGRs in the simulation run.
Holds references to mutable collections of CompletedCells and will populate these as needed. Those collections must outlive the ScheduleGrid object.
|
explicit |
Constructor.
Applies to main grid only. Will not be able to create new cell objects even if such objects are needed.
[in,out] | completed_cells | Intersected cells and associate properties. Reference to a mutable collection which must outlive the ScheduleGrid object. |
Opm::ScheduleGrid::ScheduleGrid | ( | CompletedCells & | completed_cells, |
std::vector< CompletedCells > & | completed_cells_lgr, | ||
const std::unordered_map< std::string, std::size_t > & | label_to_index_ | ||
) |
Constructor.
Applies to main grid and any LGRs. Will not be able to create new cell objects even if such objects are needed.
[in,out] | completed_cells | Intersected cells and associate properties. Reference to a mutable collection which must outlive the ScheduleGrid object. |
[in,out] | completed_cells_lgr | Intersected cells and associate properties for all LGRs. Reference to a mutable collection which must outlive the ScheduleGrid object. Empty if there are no LGRs. |
[in] | label_to_index_ | Translation table from LGR names to LGR indices. Empty if there are no LGRs. |
Opm::ScheduleGrid::ScheduleGrid | ( | const EclipseGrid & | ecl_grid, |
const FieldPropsManager & | fpm, | ||
CompletedCells & | completed_cells | ||
) |
Constructor.
Will populate collection of completed cells if needed.
[in] | ecl_grid | Grid object with which to associate intersected cells. |
[in] | fpm | Property container from which to extract property data of intersected cells. |
[in,out] | completed_cells | Intersected cells and associate properties. Reference to a mutable collection which must outlive the ScheduleGrid object. |
Opm::ScheduleGrid::ScheduleGrid | ( | const EclipseGrid & | ecl_grid, |
const FieldPropsManager & | fpm, | ||
CompletedCells & | completed_cells, | ||
std::vector< CompletedCells > & | completed_cells_lgr, | ||
const std::unordered_map< std::string, std::size_t > & | label_to_index_ | ||
) |
Constructor.
Will populate collection of completed cells if needed.
[in] | ecl_grid | Grid object with which to associate intersected cells. |
[in] | fpm | Property container from which to extract property data of intersected cells. |
[in,out] | completed_cells | Intersected cells and associate properties. Reference to a mutable collection which must outlive the ScheduleGrid object. |
[in,out] | completed_cells_lgr | Intersected cells and associate properties for all LGRs. Reference to a mutable collection which must outlive the ScheduleGrid object. Empty if there are no LGRs. |
[in] | label_to_index_ | Translation table from LGR names to LGR indices. Empty if there are no LGRs. |
const Opm::CompletedCells::Cell & Opm::ScheduleGrid::get_cell | ( | std::size_t | i, |
std::size_t | j, | ||
std::size_t | k | ||
) | const |
Retrieve particular intersected cell in main grid.
May as a side effect insert a new element into the collection of CompletedCells, so this operation isn't really 'const' in the strict sense of the word. Will throw an exception if unable to create a new cell object when needed.
[in] | i | Cell's Cartesian I index relative to main grid's origin. |
[in] | j | Cell's Cartesian J index relative to main grid's origin. |
[in] | k | Cell's Cartesian K index relative to main grid's origin. |
const Opm::CompletedCells::Cell & Opm::ScheduleGrid::get_cell | ( | std::size_t | i, |
std::size_t | j, | ||
std::size_t | k, | ||
const std::optional< std::string > & | tag | ||
) | const |
Retrieve particular intersected cell.
May as a side effect insert a new element into the collection of CompletedCells, so this operation isn't really 'const' in the strict sense of the word. Will throw an exception if unable to create a new cell object when needed.
[in] | i | Cell's Cartesian I index relative to grid's origin. |
[in] | j | Cell's Cartesian J index relative to grid's origin. |
[in] | k | Cell's Cartesian K index relative to grid's origin. |
[in] | tag | Grid identifier. Nullopt for main grid, and an LGR name otherwise. |
const Opm::EclipseGrid * Opm::ScheduleGrid::get_grid | ( | ) | const |
Retrieve underlying grid object.
Usable only if the ScheduleGrid was created with a reference to a grid object.
int Opm::ScheduleGrid::get_lgr_grid_number | ( | const std::optional< std::string > & | lgr_label | ) | const |
Translate LGR name into a numeric grid index.
Will throw an exception if the name identifies an unknown LGR.
[in] | lgr_label | LGR name. Nullopt for main grid. |
void Opm::ScheduleGrid::include_numerical_aquifers | ( | const NumericalAquifers & | num_aquifers | ) |
Make collection aware of numerical aquifers.
Wells intersected in numerical aquifers should have properties from the numerical aquifer itself rather than from the main property container.
[in] | num_aquifers | Run's collection of numerical aquifers. |