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.
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.
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.
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.
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...