Commit Graph

2602 Commits

Author SHA1 Message Date
Bård Skaflestad
7d67ddc099 UnitSystem: Add skeleton implementation of LAB conventions
This commit adds conversion factors for the ECL LAB unit
conventions--notably Atmospheres for pressures, Hours for time,
Grams for mass, and cubic centimetres for volumes.
2016-09-01 12:21:53 +02:00
Joakim Hove
aa99e3e39c Merge pull request #904 from qilicun/fix-msg-order-issues
Argument of warning() method is msg, filename, linenumber.
2016-08-29 10:02:52 +02:00
Liu Ming
756b4d1edd argument of warning() method is msg, filename, linenumber. 2016-08-29 14:01:14 +08:00
Joakim Hove
b6c4043f20 Merge pull request #902 from joakim-hove/gridproperty-cells
Scan a property and return cells equal to a value.
2016-08-26 11:04:42 +02:00
Joakim Hove
bea47dc06d Scan a property and return cells equal to a value. 2016-08-25 17:27:36 +02:00
Joakim Hove
949b955d37 Merge pull request #901 from jokva/grid-export-compressed-map
Active cell cache with automatic storage
2016-08-25 15:15:49 +02:00
Jørgen Kvalsvik
bb2d0c5324 Active cell cache with automatic storage
Simplify slightly by using automatic memory management, rather than
heap-alloc.
2016-08-25 13:51:46 +02:00
Joakim Hove
aa9f43686d Merge pull request #900 from joakim-hove/grid-export-compressed-map
EclipseGrid::activeMap( ) will cache the results.
2016-08-25 13:46:35 +02:00
Joakim Hove
1c0716aefd EclipseGrid::activeMap( ) will cache the results. 2016-08-25 11:50:09 +02:00
Joakim Hove
422ac7335b Special case 'ALLPROPS' mneomonic. 2016-08-22 17:08:16 +02:00
Joakim Hove
30a4974178 Added RestartConfig::getkeyword() to check mneonic 2016-08-22 16:45:28 +02:00
Joakim Hove
e093e470c8 Added RPTRST memonic without corresponding int. 2016-08-22 16:45:28 +02:00
Andreas Lauser
d6287e4db5 add bare-bones support for the MULTREGP keyword
it is parsed and put into the deck, but it is not internalized in any
way. (Note that, given that this keyword is quite simple, adding
sophisticated code to absorb it into EclipseState would be overkill,
in my not so humble opinion.)
2016-08-19 19:43:06 +02:00
Atgeirr Flø Rasmussen
a40e094380 Do not use constexp pair constructor.
That constructor is not available in C++11, only from C++14 on.
2016-08-19 13:08:19 +02:00
Arne Morten Kvarving
fc90cdcf97 changed: remove unused references
quells unused variable compile warnings
2016-08-15 14:53:53 +02:00
Arne Morten Kvarving
4c32e602da changed: generate unit type conversion constants on compile-time
as a bonus it avoids unused variable warnings in compile units
only using parts of the conversion units.
2016-08-15 14:52:48 +02:00
Jørgen Kvalsvik
07b1706c58 Support for RPTRST/RPTSCHED options
A RestartConfig refurbishment that generalises some of the previously
special-casing. Short synopsis:

* Integer list input is first translated to their corresponding
  mnemonics.
* Mnemonic implementation support turning off input parameters via
  mnemonic=0, handled generally rather than special-cased for BASIC/FREQ
* Restart configuration setup is handled in one else-less, linear code
  path. RPTRST and RPTSCHED are interpreted by their separate helper
  functions, but they produce the same resulting object. Should be
  easier to follow
* Ignores unknown mnemonics, has a list of known/supported mnemonics
  that will be internalised.

The explicit list over supported keywords is from the Eclipse100 manual
and must be manually maintained, i.e. no dynamic solution is in place
yet. This might never be necessary, but support it dynamically isn't a
problem.
2016-08-11 09:59:54 +02:00
Jørgen Kvalsvik
295ef91063 Moved RestartConfig out of IOConfig
RestartConfig is a first-class citizen of EclipseConfig rather than
being embedded in IOConfig. This narrows IOConfig's responsibility to
only that of paths file system definitions and interactions, and
RestartConfig to what and when to output the restart file.
2016-08-11 09:59:54 +02:00
Joakim Hove
0e53246009 Internalize whih keywords to restart - in addition to when. 2016-08-10 16:33:25 +02:00
Joakim Hove
2b1b74d3ae Added method back() to DynamicState() 2016-08-10 16:33:05 +02:00
Tor Harald Sandve
5ccc85b717 Shut wells where all completions are shut 2016-08-09 10:43:08 +02:00
Joakim Hove
9bcdadd443 Merge pull request #890 from pgdr/transmult-and-shared_ptrs
Removing some use of shared_ptr
2016-08-09 09:32:41 +02:00
Jørgen Kvalsvik
d928f53a52 Use getCellDepth; hoist size() in numApply 2016-08-08 11:56:40 +02:00
Pål Grønås Drange
41b158bb2b Shortified names, instead of state.getEclipseConfig().getSummaryConfig(), use state.cfg().summary() 2016-08-08 11:39:59 +02:00
Jørgen Kvalsvik
db33a9cc55 Prefer function objects in Parser::clean
Implementing these checks as function objects improves performance
slightly (5% or so according to my measurements), probably due to the
functions being inlined rather than reduced to function pointers.
2016-08-08 09:42:41 +02:00
Jørgen Kvalsvik
f413e5441f Hoist loop variable.
Profiling indicates the size-check isn't hoisted properly. In this case,
manually hoising the loop invariant doesn't negatively impact clarity
nor give any more noise, and slightly improves performance.
2016-08-08 09:40:20 +02:00
Pål Grønås Drange
dde7a25673 Made EclipseConfig.SimulationConfig and .InitConfig references 2016-08-08 09:37:13 +02:00
Jørgen Kvalsvik
9966e3fbfd Prefer .at over checking size and throwing
Seems to be slightly faster and is much simpler.
2016-08-05 15:57:44 +02:00
Jørgen Kvalsvik
0650996655 Short-circuit table lookup of constant strings
A keyword cannot be equal to multiple distinct strings at once, so we
can stop looking if one proposition evaluates to true.
2016-08-05 15:45:39 +02:00
Jørgen Kvalsvik
d7ac7ee9b8 Remove SCHEDULE as a special section
SCHEDULESection with its special implementation is a remnant of older
design and largely unnecessary now. The implementation also relied on
shared_ptr for efficiency and was not really used at all.

SCHEDULESection now is no longer special, and uses the same
implementation as SUMMARY, RUNSPEC etc. The one thing that separated it,
looking up keywords within a timestep, was only used once and this
computation has been inlined in the function.
2016-08-05 15:28:29 +02:00
Pål Grønås Drange
b359e9c0fb transmult is member, use ref's, use proper constructor of EclipseState 2016-08-05 15:07:15 +02:00
Jørgen Kvalsvik
34a354c1dd Prefer to/from_si to string parsing for conversion 2016-08-05 13:24:30 +02:00
Jørgen Kvalsvik
6266314f8d String -> ScheduleEnum assumes pre-trimmed strings
Reduce the overhead in the WCONHIST parsing by assuming that strings are
pre-trimmed when they're given to the translation.
2016-08-05 12:34:08 +02:00
Jørgen Kvalsvik
e88cbc523b Precompute control modes in history/prediction 2016-08-05 12:22:48 +02:00
Jørgen Kvalsvik
99570ff72e Add all records to Deck at once
Rather than doing add-item-check-duplicates per DeckItem added to a
record, construct all the items at once, then pass them in full to the
DeckRecord object. The DeckRecord object still check for duplicate
names, but with lower complexity and cost.
2016-08-05 10:45:31 +02:00
Jørgen Kvalsvik
f571f21171 is_separator includes comma
This deprecates the comma replace function in the reader.
2016-08-04 16:05:53 +02:00
Jørgen Kvalsvik
7e9158d319 Anon namespace, removal of unused string constant 2016-08-04 16:05:53 +02:00
Jørgen Kvalsvik
b2f206d54a Replace RawRecord expanded items; reuse view
Reuses the original records string_view rather than expanding to the
same std::string, we save some allocations, memory cache misses and
simplify the class slightly.

Additionally, the uninteresting add-multiple-identical-records logic
ParserItem did before has been moved into RawRecord and is now performed
by std::deque (which also means it can allocate better for itself). The
addition of prepend deprecates push_front.
2016-08-04 16:05:53 +02:00
Jørgen Kvalsvik
11b4bc2dcd Lookup tables in is_separator/quote
The use of lookup tables reduce branching and seem to improve
performance by a few percent.
2016-08-04 16:05:53 +02:00
Jørgen Kvalsvik
adc602f6aa Manually copy over append in Parser.clean
Book keeping internally in the string class is rather unnecessary and
performed a lot (once per line in the input). Performing a manual copy
without string encumbered book keeping (essentially using the string as
a raw char* buffer) gives some performance, which scales well with the
lines in each deck.
2016-08-04 16:05:53 +02:00
Atgeirr Flø Rasmussen
9b924b1fe1 Remove two unused functions. 2016-08-01 15:15:41 +02:00
Jørgen Kvalsvik
f6cffb4c07 Support for ratio-type units 2016-07-19 14:34:51 +02:00
Jørgen Kvalsvik
c4e8149717 UnitSystem string-description of a unit
Analoguous to to/from_si but for string-representation of the unit in
question.
2016-07-19 14:34:21 +02:00
Joakim Hove
19aa54a7e1 Merge pull request #883 from jokva/summary-config-well-name-matching
[Summary] W-keywords accept patterns
2016-07-19 09:43:57 +02:00
jokva
6fc1aec8c0 Merge pull request #882 from joakim-hove/restart-config
Extracted configuration of *when* to write restart
2016-07-18 23:10:33 +02:00
Jørgen Kvalsvik
d98215ae40 [Summary] W-keywords accept patterns
The W-family of keywords accept a pattern to expand, rather than just
names or defaulted-all. This is the actual behaviour, according to the
manual.
2016-07-18 14:46:00 +02:00
Joakim Hove
0069b02e9f Extracted configuration of *when* to write restart
The configuration of when to write restart files is quite complex,
involving at least the three keywords RPTSOL, RPTRST and RPTSCHED. This
commit moves that configuration from the IOConfig class to the
RestartConfig class.

At a later stage the RestartConfgig class will be extended with
information of *what* to save in the restart file.
2016-07-15 15:26:51 +02:00
Jørgen Kvalsvik
3f98a747df Connection keywords support well matching
Looking up well keywords uses the well matching algorithm. This covers
all cases supplied by the eclipse documentation, and extends it slightly
by also allowing matching.
2016-07-15 14:40:27 +02:00
Jørgen Kvalsvik
9eb23b2971 Well matching gives empty list on no matches
The well matching algorithm has been tuned to not throw when a well name
is used for pattern and the well is not registered. Instead it will
return the empty list, meaning keywords that expects to match over
wells, but passes full identifiers, that also rely on the match to throw
for control flow, will have to manually check the emptiness of the well
list.
2016-07-15 14:40:22 +02:00
Joakim Hove
148b9b22ea Extracted configuration of *when* to write restart
The configuration of when to write restart files is quite complex,
involving at least the three keywords RPTSOL, RPTRST and RPTSCHED. This
commit moves that configuration from the IOConfig class to the
RestartConfig class.

At a later stage the RestartConfgig class will be extended with
information of *what* to save in the restart file.
2016-07-15 14:15:26 +02:00