This commit introduces a new helper function
void GridProperty<>::setElement(i, val, dflt)
that handles paired assignments to 'm_data' and 'm_defaulted'[%].
This simplifies the bookkeeping and implementation of the various
assignment and value operations.
While here, also add a unit test to demonstrate expected behaviour
of the m_defaulted flag. The only really questionable setting is
what happens if the deck applies a relative operator (e.g., ADD or
MULTIPLY) to a value that would otherwise be defaulted. In the
current implementation the m_defaulted flag will remain set in this
case, but it arguably should be switched to unset (false).
[%]: Suggested by [at]akva2
This commit adds a comment block to the new
setPostProcessor
member function, explaining the reasoning behind its excistence and
remarking on the fact that the ability to replace the post-processor
is essentially a hack. The hack suggests that we need to rethink
our handling of (3D) grid properties.
This is a special purpose hook that is mainly intended to add a
post-processor after the keyword information is established only if
certain conditions are satisfied (e.g., if certain keyword relations
like the run using 'SGOF' tables hold).
Immediate use case is to install a post-processor for SOGCR to
subtract the scaled connate water saturation from defaulted SOGCR
values if the simulation run uses family I (SWOF/SGOF) saturation
function descriptions.
This commit alters the post-processor API to accept a vector<bool>
of defaulted flags (true if defaulted, false if explicitly
assigned). This, in turn, enables running the post-processor only
on defaulted (or assigned) property values.
Update existing post-processor implementation to honour the new
calling conventions.
This commit adds a new data member (GridProperty<T>::m_defaulted)
that keeps track of whether or not a particular data item has been
implicitly assigned from the input deck. GridProperty::setDataItem
assigns 'false', while the constructor initialises 'm_defaulted' to
true for all Cartesian cells.
The main objective is to be able to apply a post processor only to
those cells for which the input deck does not supply an explicit
value.
If the keyword is present then the transimissibilities of the corresponding NNC
entries will be scalled with the factor specified via EDITNNC. Multiple entries
for the same cell pairs are allowed and will result in multiple scalings.
Cell pairs specified in EDITNNC that are not present in NNC are silently ignored.
The deckAssigned() query method is added to the GridProperty class to enable the
simulator to check whether a property has been explicitly assigned in the deck
or autocreated through the use of some EDIT operators like MULTIPLY.
Allow keywords that can be default constructed to do so when acted uppon
by MULTIPLY and ADD.
Setting the "MULTIPLY" keyword to act on "PORV" would throw an
exception:
"Program threw an exception: Fatal error processing MULTIPLY keyword.
Tried to scale not defined keyword PORV"
Now the initPORV is called if the MULTIPLY keyword is parsed with PORV.
Note that MULTIPLY for PORV will also work in the GRID section (which it
does not in eclipse), but will fail if it is placed prior to setting a
variable PORV depends on.
Commit authored by Sveinung Styve Rundhovde and Lars Petter Hauge
For cylindrical grids based on the keyword set DRV, DTHETAV, DZV and
TOPS the EclipseGrid implementation will create a cornerpoint
representation of the grid.
Tune the makefile according to new principles, which adds a few bells
and whistles and for clarity.
Synopsis:
* The dependency on opm-common is completely gone. This is reflected in
travis and appveyor as well. No non-kitware cmake modules are used.
* Directories are flattened, quite a bit - source code is located in the
lib/ directory if it belongs to opm-parser, and external/ if third
party.
* The sibling build feature is implemented through cmake's
export(PACKAGE) rather than implicitly looking through source files.
* Targets explicitly set required public and private include
directories, compile options and definitions, which cmake will handle
and propagate
* opm-parser-config.cmake for downstream users is now provided.
* Dependencies are set up using targets. In the future, when cmake 3.x+
can be used, these should be either targets from newer Find modules,
or interface libraries.
* Fewer system specific assumptions are coded in, instead we assume
cmake or users set up system specific details.
* All module wide configuration and looking up libraries is handled in
the root makefile - all sub directories only set up libraries and
compile options for the module in question.
* Targets are defined and links handled transitively because cmake now
is told about them. ${module_LIBRARIES} variables are gone.
This is largely guided by the principles outlined in
https://rix0r.nl/blog/2015/08/13/cmake-guide/
Most source files are just moved - if they have some content change then
it's nothing more than include fixes or similar in order to make them
compile.
The GridProperties::hasDeckKewyord( ) will return false for keywords
which have only been auto generated. Have also renamed
getInitializedkeyword( ) to getDeckKeyword( ).
The GridProperties.hasKeyword( ) would previously return false if a
keyword in the properties container had been auto created. This is now
changed, the hasKeyword( ) implementation will not consider whether a
keyword has been autocreated or not.
Have also added a void method GridProperties.assertKeyword( kw ) which by
side effect will ensure that the container contains the keyword kw.
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.