Commit Graph

628 Commits

Author SHA1 Message Date
Atle Haugan
825e976566 New version based on feedback from code review 2014-01-29 19:39:33 +01:00
Atle Haugan
5dcc90cfa6 Cosmetic fix - adjusted spacing in header file 2014-01-28 10:11:35 +01:00
Atle Haugan
1530425598 Fixed bug in ParseTITLE.cpp 2014-01-28 10:06:58 +01:00
Atle Haugan
cd3d4f9337 First cut: TITLE keyword now being parsed correctly. 2014-01-28 10:01:11 +01:00
Atle Haugan
51ac683ef2 OPM-17: Fixed bug in END[INC] logic. 2014-01-24 13:16:37 +01:00
Atle Haugan
620774c3a4 Added missing files 2014-01-24 12:05:03 +01:00
Atle Haugan
f2c451e07a OPM-17: Minor change to END[INC] parsing + started to parse TITLE keyword 2014-01-24 11:18:07 +01:00
Atle Haugan
ef11a2331f OPM-17: First attempt to handle END and ENDINC keywords 2014-01-24 10:01:17 +01:00
Joakim Hove
581bf74e9a Changed int -> size_t many places. 2014-01-24 09:41:32 +01:00
Kristian Flikka
6229fd1250 Added functionality to get vector containing active / all wells 2014-01-22 14:40:10 +01:00
Kristian Flikka
a7d51c387e Merged upstream/master 2014-01-21 10:14:16 +01:00
Kristian Flikka
bd74a32c89 Added dimension to WELSPECS REF_DEPT, updated usage to query for SI 2014-01-21 10:10:05 +01:00
Kristian Flikka
3537de2209 Removed unused includes 2014-01-20 15:02:21 +01:00
Kristian Flikka
d09975e142 Introducing WELSPECS data in constructor to Wells. Throws if WELSPECS with different data for an existing well occurs 2014-01-20 14:52:30 +01:00
Andreas Lauser
ab65990653 avoid coverting the data of a deck item to SI multiple times
This resulted in _quadratic_ complexity if data points where retrieved
one-by-one. For the Norne case, this had the consequence that
retrieving the data for ZCORN (-> about 1M data points) took hours...
2014-01-18 13:34:12 +01:00
Andreas Lauser
a0785e37dd add dimension to the GCONTINJE keyword
these are required by the WellsManager for Norne
2014-01-17 11:37:29 +01:00
Andreas Lauser
123353b03c add the missing header files to CMakeLists.txt 2014-01-17 10:54:38 +01:00
Joakim Hove
fe01d09427 Added GPL header, with CopyRight Andreas Lauser to three tests. 2014-01-17 08:15:35 +01:00
Joakim Hove
4b35f79a35 Changed integer type int -> size_t throughout. 2014-01-17 08:13:08 +01:00
Andreas Lauser
9332f0edd1 PVTO: Add unit test and make the function names of the table class consistent with PVTG 2014-01-16 15:22:33 +01:00
Andreas Lauser
1c39df2d57 improve unit test for PVTG
now the data is parsed from a string specified in the source file
instead of a separate file, the PvtgTable utility class is tested and
the order of the fields in the JSON definition of PVTG is the same as
for that of PVTO.
2014-01-16 13:23:13 +01:00
Andreas Lauser
27efd0d1fa implement multi-region full tables
detecting empty records is still pretty hacky: When calculating the
number of flat items, we stop at the first item for which the default
was applied.

Also, this patch corrects the names of the columes used by the PVTG
keyword. (the first column is pressure, then comes Rv.)
2014-01-16 13:12:40 +01:00
Andreas Lauser
a2edc063b8 some additional dimensions for keywords used by the Norne case 2014-01-15 15:44:38 +01:00
Andreas Lauser
f9fa6d428c add additional dimensions for the keywords required to convert autodiff's sim_fibo_ad 2014-01-15 15:44:38 +01:00
Andreas Lauser
8d2ea3e0cd add wrapper classes for more eclipse keywords
these are convenient to convert everything required to rip out the old
parser of sim_fibo_ad. the concrete keywords are:

 - COMPDAT
 - EQUIL
 - GCONINJE
 - GCONPROD
 - GRUPTREE
 - WCONINJE
 - WCONINJ
 - WCONPROD
 - WELOPEN
 - WELSPECS
 - WGRUPCON

in the medium term it would be nice if these wrapper classes could be
automatically generated from the JSON keyword descriptions.
2014-01-15 15:44:38 +01:00
Andreas Lauser
93523a9a54 add wrapper class for "WCONINJ" 2014-01-15 15:44:38 +01:00
Andreas Lauser
f38e09f450 add a wrapper class for the "SPECGRID" keyword 2014-01-15 15:44:38 +01:00
Andreas Lauser
032916c1bd fix more of the annoying sign comparison warnings
hopefully all of them.
2014-01-15 12:52:12 +01:00
Andreas Lauser
0ed659de10 add a wrapper for records of the WELSPECS keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
6bf3e3ef8d add unit test for SGOF 2014-01-15 12:52:12 +01:00
Andreas Lauser
024774b605 add wrapper class for the START keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
34e39d2f31 add utility class for the 'TSTEP' keyword 2014-01-15 12:52:12 +01:00
Andreas Lauser
7a3755926b Units: add 'Timestep' dimension
the motivation for this is the 'TSTEP' eclipse keyword.

the reason why this dimension is not simply called 'Time' is that in
eclipse, different keywords might use different units, e.g. one
keyword could use seconds, another could use years while a third uses
days. As an added bonus, the used time units may be different for
different scales but identical in others (e.g., for one keyword times
might be specified in 'days' for the metric as well as for the
labscale, but in 'days' and 'hours' for another second keyword.)
2014-01-15 12:52:12 +01:00
Andreas Lauser
d261fcfe98 also constify the getSIDoubleData() method in DeckKeyword
in the item and in the record it already was marked as const, the
DeckKeyword class was forgotten during that excercise.
2014-01-15 12:52:12 +01:00
Andreas Lauser
079aa1417b move the SimpleMultiRecordTable class into its own files. 2014-01-15 12:52:12 +01:00
Andreas Lauser
8c83f0d8c1 remove the emacs and vim modelines
as it was decided that having editor-specific stuff in files is not
wanted in OPM. for emacs, a .dir-locals.el file is added to the
module's root directory which should have the same effect.
2014-01-15 12:52:12 +01:00
Andreas Lauser
6f721581bd add utility classes for some common keywords
the idea is to create a lightweight wrapper objects around
DeckKeywords which allow more convenient and more readable access to
the data. E.g. instead of

  std::vector outerColumnNames{"RV", "P", "BG", "MUG"};
  std::vector innerColumnNames{"P", "BG", "MUG"};
  Opm::FullTable pvtgTable(deck->getKeyword("PVTG"),
                           outerColumnNames, innerColumnNames);
  pvtgTable->getOuterTable()->getColumn(1);

one now better uses

  Opm::PvtgTable pvtgTable(deck->getKeyword("PVTG"));
  pvtgTable->getOuterTable()->getPressureColumn();

the idea for the other keywords is similar.
2014-01-15 12:52:12 +01:00
Andreas Lauser
d96b69c9ea add support for full-fledged tables 2014-01-15 12:52:12 +01:00
Andreas Lauser
3a3336028a add class for simple tables
This is intended for keywords like SWOF which currently is a big
vector of doubles but one needs to use the data in a column oriented
way.

This class is intended to be used like this:

Opm::DeckKeywordConstPtr swofKeyword = newParserDeck->getKeyword("SWOF");
Opm::SimpleTable swofTable(swofKeyword,
                           /*columns=*/std::vector<std::string>{"SW", "KRW", "KROW", "PCOW"},
                           /*recordIdx=*/table_num);
const std::vector<double>& sw = swofTable.getColumn(0);
// ...

what might be useful is to move the column names into the JSON
description of the keywords, but I could not find a way to go back to
the parser from the deck/keyword. maybe this is not even desireable as
decks might also be created by other means...

Also, a multi-record variant of the class is available. That one is
intended for keywords like PVTO where the first few items of each
record form a table (in the case of PVTO: Rs, pressure, Bo, and
viscosity for staturated oil) and the next entries constitute another
table (in the case of PVTO: pressure, Bo and viscosity for
undersaturated oil with the same RS factor as the first entry).

The second kind of tables can be constructed using the item-based
variant of SimpleTable.
2014-01-15 12:52:12 +01:00
Andreas Lauser
234625758c add dimensions to PVTG 2014-01-15 12:52:12 +01:00
Andreas Lauser
5fd51021d9 fix JSON of the PVTO keyword
the magic word is "num_tables" and not "size". with the latter it only
parses the first record of the keyword. Stupid me!
2014-01-15 12:52:12 +01:00
Andreas Lauser
9a09fa29af rename Parser::parse to Parser::parseFile and add Parser::parseData
Parser::parseData is quite useful for unit tests to prevent them
spilling files to everything. Also, what was formerly
Parser::parseFile has been renamed to Parser::parseStream and slightly
modified to not be specific for std::ifstream.
2014-01-10 14:51:56 +01:00
Joakim Hove
11f3ab1cb5 Merge pull request #85 from AtleH/KeywordDescriber
First attempt for the KeywordDescriber
2014-01-10 05:37:34 -08:00
Atle Haugan
53edd3bdc7 Renamed EclipseDataDoctor[.cpp] to opm-eclkwtest 2014-01-10 14:02:15 +01:00
Atle Haugan
5a34966a75 Renamed KeywordDescriber to opm-eclkw 2014-01-10 11:15:00 +01:00
Atle Haugan
ddd4563f97 Renamed from 'help' to 'description' for ParserKeyword and ParserItem 2014-01-10 10:57:35 +01:00
Atle Haugan
308cfda3c5 Improved some type usage based on code review feedback 2014-01-10 08:53:19 +01:00
Atle Haugan
3271156f9d First pull request candidate with help support 2014-01-09 13:33:32 +01:00
Atle Haugan
d3d6dc2c90 Added unit tests for ParserKeyword.help() 2014-01-09 08:42:27 +01:00
Atle Haugan
d837b688e6 Code cleanup in KeywordDescriber.cpp 2014-01-09 08:31:09 +01:00