Commit Graph

106 Commits

Author SHA1 Message Date
Andreas Lauser
a8b6047b1d fully move the units code from opm-core to opm-parser
this fixes some annoying inconsistencies (e.g., the recently
introduced 'dyne' unit was unavailable in the opm-core version) and
gets rid of some compiler abiguity errors if 'using namespace
Opm::details' was used by code inside the 'Opm' namespace.

Since opm-parser is a hard dependency of opm-core, the only measure
which must be taken by higher-level code is to include
'opm/parser/eclipse/Units/Units.hpp' instead of
'opm/parser/eclipse/Units/ConversionFactors.hpp' or
'opm/core/utility/Units.hpp'.

Note that a potentially better location for this code would be
opm-common, but this would break the Windows build of opm-parser.
2016-10-10 17:45:37 +02:00
Jørgen Kvalsvik
d5251d97e6 Make Schedule.groups auto, not a shared_ptr 2016-10-05 14:39:01 +02:00
Jørgen Kvalsvik
a97890bce2 Make Schedule.grouptree auto, not a shared_ptr
Also makes the *contents* of the vector values, not shared_ptrs.
This introduces the copy constructor (as an alternative to deepcopy())
and comparison operators, mandated by DynamicState.
2016-10-05 10:36:35 +02:00
Joakim Hove
81b71d5d08 Removed EclipseGrid member from Schedule class. 2016-09-12 21:42:34 +02:00
Kai Bao
08c5a0c8e0 addressing the line-breaking and spelling comments. 2016-06-30 13:07:12 +02:00
Kai Bao
0145c1301a add a function to indicate if WECON provides any effective limit. 2016-06-30 13:07:12 +02:00
Kai Bao
741c8604e9 adding integration tests for WECON. 2016-06-30 13:07:12 +02:00
Jørgen Kvalsvik
44d7abc6fb Well shared_ptr alias removed
Deprecate the WellPtr -> shared_ptr aliases. The Schedule object is the
sole owner of these objects, and shared_ptr in the interfaces hid that.

The interfaces still relies on pointers to pass Wells around for now,
in order to (mostly) preserve source compability.
2016-06-16 13:58:12 +02:00
Jørgen Kvalsvik
7e9f5b54d0 Schedule/getGroup const; references internally 2016-06-15 15:09:31 +02:00
Jørgen Kvalsvik
744d2ee773 Remove IOConfig use in Schedule 2016-06-06 11:04:27 +02:00
Liu Ming
88d489e876 rename ParseMode as ParseContext in IntegrationTests folder. 2016-03-17 08:28:17 +08: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
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
Joakim Hove
a85bac0034 Changes in const'ness 2015-12-21 15:30:14 +01:00
Joakim Hove
2582064c5d Added ParseMode::unsupportedScheduleGeoModifiers
- Added const ParseMode& argument to EclipseState() and Schedule()
   constructors.
 - Schedule constructor iterates through SCHEDULESection instance
   instead of Deck instance.
2015-08-06 15:12:48 +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
44ba386bcc Add events from Schedule::iterateScheduleSection() 2015-07-24 12:40:50 +02:00
Joakim Hove
81ceb24fda Added utility method Schedule::getOpenWells( ) 2015-05-29 09:05:16 +02:00
chflo
8741d4497d OPM 199: Changes due to changes in Schedule constructor 2015-05-26 09:43:59 +02:00
Atgeirr Flø Rasmussen
74d213ce18 Fix inconsistencies in test cases.
Not detected earlier since schedule did not access grid data.
2015-01-27 10:39:39 +01:00
Joakim Hove
d8f7c9660c Added simple algorithm to get ref depth from completions. 2015-01-26 12:26:24 +01:00
Joakim Hove
8d506b01a1 Added grid property to Well class 2015-01-26 12:21:51 +01:00
Joakim Hove
3cfe0291fd Added EclipseGrid as argument to Schedule constructor 2015-01-26 12:21:51 +01:00
Joakim Hove
b1a30272a2 Added hasValue() protection 2015-01-02 16:53:26 +01:00
Joakim Hove
cf97b3bbe6 Revert "Revert "make the parsing stage pass even if non-defaultable items have been defaulted""
This reverts commit 13d31809e8ca7b9f283bf29a0871110071263449.
2015-01-02 16:51:15 +01:00
Andreas Lauser
e0706524e0 Revert "make the parsing stage pass even if non-defaultable items have been defaulted"
This reverts commit 5ce5a3539641ac6eac9362d9c2b8a09084f9c35b.
2014-12-19 19:02:53 +01:00
Andreas Lauser
231cf39d47 make the parsing stage pass even if non-defaultable items have been defaulted
... but throw later when trying to access the data of the item in
question.

Note that this was demanded by [at] joakim-hove and that I do not want
to be held responsible for any issues which are caused by this
approach. (read: please direct your barks to Joakim if you fell on
your nose because of this...)
2014-12-18 11:43:52 +01:00
Andreas Lauser
ea38a25af4 remove all trailing white space
this is just the result of

```
find -iname "*.[ch]pp" | xargs sed -i "s/ *$//"
find opm/parser/share/keywords -type f |  xargs sed -i "s/ *$//"
```

so if it causes conflicts with other patches, the others should get
priority. The rationale behind this patch is that some people tell
their editor to remove white space which leads to larger than
necessary patches...
2014-12-08 16:34:28 +01:00
Liu Ming
5b3a92159a add unit test for WPOLYMER. 2014-11-21 13:21:24 +08:00
Joakim Hove
72cc1630f0 Added extra test case for closing wells. 2014-10-14 16:59:35 +02:00
Joakim Hove
a43d8e447c Fixed initialisation of well properties
Previously the control mode was initialized to ORAT; this was later set
to the correct value when parsing the relevant keywords - but in the
case of a SHUT well the control mode was not updated, and we were left
with a well under ORAT control.
2014-10-13 19:26:53 +02:00
Andreas Lauser
66139d9f07 fix compiler warnings and rename CF to ConnectionTransmissibilityFactor
for the compiler warnings, see e.g.

https://opm-project.org/CDash/viewBuildError.php?type=1&buildid=27777

the CF to ConnectionTransmissibilityFactor rename makes things much easier to
understand for people who are not intimately familiar with the wells
code.
2014-09-06 22:18:55 +02:00
Joakim Hove
fedc3387fd Default: Added dataset from opm-core with test 2014-09-03 10:37:02 +02:00
Joakim Hove
de73c688e3 Removed debug output clutter 2014-09-03 10:37:00 +02:00
Joakim Hove
8f54c4e555 GroupTree::prinTree() takes std::ostream argument 2014-09-03 10:37:00 +02:00
Atgeirr Flø Rasmussen
6dfeadc229 Adapt tests to use new Well constructor, add test for defaulted ref depth. 2014-08-07 12:35:21 +02:00
Bård Skaflestad
1d34629cc2 Disable WCONHIST/GRAT non-existence test
Keyword WCONHIST always supports GRAT control mode, even when
defaulted.  The default value (zero) might not be very useful in a
simulation case but it's supported nonetheless.
2014-07-08 13:22:45 +02:00
Arne Morten Kvarving
a8f216175a fixed: remove misplaced semi-colons 2014-05-15 14:46:16 +02:00
Joakim Hove
5785d088ea Added functionality in Completion class to adjust I and J to wellHead value if they have been defaulted (i.e. have value -1). This is unfortunate because we loose quite a lot of const correctness. 2014-03-28 18:56:21 +01:00
Joakim Hove
f84ec0bb3f Made injection and production control variables into property variables. 2014-03-21 00:07:23 +01:00
Joakim Hove
011eb8a2c6 camelCased property attributes in the production and injection properties structures. 2014-03-20 23:27:18 +01:00
Atle Haugan
3daaf827c9 Renamed getXyzProperties to getXyzPropertiesCopy. Added new getXyzProperties which currently does not work... 2014-03-20 10:36:57 +01:00
Atle Haugan
af784c6734 Enabled the remaining tests. 2014-03-20 10:31:21 +01:00
Atle Haugan
87599c9841 Moved has/drop/addProductionControl to WellProductionProperties. The same for WellInjectionProperties. 2014-03-20 10:11:56 +01:00
Atle Haugan
fb5c83086a Moved (duplicated) m_isInPredictionMode to WellProductionProperties and WellInjectionProperties. 2014-03-19 10:51:13 +01:00
Atle Haugan
9c64af0b6b Moved BHPLimits and THPLimits to WellProductionProperties and WellInjectionProperties (duplicated). Several unit tests are still commented out - will fix. 2014-03-19 10:42:21 +01:00
Atle Haugan
3040697ccc Added WellInjectionProperties.InjectionControls. Adjusted som unit tests. Removed some dead code. 2014-03-19 10:40:48 +01:00
Atle Haugan
8aee879dc5 Added WellInjectionProperties, modified Well class to use it 2014-03-19 10:40:07 +01:00
Atle Haugan
df40a0aa21 Replaced single-item calls with call to get/setProductionProperties() 2014-03-19 10:13:58 +01:00
Atle Haugan
9650fce19a Using pointers for WellProductionProperties 2014-03-19 10:13:58 +01:00