Commit Graph

1962 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
38f88b4e14 RawKeyword::isTerminator uses is_separator 2016-03-14 08:29:54 +01:00
Jørgen Kvalsvik
1d1715b421 RawConsts::is_separator function
This replaces the inefficient RawConsts::separators.find( char ) with an
availble, efficient and inlinable is_separator.
2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
717d495a98 Replace boost::to_upper_copy
This function was rather slow and accounted for too much execution time.
Replaced with a simple implementation relying on toupper. Locale
awareness, the benefit of to_upper_copy, is not an issue since it's all
ASCII.
2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
9a96f9fd8f Enable rvalue push_back in ParserItemScan
Instead of going via an immediately discarded temporary, feed the
readValueToken result value directly to push_back. This enables rvalue
optimisations to kick in, when available.
2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
93b7c0739b Replace boost::lexical_cast<> with std functions
The boost provided lexical cast are inefficient and is shown to be a
slowdown in the inner loop. Replaces them with std::atoi/std::atof and
some simple correctness checking.
2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
e4ddf884f1 Using operator+ and stream operators 2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
798084676a RawRecord uses string_view internally
Modifies RawRecord to internally use string_view instead of copies of
the substrings. This *vastly* reduces copying in the processing of each
record and subsequently improves performance. Reduces total memory usage
in Deck construction.
2016-03-14 08:29:53 +01:00
Jørgen Kvalsvik
8d4863ff86 Introducing string_view
A simple non-mutating view into a string. Implements a shallow reference
to a std::string, replicating its operations to be drop-in replaceable.

Primarily designed for inner loop use, where expensive string
allocations become a performance killer.
2016-03-14 08:29:53 +01:00
Joakim Hove
8cfafe7c52 Merge pull request #701 from qilicun/more-function-opmlog
More function opmlog
2016-03-14 07:34:44 +01:00
Liu Ming
e0cbb05cfe output numbers as string. 2016-03-14 12:53:20 +08:00
Liu Ming
289f6c3bdb Add EclipsePRTLog backend. 2016-03-14 11:09:17 +08:00
Joakim Hove
0979d8050e Load-test of opm-data/solvent_test_suite/SPE5CASE1 2016-03-12 19:18:55 +01:00
Liu Ming
ccd14fd433 remove StreamLog include file. 2016-03-12 21:04:45 +08:00
Liu Ming
2bd48b4d9d remove StreamLog from header. 2016-03-11 15:47:27 +08:00
Liu Ming
bea353aafd Add debug method. 2016-03-11 15:24:43 +08:00
Liu Ming
6506cb5dc1 remove StreamLog and int members. 2016-03-11 15:21:47 +08:00
Joakim Hove
7f6fa4b125 Merge pull request #707 from totto82/tlpmixpa
Add new keyword TLPMIXPA
2016-03-09 10:13:23 +00:00
Joakim Hove
b9aec3e3be Merge pull request #705 from jokva/remove-boost-from-startoken
Moves readValueToken implementation to source file
2016-03-08 17:37:31 +01:00
Tor Harald Sandve
3991bf6e51 Add new keyword TLPMIXPA
The TLPMIXPA keyword can be used for giving pressure depended Todd-
Longstaff parameters. The implementation follows the description of
PMISC.
2016-03-08 15:14:21 +01:00
Jørgen Kvalsvik
d67a44b19d Include guards for Functional 2016-03-07 09:03:52 +01:00
Jørgen Kvalsvik
d0d4a74d31 Moves readValueToken implementation to source file
The templated readValueToken has been moved to source file, and uses
explicit instantiation and linking. The deprecated float specialisation
has been removed.
2016-03-04 18:27:44 +01:00
Joakim Hove
99266809b7 Merge pull request #698 from jokva/equil-keyword-lookup
Equil keyword lookup
2016-03-04 18:19:43 +01:00
chflo
0db3abab94 Added copyright header to files that were without it 2016-03-04 14:56:18 +01:00
Liu Ming
83e5ff1c00 Fix summary() issue. 2016-03-02 12:00:23 +08:00
Liu Ming
4c4788d73c Add more functions to OpmLog. 2016-03-02 11:56:00 +08:00
Atgeirr Flø Rasmussen
b026c55c3b Honor the ACTNUM keyword also for cartesian grids. 2016-03-01 14:40:36 +01:00
Atgeirr Flø Rasmussen
9e0c85dce7 Silence warnings from boost. 2016-03-01 10:12:09 +01:00
Atgeirr Flø Rasmussen
a828991bbc Add missing include directive. 2016-03-01 10:11:55 +01:00
Jørgen Kvalsvik
ff1ad83f08 Split GridPropertyFunction into Init+Post
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.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
3e222f58d7 findVerticalPoints split up
Most users of the findVerticalPoints function didn't use more than one
of the vectors returned. By splitting them up into seperate functions,
we only have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
7bf13fbb61 findCritical split up
Most users of the findCritical function didn't use more than one of the
vectors returned. By splitting them up into seperate functions, we only
have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
9798b4667a findSaturationEndpoints split up
Most users of the findSaturationEndpoints function didn't use more than
one of the four vectors returned. By splitting them up into seperate
functions, we only have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
24d4fe595e GridPropertyFunction interface improvements
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.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
34bfba42d3 Replace initializer classes, refactor PropertyInit
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.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
80f3abe1c6 Move SatfuncInitializers to source file
Since the template-parameterised base header was moved to a source file,
there is no longer any reason for this to be header-only. Split into
source.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
7946f86f29 GridPropertyFunction interface in init/postprocess
The new GridPropertyFunction processes grid cell property vectors and
replaces GridPropertyBase* inheritance model. This implementation
re-uses the old implementations as a transition.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
357e1e0e53 Move GridProperty< T > to source file
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.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
5b2ec6be75 GridProperties stores raw vector of keywords
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.
2016-03-01 08:46:22 +01:00
Jørgen Kvalsvik
5c02c60035 Introducing InitConfig/Equil
Introduces Equil, a thin storage class for 'EQUIL' derived information,
accessible through EclipseState.

Previously this was handled through "raw" deck access, provided by
EquilWrapper. The interface for Equil has been derived from the
EquilWrapper, but they're to be seen as different entities altogether.
More importantly, Equil is owned by EclipseState, not some stand-alone
Deck reading unit.
2016-03-01 08:44:38 +01:00
Jørgen Kvalsvik
51df3685f3 Remove EquilWrapper.
This file is deprecated.
2016-03-01 08:44:38 +01:00
Joakim Hove
36b42ec160 Merge pull request #696 from jokva/functional
Introduce Utility/Functional
2016-03-01 07:12:03 +01:00
Jørgen Kvalsvik
ba743e488c Introduce Utility/Functional
Utility/Functional is a lightweight high level functional-oriented sub
library that attempts to abstract some common uses and boilerplate
around the parser code (and later maybe for other modules to use).

This patch introduce only three functions, but they have proven common
enough to warrant some common implementation.
2016-02-29 13:50:32 +01:00
Atgeirr Flø Rasmussen
8c9d57d7a7 Silence warning from inconsistently using override spec.
Also fix minor whitespace (tab) issue.
2016-02-29 10:30:24 +01:00
Atgeirr Flø Rasmussen
7b19c37585 Silence brace-init warning.
Double braces should be used for std::array until C++14.
2016-02-29 10:27:00 +01:00
Atgeirr Flø Rasmussen
ca94a5b792 Silence unused argument warning. 2016-02-29 10:26:43 +01:00
Atgeirr Flø Rasmussen
c4be826212 Silence shadowing warnings. 2016-02-29 10:25:35 +01:00
Atgeirr Flø Rasmussen
2518d08aa1 Add missing include directives. 2016-02-29 10:10:14 +01:00
Joakim Hove
1c32ef5562 Merge pull request #682 from jokva/summary
Internalise SUMMARY section
2016-02-22 14:30:07 +01:00
Joakim Hove
a8f47b4dd5 Merge pull request #694 from jokva/minor-improvements
Simplify DeckRecord::addItem implementation
2016-02-22 10:45:52 +01:00
Jørgen Kvalsvik
a8d7b250ca Simplify DeckRecord::addItem implementation 2016-02-22 10:18:22 +01:00