Commit Graph

75 Commits

Author SHA1 Message Date
Pål Grønås Drange
672b240e00 fixed bug in Parser, use openRootFile 2016-05-03 15:22:34 +02:00
Pål Grønås Drange
d9eb3ebf86 Added test for IOConfigBaseName and fixed a self-introduced bug in E.S. 2016-05-03 14:07:01 +02:00
Pål Grønås Drange
5a7dcc5427 Made FaultCollection reference in State thereby fixing compiler warn 2016-05-03 13:22:57 +02:00
Joakim Hove
d32b409c27 Added Eclipse3DProperties PRESSURE, SGAS & SWAT. 2016-04-28 16:03:29 +02:00
Liu Ming
c42cfafc90 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
	opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp
2016-04-22 14:53:16 +08:00
Pål Grønås Drange
444f74642c Refactored EclipseState.getEclipseGrid to getInputGrid 2016-04-19 16:47:05 +02:00
Liu Ming
940d7f8449 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
2016-04-15 09:14:00 +08:00
Jørgen Kvalsvik
a705b0750b Query all IDs of (FIP) regions in State
Enable support for querying what fluid-in-point regions are defined in
the deck. For now the only interesting regions are the ones specified by
the FIPNUM keyword in the REGIONS section.

The implementation is somewhat inefficient (n log n over the number of
cells in the grid), but since this is likely to only be called when
default-expanding SUMMARY section keywords this isn't too bad, since the
implementation is so dead simple.
2016-04-14 09:30:55 +02:00
Liu Ming
d73b79c210 remove unused headers. 2016-04-14 09:38:54 +08:00
Pål Grønås Drange
7cffdb0ecf Renamed to get3DProperties() 2016-04-12 14:42:35 +02:00
Pål Grønås Drange
21f94c0606 TableManager and Deck are now used as references, hid GridProperties
* Added keyword "OPERNUM" to supported keywords in Eclipse3DProperties
* Updated tests to use Eclipse3DProperties API instead of GridProperties
* Moved init sequence of title into constructor
* ThresholdPressure and SimulationConfig now tasks Deck ref instead of shared_ptr
* Removed obsolete test and unused tests that tested gridProperties
* Refactor use of TableManager.  Is now a reference.
* Added non-const GridProperties.getKeyword(size_t i)
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
3680dfcb97 Substantial edits to Eclipse3DProperties and ptr's
* moved region-property from EclipseState to Eclipse3DProperties
* moved initGridopts from EclipseState to Eclipse3DProperties
* made several Eclipse3DProperties methods private
* removed obsolete tests
* replaced log with throw internally in private method---is domain_error
* removed typedef in SatFuncPropertyInitializers
* postprocessors take raw pointers, not shared_ptr---these will be phased out
* fixed return reference instead of copy several places
** gridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
** EclipseGrid and Section are references
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
e48b64c41d Substantial edits to Eclipse3DProperties
* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
2016-04-12 14:42:18 +02:00
chflo
f2ed1ba7ea Moved OpmLog from opm-parser to opm-common 2016-03-21 22:07:49 +01:00
Joakim Hove
a49f6ca00c Merge pull request #695 from jokva/refactor-grid-property-intializers
Refactor grid property intialisers
2016-03-21 21:33:39 +01:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Jørgen Kvalsvik
357e1e0e53 Move GridProperty< T > to source file
GridProperty< T > has only two sensible types to parametrise, int and
double. Moves the implementation and instantiation of GridProperty to
GridProperty.cpp. This also applies to GridPropertyInitializers which
has also been moved to source files.

Results are a cleaner header file (for reading & understanding the
interface) and faster compilations.
2016-03-01 08:46:23 +01:00
Andreas Lauser
cfd38b8a66 EclipseState: rename the has*GridProperty() methods to hasDeck*GridProperty()
the intend is to better reflect that these properties where explicitly
created in the deck. The old method names can still be used, but they
will result in deprecation warnings.
2016-02-19 13:36:57 +01:00
Andreas Lauser
442cdafeda EclipseState: make the grid properties returned by get*GridProperty() constant
that's because they are not supposed to be modified outside of the
EclipseState. (if they are, why? I'd consider that *very* bad style
since it is also possible to copy these objects and modify the copy
and also this was used nowhere within the OPM project.)

also, the has*Property() is now working as expected: if e.g.,

```c++
bool hasSatnum = eclipseState->hasIntProperty("SATNUM");
eclipseState->getIntProperty("SATNUM");
assert(hasSatnum == eclipseState->hasIntProperty("SATNUM"));
```

will now work for decks which does not explicitly specify
SATNUM. (before the getIntProperty() method silently created the
SATNUM property which caused hasIntProperty() to change its
opinion. With this patch, the property will still be silently created,
but has*Property() ignores it, i.e., that method could be renamed to
hasExplicit*Property() which -- as far as I understand this -- was its
intention from start.)
2016-02-19 13:35:45 +01:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
Joakim Hove
a85bac0034 Changes in const'ness 2015-12-21 15:30:14 +01:00
Joakim Hove
51e3aa82cc Update include path 2015-10-06 11:30:43 +02:00
chflo
a39eb28f2d OPM-218-fix: Changes in EclipseStateTests due to change in IOConfig logic 2015-09-25 10:29:39 +02:00
Joakim Hove
f365dae56e Internalize ParseMode in EclipseState. 2015-09-23 10:36:10 +02:00
Joakim Hove
f7283eb238 Changed THPRES implementation
With the current implementation the THPRES pressure table is implemented
with a map indexed by the equilibration region indicies for the regions
in contact.
2015-08-25 12:01:56 +02:00
Fredrik Gundersen
5421609e65 Fixed tests to work with the new TP behavior 2015-08-24 14:26:01 +02:00
chflo
920759b2e0 OPM-217: IOConfig - changes after review 2015-08-18 16:50:24 +02:00
chflo
de844ad4b9 OPM-217: Added support for RPTSOL RESTART keyword to IOConfig 2015-08-13 11:35:18 +02:00
Atgeirr Flø Rasmussen
3845e1c239 Suppress warnings from boost.
Done by using the disable_warnings.h and reenable_warnings.h headers.
In some cases also a little reordering of includes, to put all boost
includes in the warning-suppressed part.
2015-08-10 13:06:50 +02:00
Joakim Hove
3ffbe75680 !! Fixed test due to bug in ScheduleParsing
During the work with ParseMode the the construction of the Schedule
object has been changed; previously the complete deck was iterated in
the method iterateSchedulesection() - whereas the correct is to only
iterate over the keywords in the Schedule section. This has led to a
minor fixup in the testdata for this commit.

There are probably more bugs in the IOConfig object - because there
RPTRST / RPTSCHED / keywords in the SOLUTION section have been taken
into account twice, both as part of the SOLUTION and then again
incorrectly as part of the SCHEDULE section.
2015-08-06 15:12:54 +02:00
Joakim Hove
2582064c5d Added ParseMode::unsupportedScheduleGeoModifiers
- Added const ParseMode& argument to EclipseState() and Schedule()
   constructors.
 - Schedule constructor iterates through SCHEDULESection instance
   instead of Deck instance.
2015-08-06 15:12:48 +02:00
Joakim Hove
5e64d0f147 Added parser error for 'random text'.
Previously random text in the input deck which was not formatted as a
valid keyword header was simply ignored; i.e. this

   DIMENS
     10 10 10 /

   Mohaha random gibbersih - not according to any Spec.

   GRID

Would suprisingly parse just fine. This will now be handled according
to the ParseMode::randomText setting. Observe that as a side effect of
this it turned out that many of the test datasets had additional
terminating slashes which were now detected as 'ranomdText'.
2015-08-05 22:02:10 +02:00
Joakim Hove
733af54777 Added struct ParseMode to control parse behaviour.
- Introduce a very simple class ParseMode which will become a simple
   value object which can be used to control the behavior when errors
   and inconsistencies are encountered in the parse and EclipseState
   construction phases.

 - Added ParseMode instance as second argument to all parseXXX()
   methods.
2015-08-05 22:02:09 +02:00
chflo
7855af03a2 OPM-218: Fixed restart interval write for RPTRST 2015-08-02 22:03:09 +02:00
chflo
34211a34f1 OPM-212: Added nonconst getmethod of IOConfig to EclipseState 2015-06-15 11:50:04 +02:00
chflo
eb114ab03c OPM 199: Added IOConfig to EclipseState, and corresponding tests 2015-05-26 09:43:59 +02:00
Joakim Hove
9fb229ccd7 Replaced references to logger with OpmLog::addMessage() 2015-03-04 22:14:31 +01:00
Joakim Hove
f3419e8e61 Removed methods from CounterLog:
- Methods to get the number of Warning, Errors and Notes.
  - Methods to get the file/line/description content of a message.
2015-03-04 22:12:53 +01:00
Joakim Hove
25bff6480d Renamed MessageCounter -> CounterLog 2015-03-04 22:12:52 +01:00
Joakim Hove
d3277543ec Renamed existing Logger -> MessageCounter 2015-03-04 22:09:54 +01:00
Joakim Hove
8846d4b7b8 EclipseState: infer default region from GRIDOPTS 2015-03-04 11:11:13 +01:00
chflo
ef57b3f074 OPM-166: Internalized tresholdPressure in EclipseState 2015-02-12 16:51:04 +01:00
Joakim Hove
1f111668ac Removed stale comments - problem has been fixed. 2014-12-15 17:36:11 +01:00
Joakim Hove
b585655a5c Changes in the log class:
1. Moved to from eclipse/Parser -> eclipse/Log
 2. Renamed ParserLog -> OpmLog
2014-12-15 17:36:10 +01:00
Andreas Lauser
ea38a25af4 remove all trailing white space
this is just the result of

```
find -iname "*.[ch]pp" | xargs sed -i "s/ *$//"
find opm/parser/share/keywords -type f |  xargs sed -i "s/ *$//"
```

so if it causes conflicts with other patches, the others should get
priority. The rationale behind this patch is that some people tell
their editor to remove white space which leads to larger than
necessary patches...
2014-12-08 16:34:28 +01:00
Joakim Hove
5f7a7d8083 Removed EclipseState::hasGrid() method 2014-11-10 17:07:56 +01:00
Joakim Hove
ffce0408c4 Removed unused dummy grids in test deck. 2014-11-10 17:07:55 +01:00
Andreas Lauser
a7ba8af558 EclipseState: make specifying anything which requires a grid an error if no grid could be instantiated 2014-11-09 17:37:32 +01:00