address the review comment of #373
This commit is contained in:
parent
bb40baa96f
commit
0cba93a283
@ -361,24 +361,13 @@ namespace Opm {
|
|||||||
void EclipseState::initMULTREGT(DeckConstPtr deck, ParserLogPtr /*parserLog*/) {
|
void EclipseState::initMULTREGT(DeckConstPtr deck, ParserLogPtr /*parserLog*/) {
|
||||||
EclipseGridConstPtr grid = getEclipseGrid();
|
EclipseGridConstPtr grid = getEclipseGrid();
|
||||||
|
|
||||||
std::vector<Opm::DeckKeywordConstPtr> keywords;
|
std::vector<Opm::DeckKeywordConstPtr> multregtKeywords;
|
||||||
{
|
if (deck->hasKeyword("MULTREGT"))
|
||||||
std::shared_ptr<Opm::GRIDSection> gridSection(new Opm::GRIDSection(deck) );
|
multregtKeywords = deck->getKeywordList("MULTREGT");
|
||||||
for (size_t index=0; index < gridSection->count("MULTREGT"); index++) {
|
|
||||||
DeckKeywordConstPtr multregtKeyword = gridSection->getKeyword("MULTREGT" , index);
|
|
||||||
keywords.push_back( multregtKeyword );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
std::shared_ptr<MULTREGTScanner> scanner =
|
||||||
if (Section::hasEDIT(deck)) {
|
std::make_shared<MULTREGTScanner>(m_intGridProperties,
|
||||||
std::shared_ptr<Opm::EDITSection> editSection(new Opm::EDITSection(deck) );
|
multregtKeywords);
|
||||||
for (size_t index=0; index < editSection->count("MULTREGT"); index++) {
|
|
||||||
DeckKeywordConstPtr multregtKeyword = editSection->getKeyword("MULTREGT" , index);
|
|
||||||
keywords.push_back( multregtKeyword );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::shared_ptr<MULTREGTScanner> scanner = std::make_shared<MULTREGTScanner>( m_intGridProperties, keywords);
|
|
||||||
|
|
||||||
m_transMult->setMultregtScanner( scanner );
|
m_transMult->setMultregtScanner( scanner );
|
||||||
}
|
}
|
||||||
|
@ -125,9 +125,8 @@ namespace Opm {
|
|||||||
MULTREGTScanner::MULTREGTScanner(std::shared_ptr<GridProperties<int> > cellRegionNumbers, const std::vector<DeckKeywordConstPtr>& keywords ) :
|
MULTREGTScanner::MULTREGTScanner(std::shared_ptr<GridProperties<int> > cellRegionNumbers, const std::vector<DeckKeywordConstPtr>& keywords ) :
|
||||||
m_cellRegionNumbers(cellRegionNumbers) {
|
m_cellRegionNumbers(cellRegionNumbers) {
|
||||||
|
|
||||||
for (int indx = 0; indx < keywords.size(); indx++){
|
for (size_t idx = 0; idx < keywords.size(); idx++)
|
||||||
addKeyword(keywords[indx]);
|
addKeyword(keywords[idx]);
|
||||||
}
|
|
||||||
|
|
||||||
MULTREGTSearchMap searchPairs;
|
MULTREGTSearchMap searchPairs;
|
||||||
for (std::vector<MULTREGTRecord>::const_iterator record = m_records.begin(); record != m_records.end(); ++record) {
|
for (std::vector<MULTREGTRecord>::const_iterator record = m_records.begin(); record != m_records.end(); ++record) {
|
||||||
|
@ -202,44 +202,6 @@ BOOST_AUTO_TEST_CASE(NotSupported) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Opm::DeckPtr createSimpleMULTREGTDeck() {
|
|
||||||
const char *deckData =
|
|
||||||
"RUNSPEC\n"
|
|
||||||
"\n"
|
|
||||||
"DIMENS\n"
|
|
||||||
"2 2 2 /\n"
|
|
||||||
"GRID\n"
|
|
||||||
"FLUXNUM\n"
|
|
||||||
"1 2\n"
|
|
||||||
"1 2\n"
|
|
||||||
"3 4\n"
|
|
||||||
"3 4\n"
|
|
||||||
"/\n"
|
|
||||||
"MULTNUM\n"
|
|
||||||
"1 2\n"
|
|
||||||
"1 2\n"
|
|
||||||
"3 4\n"
|
|
||||||
"3 4\n"
|
|
||||||
"/\n"
|
|
||||||
"MULTREGT\n"
|
|
||||||
"1 2 0.50 X ALL M / \n"
|
|
||||||
"/\n"
|
|
||||||
"MULTREGT\n"
|
|
||||||
"2 1 1.50 X ALL M / \n"
|
|
||||||
"/\n"
|
|
||||||
"MULTREGT\n"
|
|
||||||
"2 1 2.50 XYZ NNC M / \n"
|
|
||||||
"2 1 3.50 XYZ NONNC M / \n"
|
|
||||||
"/\n"
|
|
||||||
"EDIT\n"
|
|
||||||
"\n";
|
|
||||||
|
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
|
||||||
return parser->parseString(deckData) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static Opm::DeckPtr createCopyMULTNUMDeck() {
|
static Opm::DeckPtr createCopyMULTNUMDeck() {
|
||||||
const char *deckData =
|
const char *deckData =
|
||||||
"RUNSPEC\n"
|
"RUNSPEC\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user