Commit Graph

34 Commits

Author SHA1 Message Date
Arne Morten Kvarving
0a5c8a883d add bool parameter for non-complex type in DynamicState serialization 2020-03-19 09:26:03 +01:00
Arne Morten Kvarving
6a7560beaa add serialization template to DynamicState 2020-03-17 08:28:18 +01:00
Arne Morten Kvarving
6ee97a3f9a allow constructing DynamicState from tables
also add accessor and equality operator
2019-12-17 16:34:24 +01:00
Joakim Hove
b48f0affea Add size() method to DynamicState 2019-07-30 09:32:26 +02:00
Joakim Hove
94b160258e Remove old well implementation 2019-05-22 21:44:50 +02:00
Joakim Hove
d5f240050a Implement unique() method on DynamicState 2019-04-18 08:09:31 +02:00
Joakim Hove
9e40f3be4f Add DynamicState::find_if() 2019-04-03 19:46:07 +02:00
Joakim Hove
205c4a94db Add method DynamicState::find_not() 2019-03-18 10:34:18 +01:00
Joakim Hove
ad55655a08 Add method update_equal() to DynamicState 2018-11-14 09:34:13 +01:00
Joakim Hove
40fd922b6e Added iterator access to DynamicState<T> 2018-02-07 11:22:35 +01:00
Joakim Hove
1bc7f306d9 Added method DynamicState::update_elm() 2017-09-08 23:33:50 +02: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
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
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
Jørgen Kvalsvik
4f0e6703f0 Remove DynamicState's reliance on TimeMap.
DynamicState assumes the time map is fully populated and stores only
its size (which is the only property it cares about).
2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
6a0afc8a80 DynamicState::get returns const reference
dynamicstate.get returns a const reference rather than a by-value copy,
in order to be consistent with other container classes.

This introduces a problem for std::vector<bool> with its specialisation,
so all DynamicState<bool> instances has been replaced by
DynamicState<int> and explicit bool conversions.
2016-10-05 09:57:42 +02:00
Joakim Hove
2b1b74d3ae Added method back() to DynamicState() 2016-08-10 16:33:05 +02:00
Magne Sjaastad
393bdb42f2 VS2015 : Added missing include to ssize_t 2016-05-25 10:39:19 +02:00
Joakim Hove
b91c6fdbf3 Added find() method to DynamicState 2016-03-28 18:47:29 +02: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
10a211cf8b Fixed bug in DynamicState when updating default. 2015-08-06 16:58:43 +02:00
Joakim Hove
ddde52ad4c DynamicState::update() will return bool. 2015-07-24 12:40:48 +02:00
Joakim Hove
bc3b9837e0 Renamed DynamicState::add() -> Dynamicstate::update() 2015-07-24 12:40:47 +02:00
Joakim Hove
ef42deeb46 Added method globalReset() to DynamicState<T> 2015-06-08 14:15:03 +02:00
Fredrik Gundersen
15a86bbd34 Changed to be none destructive update of tuning 2015-05-05 12:34:44 +02:00
Fredrik Gundersen
4fb7c16f11 Remove comment 2015-05-05 08:38:09 +02:00
Fredrik Gundersen
b32ba60ec7 Added methods to change TUNING 2015-05-04 13:02:20 +02:00
Joakim Hove
8f277d56ca Added modifiable initial value to DynamicState 2015-04-20 14:04:10 +02:00
Joakim Hove
446a94e97f Added read only operator[] to DynamicState 2015-04-20 14:03:44 +02: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
77bed42742 Added method at() to the dynamicstate object to return a const reference. 2014-03-19 07:18:09 +01:00
Joakim Hove
3efe37dc37 Added size() property to DynamicState 2013-11-15 15:58:06 +01:00
Joakim Hove
ddc24927e4 Allow data to be added after the (currently) last TSTEP 2013-11-05 17:58:19 +01:00
Joakim Hove
6d30a6a7fa Added DynamicState template class 2013-11-05 12:57:25 +01:00