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
The assumptions and interface for these two functions are distinct. Init
does not have to take a preallocated vector, but post processing
requires an input vector. Splits the two and changes their signatures.
Changes GridPropertyFunction's external interface to use references
rather than pointers. Means slightly less flexibility for tests, but
makes it clear what its dependencies are.
In an effort to make GridPropertyInitializer and
SatfuncPropertyInitializer functionality more maintainble, the
shared-ptr-to-base-class model has been replaced by a specialised
function object and free functions. This means:
* GridPropertyBaseInitializer and everything derived from it is gone
* All SatfuncPropertyInitializer code has been heavily rewritten to
emphasise dependencies. Now behaves like proper functions.
* EclipseState intialisation code is somewhat simpler
* Code is more declarative. In particular, some maybe unintended
behaviour has been discovered and described.
The new GridPropertyFunction processes grid cell property vectors and
replaces GridPropertyBase* inheritance model. This implementation
re-uses the old implementations as a transition.
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.
Changes the type of the stored supported keywords from pointer-to-vector
to vector. This accomplishes the following:
* we avoid an unecessary level of indirection
* we enable initializer list syntax for tests etc.
* GridProperties' interface properly communicates that it takes over
ownership of the passed keywords.
* it feels more natural in use as generating and returning a vector in a
free function can be returned and directly passed to the constructor
(the motivation for this change).
Bundled with this is the move of the supported keyword population into
using loops to exploit the similarities of families of keywords w.r.t.
GridProperties representation.
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).
To reduce compiler stress and be more explicit w.r.t. dependencies, all
files now includes only the keywords they need, instead of the
collection of all files.
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.
- Moves saturation function family check from EclipseState to
SatfuncPropertyInitializers
- Add tests in SatfuncPropertyInitializersTests
- Fixes error in the SatfuncPropertyInitializers implementation for
familyII