Merge pull request #586 from osae/equil-update
EQLNUM in case of non-trivial ACTNUM
This commit is contained in:
commit
7e9fbcba4f
@ -541,6 +541,17 @@ namespace Opm
|
|||||||
* - @c depth Depth of gas-oil contact
|
* - @c depth Depth of gas-oil contact
|
||||||
* - @c press Gas-oil capillary pressure at gas-oil contact.
|
* - @c press Gas-oil capillary pressure at gas-oil contact.
|
||||||
* Capillary pressure defined as "P_gas - P_oil".
|
* Capillary pressure defined as "P_gas - P_oil".
|
||||||
|
*
|
||||||
|
* For the time being, items 7-9 of ECLIPSE's 'EQUIL' records are also
|
||||||
|
* stored here, but might (should?) eventually be moved elsewhere.
|
||||||
|
*
|
||||||
|
* - @c live_oil_table_index Indicates type of initialisation for live oil.
|
||||||
|
* Positive value points to corresponding Rs vs. depth table.
|
||||||
|
* - @c wet_gas_table_index Indicates type of initialisation for wet gas.
|
||||||
|
* Positive value points to corresponding Rv vs. depth table.
|
||||||
|
* - @c N Defines accuracy of initialisation computations. Currently
|
||||||
|
* only @c N=0 is supported.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
struct EquilRecord {
|
struct EquilRecord {
|
||||||
struct {
|
struct {
|
||||||
|
@ -311,11 +311,15 @@ namespace Opm
|
|||||||
const UnstructuredGrid& G )
|
const UnstructuredGrid& G )
|
||||||
{
|
{
|
||||||
std::vector<int> eqlnum;
|
std::vector<int> eqlnum;
|
||||||
if (newParserDeck->hasKeyword("EQLNUM")) {
|
if (newParserDeck->hasKeyword("EQLNUM")) {
|
||||||
const std::vector<int>& e = newParserDeck->getKeyword("EQLNUM")->getIntData();
|
eqlnum.resize(G.number_of_cells);
|
||||||
eqlnum.reserve(e.size());
|
const std::vector<int>& e =
|
||||||
std::transform(e.begin(), e.end(), std::back_inserter(eqlnum),
|
newParserDeck->getKeyword("EQLNUM")->getIntData();
|
||||||
std::bind2nd(std::minus<int>(), 1));
|
const int* gc = G.global_cell;
|
||||||
|
for (int cell = 0; cell < G.number_of_cells; ++cell) {
|
||||||
|
const int deck_pos = (gc == NULL) ? cell : gc[cell];
|
||||||
|
eqlnum[cell] = e[deck_pos] - 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// No explicit equilibration region.
|
// No explicit equilibration region.
|
||||||
|
Loading…
Reference in New Issue
Block a user