Commit Graph

31 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
31dd76a39f Add some tests for the unit constants. 2016-12-05 12:49:45 +01:00
Jørgen Kvalsvik
18de2c0751 Correct unit for Field gas-oil+oil-gas ratio
The FIELD units don't use identity in their converison from SI, as the
unit is Mscf/stb rather than m3/m3.
2016-11-29 13:52:50 +01:00
Atgeirr Flø Rasmussen
d34711d600 Make constructor explicit, fix operator<<. 2016-10-25 11:39:43 +02:00
Jørgen Kvalsvik
f2e509f59f UnitSystem named constructors with automatic storage 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
f9cb516b99 Remove DeckPtr+ParserPtr aliases
Remove the deprecated DeckPtr and ParserPtr aliases and removes
shared_ptr<Deck> and friends from all interfaces.
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
56608e9a10 3DProperties default constructible
This also means UnitSystem must be default constructible, which now
makes the default unit system metric. GridProperties must also be
default constructible (a valid 0x0x0 grid with no properties).
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
c893a92aa6 Make Dimension+UnitSystem no longer use shared_ptr 2016-10-19 20:38:27 +02:00
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
Joakim Hove
0d4bfdea2d Added vector overload of unit onversion methods. 2016-10-06 11:47:49 +02:00
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
Jørgen Kvalsvik
de9ecedf2d Fix warnings in COMPSEGUnits 2016-07-13 23:40:09 +02:00
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
6e542cb083 rename ParseMode as ParseContext in Units folder. 2016-03-17 08:29:32 +08: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
Joakim Hove
1bde4e48ec ParserKeywords::hasDimension() check all records. 2015-11-11 10:39:11 +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
Andreas Lauser
b1de0bf338 unit system: add temperature
this requires the possibility of specifying an offset for the SI
conversion because Eclipse in its eternal wisdom chooses to specify
temperatures using degrees Celsius and degrees Fahrenheit instead of
using Kelvin an Rankine...
2014-12-03 16:56:25 +01:00
Arne Morten Kvarving
3827ddca64 fixed: mark static symbols as such to quell warnings 2014-05-15 14:46:16 +02:00
Andreas Lauser
50f2288148 units: rename "m" to "Mass" 2014-02-11 12:45:44 +01:00
Andreas Lauser
ae73345763 units: rename "K" to "Permeability" 2014-02-11 12:45:43 +01:00
Andreas Lauser
19d89d44cd units: Replace "P" by "Pressure" 2014-02-11 12:45:43 +01:00
Andreas Lauser
0129a382a8 units: Replace "L" by "Length" 2014-02-11 12:45:43 +01:00
Andreas Lauser
6a97d78cc6 units: replace "t" with "Time"
this makes things more explicit and more readable
2014-02-11 12:45:41 +01:00
Arne Morten Kvarving
4a9c18ac9f run tests through valgrind 2014-01-27 15:16:34 +01:00
Joakim Hove
04ae0a1798 Final applyUnits commit ... 2013-12-14 10:31:07 +01:00
Joakim Hove
94f9cf55a4 Removed UnitSystemMap. 2013-12-14 10:05:24 +01:00
Joakim Hove
c86b220e40 Added Dimension::equal() method. 2013-12-12 12:12:45 +01:00
Joakim Hove
ff13036a58 Changed unit system to use more std::shared_ptr instead of instance variables. 2013-12-09 17:42:20 +01:00
Joakim Hove
5bc27e91f2 Added basic system for units - not yet hooked into the Parser items. 2013-12-08 19:26:30 +01:00