Commit Graph

3018 Commits

Author SHA1 Message Date
Joakim Hove
9f312d2508 Merge pull request #1001 from atgeirr/add-more-tests-for-unit-constants
Add some tests for the unit constants.
2016-12-05 18:48:20 +01:00
Atgeirr Flø Rasmussen
31dd76a39f Add some tests for the unit constants. 2016-12-05 12:49:45 +01:00
Joakim Hove
9b6436204d Merge pull request #1000 from joakim-hove/zcorn-fixup-cell2cell
ZCORN adjustments considers cell-cell relation.
2016-12-05 10:41:47 +01:00
jokva
237658825b Merge pull request #995 from jokva/complnum-not-increase-multiple-records-same-compl
Only increment complnum when a completion is new
2016-12-05 09:46:33 +01:00
Joakim Hove
eb283a1434 ZCORN adjustments considers cell-cell relation. 2016-12-04 22:56:54 +01:00
Jørgen Kvalsvik
3051c76593 Changelog for November 2016 2016-12-02 11:51:22 +01:00
Jørgen Kvalsvik
745ac685f8 Reimagined DynamicState, leveraging std::vector
Changes DynamicState's implementation to, instead of maintaining a
current and initial element, rely on std::vector's capabilities. This
introduces a small change in semantics.

The new DynamicState will up-front allocate a vector of TimeMap.size,
and all entries will be the initial value. Lookup is then simplified to
vector.at. DynamicState.update will assgin to the given index and *all
consecutive elements* which will enforce the same invariant as before.

The behavorial change is that DynamicState will no longer throw on
update(x); update(y); where y < x. Instead, the resulting effect will be
that update(x) was never called.

This means that the Group.setInjectionPhase function behaves slightly
differently, because DynamicState.size is non-sensical. If multiple
distinct injection phases are specified for a group inside the same time
step then the last specified phase will be used. The comment has been
updated accordingly.
2016-12-02 07:48:14 +01:00
Jørgen Kvalsvik
e0180bf35a Fix == for prod/inj properties; add ostream <<
Fixes operator== for production properties which didn't take prediction
into account. Additionally added the operator<< with iostream for
unit testing and debugging purposes.
2016-12-01 16:23:01 +01:00
Jørgen Kvalsvik
8d240c02f6 OilVaporizationProperties.defined
Extend the interface of OilVaporizationProperties to not rely on
checking the enum for existence checks. This facilities checking
hasOilVaporizationProperties which rely on DynamicState.size.
2016-12-01 16:23:01 +01:00
Jørgen Kvalsvik
7bb6b1ba62 Drop unecessary make_shared 2016-12-01 16:17:25 +01:00
Jørgen Kvalsvik
847084234b Schedule.modifier_deck is no longer shared_ptr 2016-12-01 16:17:25 +01:00
Jørgen Kvalsvik
fbd833125e EclipseState.schedule is no longer shared_ptr 2016-12-01 16:17:25 +01:00
Jørgen Kvalsvik
946cc18f3a Schedule.wells are no longer shared_ptrs 2016-12-01 16:17:25 +01:00
Jørgen Kvalsvik
e8d018e045 Schedule.timeMap is no longer shared_ptr 2016-12-01 16:17:25 +01:00
Jørgen Kvalsvik
21eb728966 Only increment complnum when a completion is new
Fixes a bug where completions specified after a record just updated a
completion would be assigned a too high completion number.

COMPDAT can be used to re-specify some properties of connections, in
which case they're not actually new completions and the completion
number shouldn't change.
2016-12-01 14:10:07 +01:00
Joakim Hove
c01220f178 Merge pull request #991 from jokva/correct-conversion-gas-oil-ratio-field
Correct unit for Field gas-oil+oil-gas ratio
2016-12-01 09:54:35 +01:00
Jørgen Kvalsvik
b7ad522043 Register completion number from COMPDAT
Connections are given a completion number starting at 1 implicitly when
they're first defined by the COMPDAT keyword. Until now this number has
been ignored.

The number itself isn't *used* for anything with this patch, just stored
and accessible.
2016-11-30 19:27:38 +01:00
Arne Morten Kvarving
4ede95d587 removed unused variable 2016-11-29 21:37:18 +01:00
Jørgen Kvalsvik
18de2c0751 Correct unit for Field gas-oil+oil-gas ratio
The FIELD units don't use identity in their converison from SI, as the
unit is Mscf/stb rather than m3/m3.
2016-11-29 13:52:50 +01:00
Joakim Hove
c022809073 Added functionality to "fix" ZCORN problems. 2016-11-23 14:59:48 +01:00
Joakim Hove
d01cf74dc8 Merge pull request #987 from jokva/move-head-i-loc
Well.headI/J can change on timesteps
2016-11-22 23:12:03 +01:00
Jørgen Kvalsvik
d6f51c5508 Well.refDepth can change on timesteps
The reference depth is not a static property on first creation, but can
change on subsequent WELSPECs. Wrap the ref depth in DynamicState to
handle this.
2016-11-22 14:21:19 +01:00
Jørgen Kvalsvik
5c1cf47966 Well.headI/J can change on timesteps
Well.headI and Well.headJ was assumed to be fixed on first declaration,
and that all subsequent changes of this position was an error. This
turns out not to be the case, so the I/J positions are made dynamic.
2016-11-22 14:13:07 +01:00
Markus Blatt
465af132e4 Fixes warning about parameters shadowing members of this.
/home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp: In member function ‘void Opm::GroupTree::update(const string&, const string&)’:
/home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp:39:76: warning: declaration of ‘parent’ shadows a member of 'this' [-Wshadow]
 void GroupTree::update( const std::string& name, const std::string& parent ) {
                                                                            ^
/home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp: In member function ‘std::vector<std::basic_string<char> > Opm::GroupTree::children(const string&) const’:
/home/mblatt/src/dune/opm/opm-parser/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp:76:77: warning: declaration of ‘parent’ shadows a member of 'this' [-Wshadow]
 std::vector< std::string > GroupTree::children( const std::string& parent ) const {
2016-11-21 10:13:55 +01:00
Joakim Hove
62edf9a394 Merge pull request #983 from joakim-hove/runspec-tabdims
Changes in Tabdims construction:
2016-11-18 10:48:30 +01:00
Joakim Hove
5ebddba40e Changes in Tabdims construction:
1. Removed Tabdims(int,int,int, ....) constructor and added
    Tabdims(Deck) constructor.

 2. Added Tabdims member to Runspec( ) object.

 3. Changed std_shared_ptr<Tabdims> to Tabdims member in TableManager.
2016-11-18 10:48:02 +01:00
Jørgen Kvalsvik
e5b5c3c1c4 Simplified DynamicVector implementation 2016-11-17 14:55:23 +01:00
Jørgen Kvalsvik
6826043b02 Replace WellSet pointers with set-of-names
The WellSet class is replaced by std::set, allowing predictable copy
semantics of Group. This change has rather few consequences as accessing
a well through a wellset was hardly ever done.

Getting hold of the corresponding well instance will now have to be done
via a Schedule instance - however, this simplifies the dependency graph
by severing the edge between the Group object and Well objects.
2016-11-17 12:48:42 +01:00
Joakim Hove
b13ec43635 Added inner table iterators to PvtxTable. 2016-11-16 19:53:54 +01:00
Joakim Hove
a7ff6c064d Merge pull request #976 from jokva/group-tree-as-implicit-tree
Replace explicit GroupTree with ordered strings
2016-11-16 13:25:19 +01:00
Jørgen Kvalsvik
70e7b02043 DeckItem.push_back overload for size = 1
DeckItem.push_back using insert for 1 element turns out to be very
expensive and caused a performance degredation.
2016-11-15 15:33:27 +01:00
Jørgen Kvalsvik
cc677580f2 Replace TimeMap member with int in Well 2016-11-15 15:33:02 +01:00
Jørgen Kvalsvik
0b7ca057dd Remove internal shared_ptrs in Well 2016-11-15 15:33:02 +01:00
Jørgen Kvalsvik
827adad4db Make DynamicState.find const
Probably an oversight in the original design; it has always had const
behaviour.
2016-11-15 15:33:02 +01:00
Joakim Hove
76f5a4d78b Handle keyword OPERATE. 2016-11-15 08:45:04 +01:00
Joakim Hove
0b9843bc10 Added defaults + some rename in keyword OPERATE. 2016-11-15 08:45:04 +01:00
Joakim Hove
2b53bc4c43 Add begin() and end() to Box. 2016-11-15 08:45:04 +01:00
Jørgen Kvalsvik
bfa108deef Replace explicit GroupTree with ordered strings
Replaces The GroupTree + GroupTreeNode classes building an explicit tree
of named nodes with a sorted vector of { name, parent-name } pairs that
builds an implicit tree. Provides the same semantics as the previous
group tree implementation, but with less code and copying for free.
2016-11-11 13:21:20 +01:00
Jørgen Kvalsvik
6869210730 Only give needed source files to createKeywordList
The ahead-of-time JSON-to-C++-object compilation step does not need all
the source files as it was passed. Reduces the set of source files
compiled into the createKeywordList binary to just the files it needs.
2016-11-11 13:15:13 +01:00
Arne Morten Kvarving
10b2218c0c fixed: missing installation of Typetools.hpp 2016-11-11 11:24:36 +01:00
Joakim Hove
f3f87b5935 Merge pull request #950 from jokva/stack-allocd-items
Stack allocd items
2016-11-11 11:07:43 +01:00
Pål Grønås Drange
d8400f05bd Minor fixes unrelated to PR:
* Implemented missing method "name" in TableColumn.cpp
* add inline to method in RestartConfig to remove warning
* Whitespace changes
2016-11-09 12:29:08 +01:00
Jørgen Kvalsvik
a22196546a ParserItem no longer requires heap alloc
Redesign of ParserItem so that its sum type nature no longer mandates
indirection, but rather a tag check on all operations. Because of this,
ParserRecords can now store ParserItems directly, and iterators are no
longer iterators to pointers, but behave like normal vector iterators.
2016-11-07 12:24:38 +01:00
Jørgen Kvalsvik
fdb772e075 DeckItem without internal inheritance.
Replaces the internal inheritance + unique_ptr scheme to a flat sum type
similar scheme that uses a tag to determine which operations are legal,
rather than using the indirection itself as a tag.
2016-11-07 12:24:38 +01:00
Joakim Hove
63a04b6d0a Merge pull request #953 from ANerd/cond_prod_control
Only add present phases from WCONHIST
2016-11-03 15:44:30 +01:00
Anders Matheson
82b989079e Get phases from deck in Schedule python interface 2016-11-03 13:12:34 +01:00
Anders Matheson
276a599e30 Assume all phases in Schedule for python bindings 2016-11-03 10:31:41 +01:00
Markus Blatt
e20f521151 Support externally installed cJSON.
Using an external cJSON installed under /usr/include was not possible before
as the cJSON headers within opm were still used due to relative paths.
With this commit move the copied cJSON source to external/cjson and
thus prevent them to be found if an externally installed cJSON is there.
2016-11-02 20:10:35 +01:00
Joakim Hove
49a6166340 Merge pull request #963 from jokva/ignore-skiprest
Ignore SKIPREST
2016-11-02 18:00:23 +01:00
Anders Matheson
eacbade0c1 Remove default Phases from Schedule constructor 2016-11-02 15:50:39 +01:00