commit
0b8adcbee3
@ -33,7 +33,7 @@ namespace Opm {
|
||||
msim::msim(const std::string& deck_file, const Parser& parser, const ParseContext& parse_context) :
|
||||
deck(parser.parseFile(deck_file, parse_context)),
|
||||
state(deck, parse_context),
|
||||
schedule(deck, state.getInputGrid(), state.get3DProperties(), state.runspec().phases(), parse_context),
|
||||
schedule(deck, state.getInputGrid(), state.get3DProperties(), state.runspec(), parse_context),
|
||||
summary_config(deck, schedule, state.getTableManager(), parse_context)
|
||||
{
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ namespace Opm {
|
||||
static std::time_t forward(std::time_t t0, int64_t seconds);
|
||||
static std::time_t mkdate(int year, int month, int day);
|
||||
static std::time_t mkdatetime(int year, int month, int day, int hour, int minute, int second);
|
||||
private:
|
||||
static const std::map<std::string, int>& eclipseMonthIndices();
|
||||
private:
|
||||
|
||||
std::vector<std::time_t> m_timeList;
|
||||
|
||||
|
@ -29,6 +29,26 @@
|
||||
|
||||
|
||||
namespace Opm {
|
||||
|
||||
namespace {
|
||||
const std::map<std::string, int> month_indices = {{"JAN", 1},
|
||||
{"FEB", 2},
|
||||
{"MAR", 3},
|
||||
{"APR", 4},
|
||||
{"MAI", 5},
|
||||
{"MAY", 5},
|
||||
{"JUN", 6},
|
||||
{"JUL", 7},
|
||||
{"JLY", 7},
|
||||
{"AUG", 8},
|
||||
{"SEP", 9},
|
||||
{"OCT", 10},
|
||||
{"OKT", 10},
|
||||
{"NOV", 11},
|
||||
{"DEC", 12},
|
||||
{"DES", 12}};
|
||||
}
|
||||
|
||||
TimeMap::TimeMap(std::time_t startTime) {
|
||||
m_timeList.push_back(startTime);
|
||||
}
|
||||
@ -127,28 +147,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
const std::map<std::string , int>& TimeMap::eclipseMonthIndices() {
|
||||
static std::map<std::string , int> monthIndices;
|
||||
|
||||
if (monthIndices.size() == 0) {
|
||||
monthIndices.insert( std::make_pair( "JAN" , 1 ));
|
||||
monthIndices.insert( std::make_pair( "FEB" , 2 ));
|
||||
monthIndices.insert( std::make_pair( "MAR" , 3 ));
|
||||
monthIndices.insert( std::make_pair( "APR" , 4 ));
|
||||
monthIndices.insert( std::make_pair( "MAI" , 5 ));
|
||||
monthIndices.insert( std::make_pair( "MAY" , 5 ));
|
||||
monthIndices.insert( std::make_pair( "JUN" , 6 ));
|
||||
monthIndices.insert( std::make_pair( "JUL" , 7 ));
|
||||
monthIndices.insert( std::make_pair( "JLY" , 7 ));
|
||||
monthIndices.insert( std::make_pair( "AUG" , 8 ));
|
||||
monthIndices.insert( std::make_pair( "SEP" , 9 ));
|
||||
monthIndices.insert( std::make_pair( "OCT" , 10 ));
|
||||
monthIndices.insert( std::make_pair( "OKT" , 10 ));
|
||||
monthIndices.insert( std::make_pair( "NOV" , 11 ));
|
||||
monthIndices.insert( std::make_pair( "DEC" , 12 ));
|
||||
monthIndices.insert( std::make_pair( "DES" , 12 ));
|
||||
}
|
||||
|
||||
return monthIndices;
|
||||
return month_indices;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user