Commit Graph

2344 Commits

Author SHA1 Message Date
Magne Sjaastad
393bdb42f2 VS2015 : Added missing include to ssize_t 2016-05-25 10:39:19 +02:00
Joakim Hove
21de4055bc Merge pull request #814 from jokva/unit-system-improvements
Unit system improvements
2016-05-24 11:48:54 +02:00
Joakim Hove
5cf9932b1d Refactored Eclipse3DProperties
- Moved the handling of keywords from Eclipse3DProperties to
   GridProperties<T>.

 - The GridProperty<T> postprocessor is invoked from
   GridProperties<T>::getKeyword() method. The question of whether the
   postprocessor should be invoked or not is determined by the
   overload:

     public:
       const GridProperty<T>& getKeyword(const std::string) const;

     private:
       GridProperty<T>& getKeyword(const std::string);

   The public const overload will run the postprocessor, whereas the
   non-const private overload should (will) be used in the construction
   phase and should not invoke the post processor.

 - The two pass passing where we first internalize integer keywords and
   then floating point keywords has been removed.

 - Code in GridProperties has mainly been moved to GridProperties.cpp
   with explicit instantiation for int and double.
2016-05-24 09:50:15 +02:00
Joakim Hove
1a0a822cbb Renamed member variable. 2016-05-24 08:50:56 +02:00
Joakim Hove
8f70ee7d0b Removed GridProperties::getKeyword( size_t ) 2016-05-24 08:50:56 +02:00
Joakim Hove
c7d4c7fff2 Added ACTNUM postprocessor.
Added a post processor to the ACTNUM property which will set ACTNUM to
zero for all cells with PORV == 0.
2016-05-24 08:50:56 +02:00
Joakim Hove
4c610eb040 GridProperty::runPostProcessor() is public. 2016-05-24 08:50:56 +02:00
Joakim Hove
58f9837eac Call resetACTNUM() unconditionally. 2016-05-24 08:50:56 +02:00
Joakim Hove
3035a89b71 Add test of PORO == 0 -> ACTNUM = 0 behavior. 2016-05-24 08:50:56 +02:00
Jørgen Kvalsvik
5dde6323e8 Alternative 'getUnits' to 'getDeckUnitSystem'
getDeckUnitSystem largely implies getting an *identifier* to the unit
system used in the deck, where the actual object returned has conversion
features to/from SI as well. Augment EclipseState's interface with the
simpler getUnits name.
2016-05-23 15:12:12 +02:00
Jørgen Kvalsvik
1c7e7e08c6 Move to_si/from_si into UnitSystem
UnitSystem already offered similar functionality, but via string-map
lookup and a very clunky interface. Offer simple to/from methods as an
addition.
2016-05-23 15:11:33 +02:00
Jørgen Kvalsvik
6affc5f9c1 Split Well/Group; ignore unknown names
Occasionally the SUMMARY section requests wells or groups that aren't
defined in the Deck. Ignore these names (which would typically crash
downstream) and carry on.
2016-05-23 10:32:41 +02:00
Joakim Hove
6882311984 Merge pull request #810 from jokva/schedule-posix-start-time
Support Schedule::posixStartTime()
2016-05-19 14:07:28 +02:00
Joakim Hove
5ef7519115 Merge pull request #806 from pgdr/nnc-input
Renamed getNNC() to getInputNNC() avoids confusion
2016-05-19 13:44:06 +02:00
Jørgen Kvalsvik
b32c9130a0 Remove defaultStartDate as a public property 2016-05-19 12:39:22 +02:00
Jørgen Kvalsvik
a44679f58e Support Schedule::posixStartTime()
Allow clients to query time as time_t, not boost::posix::ptime
2016-05-19 12:15:51 +02:00
Pål Grønås Drange
ded7759e10 Merge pull request #809 from jokva/eclipse-state-copy-unit-system
EclipseState stores copy of Deck's UnitSystem
2016-05-18 12:09:39 +02:00
Jørgen Kvalsvik
92656f7e6a EclipseState stores copy of Deck's UnitSystem
With the introduction of Parser::parse methods and the relaxed lifetime
requirement of Deck (i.e. users no longer need to keep a Deck instance
around for EclipseState to be considered valid), the UnitSystem cannot
be a reference, but must rather be stored.

Since the unit system is immutable once the deck is read this is
unproblematic. It's also small and cheap to copy.
2016-05-18 09:39:14 +02:00
Liu Ming
cb74ccf589 adapt API changes in ParseContext. 2016-05-14 09:15:27 +02:00
Liu Ming
ca085fa6a2 remove ParseContext. 2016-05-14 09:15:26 +02:00
Liu Ming
14c33394f4 add MessageContainer argument for logging messages. 2016-05-14 08:42:40 +02:00
Liu Ming
c8625b2fc0 log messages to message container. 2016-05-14 08:42:40 +02:00
Liu Ming
e538ed43dc log messages before handleError. 2016-05-14 08:42:40 +02:00
Pål Grønås Drange
607e4e2b9a Renamed getNNC() to getInputNNC() avoids confusion
* The NNC in the eclipse state is and will always be the nnc from deck
* updated tests
2016-05-13 14:09:29 +02:00
Joakim Hove
e20bdc3788 Merge pull request #805 from totto82/add_spe9_cp_group
Add SPE9_CP_GROUP as test case for the parser
2016-05-13 11:04:47 +02:00
Tor Harald Sandve
7f7c840364 Add SPE9_CP_GROUP as test case for the parser 2016-05-12 11:37:04 +02:00
Jørgen Kvalsvik
dfb9a629e4 Support for eclipse -> SI unit conversions 2016-05-12 11:30:51 +02:00
Joakim Hove
64fe528f6d Merge pull request #801 from pgdr/deckkeyword-throw-name
Throw now contains name() of deckKeyword
2016-05-10 15:23:04 +02:00
Pål Grønås Drange
3124c9569c Throw now contains name() of deckKeyword 2016-05-10 14:45:35 +02:00
Jørgen Kvalsvik
99829e1696 Ignore RPTONLY 2016-05-10 14:43:19 +02:00
Jørgen Kvalsvik
42992d9b91 Add missing member constructor call. 2016-05-10 10:08:29 +02:00
Joakim Hove
afc76ccd7e Merge pull request #797 from jokva/summary-config-from-eclipsestate
Summary config from eclipsestate
2016-05-10 09:55:11 +02:00
Jørgen Kvalsvik
822ac1bcb2 SI-to-unitsystem conversion tables. 2016-05-09 15:10:23 +02:00
Jørgen Kvalsvik
3106e6ae8a Create SummaryConfig object in EclipseState 2016-05-09 15:10:21 +02:00
Jørgen Kvalsvik
00066e225f Special-case handling of RUNSUM keyword
The RUNSUM keyword is identified as a Region-type keyword, but isn't
really. It's to be ignored by the SummaryConfig construction.
2016-05-09 15:09:43 +02:00
Jørgen Kvalsvik
63fd998e2a Allow Section objects to be empty
Preserves expect Deck-like behaviour by allowing empty sections.
2016-05-09 15:09:43 +02:00
Jørgen Kvalsvik
79a8f6efc5 Clean up initialisation order in EclipseState
The previous order was inaccurate and confusing. Clean up member and
initialisation order to more closely reflect the actual intent and
behaviour.
2016-05-09 15:09:42 +02:00
Jørgen Kvalsvik
0aa3e533f8 Remove unused EclipseGrid argument from Compsegs 2016-05-09 14:56:04 +02:00
Jørgen Kvalsvik
caa10631b0 IOConfig::handle* takes references over shared_ptr 2016-05-09 14:56:04 +02:00
Jørgen Kvalsvik
1d5ae5ea55 EclipseGrid::getNXYZ which returns xyz as array 2016-05-09 14:55:24 +02:00
Jørgen Kvalsvik
ee8710d3cb SummaryConfig does not require EclipseState
Rewrite construction to accept EclipseState components instead of the
full state. Enables having SummaryConfig as a member in EclipseState.
2016-05-09 14:55:24 +02:00
Jørgen Kvalsvik
28ae15cf0f Move getRegions into 3DProperties 2016-05-09 14:55:24 +02:00
Joakim Hove
3289b046c3 Check deck for ACTNUM keyword. 2016-05-09 09:44:31 +02:00
Pål Grønås Drange
091dc196f3 Added parse functions for Parser, for simpler creation of state and grids 2016-05-06 12:21:41 +02:00
Pål Grønås Drange
b8b1ba9528 ParseContext is now a member of EclipseState
* EclipseState now copies input ParseContext and keeps it as member
* Made the argument (ParseContext) default as ParseContext()
* Now you can make a new EclipseState with only deck as argument
* Removed test that tested address equality of ParseContext objects
2016-05-06 11:37:26 +02:00
Joakim Hove
350297e8ec Merge pull request #792 from jokva/bugfixes
Bugfixes
2016-05-04 09:30:30 +02:00
Jørgen Kvalsvik
1f2c2ba98d Name cases where TITLE is unset
When the TITLE keyword was present in the deck, but no parameter was
given the parser would consume the next keyword as the simulation TITLE.
Override this by writing a default TITLE if it's unset.
2016-05-03 15:42:30 +02:00
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
Jørgen Kvalsvik
0966a9cb8c Fix RawKeywor tests to reflect assumptions 2016-05-03 13:39:36 +02:00