Loading...
Searching...
No Matches
Opm::ScheduleGrid Class Reference

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.

## Detailed Description

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.

## Constructor & Destructor Documentation

## ScheduleGrid() [1/4]

Opm::ScheduleGrid::ScheduleGrid | ( | CompletedCells & | completed_cells | ) |

explicit

Constructor.

Applies to main grid only. Will not be able to create new cell objects even if such objects are needed.

Parameters

  [in,out] | completed_cells | Intersected cells and associate properties. Reference to a mutable collection which must outlive the ScheduleGrid object.

## ScheduleGrid() [2/4]

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.

Parameters

  [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.

## ScheduleGrid() [3/4]

Opm::ScheduleGrid::ScheduleGrid | ( | const EclipseGrid & | ecl_grid,
|  | const FieldPropsManager & | fpm,
|  | CompletedCells & | completed_cells )

Constructor.

Will populate collection of completed cells if needed.

Parameters

  [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.

## ScheduleGrid() [4/4]

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.

Parameters

  [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.

## Member Function Documentation

## get_cell() [1/2]

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.

Parameters

  [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.

Returns
  Intersected cell object with associate property data.

## get_cell() [2/2]

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.

Parameters

  [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.

Returns
  Intersected cell object with associate property data.

## get_grid()

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.

## get_lgr_grid_number()

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.

Parameters

  [in] | lgr_label | LGR name. Nullopt for main grid.

Returns
  Numeric grid index.

## include_numerical_aquifers()

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.

Parameters

  [in] | num_aquifers | Run's collection of numerical aquifers.

The documentation for this class was generated from the following files:

- opm/input/eclipse/Schedule/ScheduleGrid.hpp
- opm/input/eclipse/Schedule/ScheduleGrid.cpp