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.
* 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)
* 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
* 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
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.
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.
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.)
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.
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).
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.
With the current implementation the THPRES pressure table is implemented
with a map indexed by the equilibration region indicies for the regions
in contact.
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.
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.
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'.
- 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.
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...