Commit Graph

44 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
3696b750cd Remove opm-common dependency
Severs the code dependency on opm-commmon. There was no actual
functional dependency here, with the exception of some enable/disable
warning headers. To properly make opm-parser a stand-alone module the
usage of these headers have been removed and the dependency on
opm-common is gone.
2016-07-08 15:53:40 +02:00
Liu Ming
cb74ccf589 adapt API changes in ParseContext. 2016-05-14 09:15:27 +02:00
Liu Ming
ca085fa6a2 remove ParseContext. 2016-05-14 09:15:26 +02:00
Atgeirr Flø Rasmussen
1c4e4bd3da Silence some shadowing warnings. 2016-04-21 09:32:25 +02:00
Pål Grønås Drange
b94c554249 Added fixture Setup to ThresholdPressureTest thereby removing leaks 2016-04-19 12:43:57 +02:00
Pål Grønås Drange
ba01b7eb53 Fixes support for BOXed ACTNUM
* Added ACTNUM as keyword to Eclipse3DProperties
* Removed certain checks from EclipseGrid that are no longer of use
* Added tests to EclipseGridTests that test boxed ACTNUM and activeCells
* Made EclipseGrid non-const in EclipseState since we must run resetACTNUM
* Fixed a minor typo in an error message in EclipseGrid
* Fixed typo in GridProperty: Deckeyword -> DeckKeyword
* Fixed two errors in tests recently introduced relating to Ecl3DProps
* Removed test in EclipseGridTests; We now accept too small ACTNUM vectors
* Added ACTNUM test for GridProperties
2016-04-19 10:54:09 +02:00
Atgeirr Flø Rasmussen
c49d824644 Remove unused ParseContext argument from helper function. 2016-04-13 12:57:16 +02:00
jokva
c6bd9e70fd Merge pull request #751 from pgdr/kill-es-gridprop
Introduce Eclipse3DProperties
2016-04-13 10:59:45 +02:00
Liu Ming
7946d0175f remove unused OpmLog headers. 2016-04-13 11:59:29 +08:00
Pål Grønås Drange
21f94c0606 TableManager and Deck are now used as references, hid GridProperties
* 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)
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
3680dfcb97 Substantial edits to Eclipse3DProperties and ptr's
* 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
2016-04-12 14:42:34 +02:00
Pål Grønås Drange
e48b64c41d Substantial edits to Eclipse3DProperties
* 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
2016-04-12 14:42:18 +02:00
chflo
f2ed1ba7ea Moved OpmLog from opm-parser to opm-common 2016-03-21 22:07:49 +01:00
Joakim Hove
a49f6ca00c Merge pull request #695 from jokva/refactor-grid-property-intializers
Refactor grid property intialisers
2016-03-21 21:33:39 +01:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08: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
f0ae5db131 opm-parser adoption of Deck automatic ownership
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.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
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).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
04900a4bb6 ParserKeywords.hpp -> ParserKeywordsX.hpp
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.
2016-01-21 09:25:58 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
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.
2016-01-21 09:22:06 +01:00
chflo
2ab9a8acdf OPM-252: Added VAPOIL, DISGAS to SimulationConfig 2015-12-15 13:50:54 +01:00
Joakim Hove
51e3aa82cc Update include path 2015-10-06 11:30:43 +02:00
Joakim Hove
8fc2927beb Hooops to support CPR in both SUMMARY and RUNSPEC. 2015-09-24 21:55:03 +02:00
Joakim Hove
5288d5f2cc Initialize useCPR to false. 2015-09-24 20:46:15 +02:00
Joakim Hove
5c9c481fd1 Set default useCPR to True. 2015-09-22 10:08:04 +02:00
Joakim Hove
3e7fe5e027 Temporarily removed parser support for CPR keyword 2015-09-22 09:25:52 +02:00
Kjell W. Kongsvik
d15b472704 Support for CPR keyword in SimulationConfig 2015-09-15 16:43:01 +02:00
Atgeirr Flø Rasmussen
61c33599cf Silence unused argument warning. 2015-08-31 11:05:18 +02:00
Joakim Hove
451fb97439 Added SimulationConfig::hasThresholdPressure() 2015-08-25 15:26:03 +02:00
Joakim Hove
f7283eb238 Changed THPRES implementation
With the current implementation the THPRES pressure table is implemented
with a map indexed by the equilibration region indicies for the regions
in contact.
2015-08-25 12:01:56 +02:00
Fredrik Gundersen
b10401d7c4 Added verification of values in ThresholdPressureTest 2015-08-24 15:35:32 +02:00
Fredrik Gundersen
5421609e65 Fixed tests to work with the new TP behavior 2015-08-24 14:26:01 +02:00
Fredrik Gundersen
e493ad22cb Added new Threshold Pressure behavior 2015-08-24 14:24:53 +02:00
Joakim Hove
d26428dd52 Reimplmented ParseMode based on string keys.
Completely reimplemented the ParseMode class. Now the main datastructure
is a map<string,action> where the possible error situations are the
keys. This approach allows for a much more flexible
setting/filtering/querying of the ParseMode settings.
2015-08-10 14:27:53 +02:00
Atgeirr Flø Rasmussen
3845e1c239 Suppress warnings from boost.
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.
2015-08-10 13:06:50 +02:00
Atgeirr Flø Rasmussen
3764c41405 Fix minor bug in helper function. 2015-08-10 12:50:49 +02:00
Joakim Hove
e964701023 Added ParseMode switch for missing data in THPRES. 2015-08-07 16:30:38 +02:00
Joakim Hove
733af54777 Added struct ParseMode to control parse behaviour.
- 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.
2015-08-05 22:02:09 +02:00
Joakim Hove
679ef35d0b Updated code to use compiled defaults 2015-06-08 11:29:21 +02:00
Arne Morten Kvarving
2acd2db5d0 changed: rename Parser to opmparser for consistency 2015-05-26 13:53:54 +02:00
Arne Morten Kvarving
9e96127705 change how tests are added in the build system
- use a opm-macro to reduce code duplication
- add a 'test-suite' target which builds tests. for use if BUILD_TESTING
  is 0.
- add a 'check' target which builds tests, then executes them
2015-05-26 13:07:44 +02:00
Joakim Hove
93d5d19fc1 Merge fixup 2015-03-04 22:32:42 +01:00
chflo
ef57b3f074 OPM-166: Internalized tresholdPressure in EclipseState 2015-02-12 16:51:04 +01:00