Commit Graph

2183 Commits

Author SHA1 Message Date
Liu Ming
7176753297 solve conflict. 2016-04-15 09:41:45 +08:00
Liu Ming
940d7f8449 Merge remote-tracking branch 'remotes/opm/master' into MessageContainer-sub-class
Conflicts:
	opm/parser/eclipse/EclipseState/EclipseState.cpp
2016-04-15 09:14:00 +08:00
Andreas Lauser
92a55cb267 avoid reserved names for guard macros
just like for macros that start and end with `__`, `clang++
-Weverything` likes to complain about macros which start and end with
a single underscore. This is basically the same issue as
Ensembles/ert#1048
2016-04-14 17:19:37 +02:00
Atgeirr Flø Rasmussen
209d30f0d0 Silence missing-braces warning.
Can switch back when we move to C++14 uniformly.
2016-04-14 14:51:42 +02:00
Joakim Hove
098ce7b9a8 Merge pull request #734 from jokva/new-summary-keywords
New summary keywords
2016-04-14 14:07:15 +02:00
Joakim Hove
244a9f9c1d Merge pull request #720 from jokva/fipnum-register-regions
Query the name of (FIP) regions in State
2016-04-14 12:44:33 +02:00
Jørgen Kvalsvik
fba6069b7d fixup! Parser support for SUMMARY/Region keywords 2016-04-14 09:44:08 +02:00
Jørgen Kvalsvik
2b6d871242 fixup! Summary: Calculate ijk from record in function 2016-04-14 09:43:43 +02:00
Jørgen Kvalsvik
302e656ea4 fixup! Internalisation of SUMMARY C keywords 2016-04-14 09:42:36 +02:00
Jørgen Kvalsvik
a705b0750b Query all IDs of (FIP) regions in State
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.
2016-04-14 09:30:55 +02:00
Liu Ming
37f13e3761 Add header that removed by mistake. 2016-04-14 13:57:53 +08:00
Liu Ming
77557eaa84 append messages. 2016-04-14 13:56:01 +08:00
Liu Ming
63e54c0157 use message container instead of OpmLog. 2016-04-14 11:03:53 +08:00
Liu Ming
f28dd65142 add MessageContainer object. 2016-04-14 09:39:28 +08:00
Liu Ming
d73b79c210 remove unused headers. 2016-04-14 09:38:54 +08:00
Joakim Hove
001e2a7ad0 Merge pull request #759 from pgdr/prop-test-lean-grid
Testing Eclipse3DProperties API
2016-04-13 14:44:31 +02:00
Atgeirr Flø Rasmussen
e313378e23 Silence unused function parameter warnings. 2016-04-13 13:05:01 +02:00
Atgeirr Flø Rasmussen
0104055076 Suppress Boost warnings. 2016-04-13 13:04:33 +02:00
Atgeirr Flø Rasmussen
c49d824644 Remove unused ParseContext argument from helper function. 2016-04-13 12:57:16 +02:00
Atgeirr Flø Rasmussen
c74a441a3b Remove const with no effect on value return. 2016-04-13 12:56:05 +02:00
Pål Grønås Drange
4e97aab8aa Testing Eclipse3DProperties API
* Added Eclipse3DPropertiesTests
* Refactored tests to use Eclipse3DProperties instead of EclipseState
* Added unsigned literal to MessageContainerTest
2016-04-13 12:44:07 +02:00
jokva
c6bd9e70fd Merge pull request #751 from pgdr/kill-es-gridprop
Introduce Eclipse3DProperties
2016-04-13 10:59:45 +02:00
Joakim Hove
9c6a120414 Merge pull request #757 from qilicun/append-messagecontainer
Add appendMessages() function.
2016-04-13 09:57:27 +02:00
Liu Ming
c782068baf add size() function. 2016-04-13 15:07:12 +08:00
Liu Ming
0954e5349c delete blank line. 2016-04-13 14:15:28 +08:00
Liu Ming
920c2cb87f some improvements. 2016-04-13 14:04:41 +08:00
Liu Ming
72dd934c71 add test for appendMessages function. 2016-04-13 14:04:21 +08:00
Joakim Hove
63be9532aa Merge pull request #756 from qilicun/cleanup-header
remove unused OpmLog headers.
2016-04-13 07:38:06 +02:00
Liu Ming
9ca9c8ce1d Add appendMessages() function. 2016-04-13 12:06:37 +08:00
Liu Ming
7946d0175f remove unused OpmLog headers. 2016-04-13 11:59:29 +08:00
Pål Grønås Drange
7cffdb0ecf Renamed to get3DProperties() 2016-04-12 14:42:35 +02: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
Joakim Hove
49a1c17eb8 Removed signed / unsigned comparison warning. 2016-04-12 13:59:02 +02:00
Joakim Hove
0b316092c8 Added missing include. 2016-04-12 13:56:31 +02:00
Liu Ming
4eb2208e63 remove shared_ptr 2016-04-12 09:01:33 +08:00
Liu Ming
0dcb776940 Add MessageContainer to Deck. 2016-04-11 11:15:39 +08:00
Liu Ming
ed92c70efd Add MessageContainer to EclipseState. 2016-04-11 10:44:39 +08:00
Joakim Hove
0d0fc43e50 Merge pull request #750 from jokva/remove-possible-undefined-const-cast
Remove possible undefined const cast
2016-04-08 12:52:38 +02:00
Joakim Hove
4d84da2b9d Merge pull request #748 from jokva/message-container-internal-detail
Remove MessageContainer from ParseContext + storage type change
2016-04-06 17:15:06 +02:00
Jørgen Kvalsvik
f8bab0e703 DeckItemT::SIdata mutable modifier
Replaces const_cast in favour of mutable keyword in order to avoid
undefined behaviour under some conditions.
2016-04-06 15:09:32 +02:00
Jørgen Kvalsvik
135f405e93 InitUnitSystem private; constness managed by .get
The const_cast in Deck::get*UnitSystem are potentially undefined
behaviour under a series of (plausible) conditions, and are deprecated
in favour of mutable members. Removes initUnitSystem from the public
interface, as the initialisation is handled on the first getUnitSystem
anyway, cleaning up the Deck interface slightly.

Adds proper constness to the use of unit systems that don't actually
modify the internal state in any way.
2016-04-06 15:09:32 +02:00
Jørgen Kvalsvik
0d24ac2d4a Store Location::lineno as size_t
By storing it as size_t we explicitly disallow negative line numbers,
and keep 0 as an error/empty/undefined location.

A small problem with this is that MessageContainer.error and friends
still accept negative numbers (often without warning) via size_t
implicit conversion and wrap-around.
2016-04-06 11:41:22 +02:00
Jørgen Kvalsvik
3efa5fb90c ParseContext::handleError returns messagetypë́
For more transactional behaviour and to support MessageContainer in
favour of opm-log, this method now returns an enum describing how the
error should be handled, rather than throwing or no-oping. Throwing is
preserved if ParseContext is configured to do so.
2016-04-06 10:39:06 +02:00
Jørgen Kvalsvik
f3bef79562 MessageContainer::const_iterator bound
While the implementation is a simple alias to
std::vector<Message>::const_iterator, it enablese generic lookup of the
iterator type at compile time, and enables us to effortlessly change the
underlying implementation later.
2016-04-06 10:38:19 +02:00
Jørgen Kvalsvik
eb610453b4 MessageContainer::add support
Some phenomenons can be configured as error, warning or debug output,
and is not necessarily known in advanced by the entity adding a message.
To facilite adding a message with runtime-defined warning level, the add
method is supported.
2016-04-06 10:38:18 +02:00
Jørgen Kvalsvik
6c8487ea07 Message::location uses automatic members
By supporting operator bool() we get the same existence checking
capabilities as the unique_ptr implementations, without the hurdles of
non-copyability and manual heap allocation.
2016-04-06 10:38:13 +02:00
Joakim Hove
df751de42c Merge pull request #745 from joakim-hove/opmi
Opmi
2016-04-05 07:58:53 +02:00
Joakim Hove
e30054625a Merge pull request #746 from joakim-hove/keywords-polymer
Keywords: EDITNNC( new ) AQUCON (fixed)
2016-04-04 20:12:11 +02:00