Commit Graph

1204 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
46d1a512c2 Silence unused argument warnings. 2016-02-29 10:35:33 +01:00
Andreas Lauser
8eadacde62 Merge pull request #129 from jokva/fix-header-parser-695
Add missing opm-parser headers
2016-02-26 12:24:50 +01:00
Jørgen Kvalsvik
e467684137 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2016-02-26 11:38:53 +01:00
Andreas Lauser
88e85042e0 Merge pull request #127 from andlaus/fix_twophase_ecl_decks
black-oil PVT: bail out from trying to initialize PVT objects for inactive phases
2016-02-21 18:05:13 +01:00
Andreas Lauser
9b9816d8e9 Merge pull request #128 from andlaus/fix_deprecation_warnings
fix a bunch of deprecation warnings caused by OPM/opm-parser#687
2016-02-19 23:36:45 +01:00
Andreas Lauser
e30b43ad7e fix a bunch of deprecation warnings caused by OPM/opm-parser#687 2016-02-19 23:32:52 +01:00
Andreas Lauser
32980c57d9 black-oil PVT: bail out from trying to initialize PVT objects for inactive phases
this should fix twophase decks, see
https://github.com/OPM/opm-autodiff/pull/576#issuecomment-185770114.
2016-02-19 14:22:40 +01:00
Joakim Hove
54542d997b Merge pull request #122 from jokva/unique-auto-deck
Change Deck access methods/types to references
2016-02-18 22:59:51 +01:00
Andreas Lauser
d5bf1b637a Merge pull request #126 from andlaus/export_drainage_eps_points
EclMaterialLawManager: make the method which provides the scaled drainage end points public
2016-02-17 18:59:37 +01:00
Andreas Lauser
b8d08e7b52 EclMaterialLawManager: make the function which provides the scaled drainage end points public
That is because they might have to modified externally (e.g. if
SWATINIT is computed and applied externally).
2016-02-17 18:56:54 +01:00
Jørgen Kvalsvik
cedb629f6d Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
2016-02-16 16:09:56 +01:00
Andreas Lauser
09f02eb2f4 fluid states: clean up the remaining modules w.r.t. references vs values 2016-02-12 18:43:15 +01:00
Andreas Lauser
307cc6c0f0 clean up the overlay fluid state w.r.t. the type which they return
if the base fluid state returns a reference, the overlay fluid state
should just pass it through instead if copying it. The difference
became relevant with the introduction of Evaluations for localized
AD. (is not relevant if Scalars are floating point values, which was
the only choice when the overlay fluid states were written.)
2016-02-12 18:43:15 +01:00
Andreas Lauser
20c78f5757 test_fluidsystems: improve the naming of the template arguments of the test functions 2016-02-12 18:43:15 +01:00
Andreas Lauser
3ad0c087ca distinguish between rvalues and lvalues in MathToolbox::toLhs<LhsEval>()
the problem is that references to lvalues can be just passed through,
whilst the objects the rvalue references point are temporary and thus
need need to be copied. Fixing this issue forced me to go into the
rabbit hole of the c++ memory model, but at least I guess I now know
what rvalue references ('Foo&&' instead of 'Foo&') are good for...
2016-02-12 18:43:08 +01:00
Andreas Lauser
460dd578d0 Merge pull request #124 from andlaus/valgrind_fix
test_fluidsystems: fix valgrind complaints about unused memory
2016-02-12 11:52:51 +01:00
Andreas Lauser
78db8b01d5 test_fluidsystems: fix valgrind complaints about unused memory
I doubt that this is the reason for this test's segfault on Jenkins,
but it that was a real (if minor) issue...
2016-02-12 11:49:38 +01:00
Andreas Lauser
76af0dd218 Merge pull request #120 from andlaus/fix_toLhs
MathToolbox: return a constant reference for toLhs() (if possible)
2016-02-05 18:56:39 +01:00
Andreas Lauser
39933a747b MathToolbox: return a constant reference for toLhs() (if possible)
also improve the documentation somewhat. (it was a bit "raw on its
teeth".)
2016-02-05 18:53:05 +01:00
Andreas Lauser
47e89e2c9d Merge pull request #118 from andlaus/fix_blackoil_pvt_unit_test
fix the unit test for the blackoil PVT API
2016-02-03 16:13:01 +01:00
Andreas Lauser
7b35935099 fix the unit test for the blackoil PVT API
mea culpa, I forgot to remove the calls to the initEnd() method after
fc933ef94d.
2016-02-03 15:56:49 +01:00
Andreas Lauser
3d9397d274 Merge pull request #115 from andlaus/fix_headercheck
squelch extra-pedantic clang and GCC warnings and fix the headercheck
2016-02-01 13:41:28 +01:00
Andreas Lauser
4dc417fcca squelch extra-pedantic clang and GCC warnings and fix the headercheck
once more, OPM/opm-parser#661 was the culprit for the headercheck.
2016-02-01 13:39:29 +01:00
Atgeirr Flø Rasmussen
051a17cdf4 Merge pull request #114 from andlaus/blackoil_improvements
Blackoil improvements
2016-02-01 13:38:26 +01:00
Andreas Lauser
397f6c67a7 LocalAd: fix the return type of toLhs<LhsEval>()
instead of always copying to the return value we now simply pass
through a const reference if possible.
2016-01-30 14:33:37 +01:00
Andreas Lauser
bb82a6b5e3 black-oil fluid system: take advantage of fluid states which provide Rs() and Rv() directly
this avoids converting Rs and Rv to mass fractions (as provided by the
generic fluid system API) just to immediately convert them back to
dissolution factors (as required by the blackoil PVT objects).

Note that the implementation of this is a bit ugly because it requires
advanced C-preprocessor usage and higher
template-meta-programming-foo. Any ideas of how to do this in a
simpler fashion are welcome.
2016-01-29 19:58:07 +01:00
Andreas Lauser
c0d680adb6 black-oil PVT: implement thermal PVT properties
the primary goal of this patch is to implement what's currently
provided by the opm-core PVT classes, and it is thus not very
comprehensive: some non-standard keywords are required (e.g.,
GCOMPIDX), there has been some guess-working going on, some approaches
are only consequences of what the ECL documentation says (but is not
mentioned explicitly anywhere) and the relations for enthalpy are
still missing (i.e., the quanties provided are insufficient to
implement an energy conservation equation).

the patch works by adding a boolean 'enableTemperature' template
parameter to the multiplexer classes which is set to 'true' by
default. if it is detected that the PVT properties are thermally
dependent the respective *PvtThermal class is used (which in turn
creates an isothermal multiplexer internally).

the schema for the names of the thermal PVT classes
(${PHASE}PvtThermal) is a bit inconsistent with that used for
isothermal PVT classes (${APPROACH}${PHASE}Pvt) which was done to
avoid naming conflicts with the current opm-core PVT classes.
2016-01-29 19:57:58 +01:00
Andreas Lauser
2fce78289f black-oil fluid system: introduce methods to convert mole- into mass fractions
... only for the solutes of hydrocarbon phases.
2016-01-29 19:42:51 +01:00
Andreas Lauser
abc0caea7a black-oil PVT: provide inverse formation volume factors
this makes things go less in circles: before this patch, the
interpolation happened on the inverse formation volume factors, the
PVT classes inverted the result to get the FVF and then the calling
code divided by what fell out of this. Now, the calling code can
directly multiply with the result of the interpolation.
2016-01-29 19:42:09 +01:00
Andreas Lauser
c780233ad1 black-oil PVT: remove the density related methods
instead, the calling code needs to directly use the formation volume
factors to calculate it.
2016-01-29 19:27:52 +01:00
Andreas Lauser
d29c85dc9a blackoil-pvt: introduce a numRegions() method 2016-01-29 19:27:52 +01:00
Andreas Lauser
fc933ef94d blackoil-pvt: simplify the initialization from an ECL-deck
now if the object is initialized using the initFromDeck() method, a
call to initEnd() is not required anymore. IMO, this makes the API
easier to use and more bullet-proof.
2016-01-29 19:27:52 +01:00
Andreas Lauser
fa5a2f66a1 make the meat of the unit tests for fluid states and fluid systems available publicly 2016-01-29 19:27:52 +01:00
Andreas Lauser
58c9022a98 fix a compiler warning 2016-01-29 19:27:52 +01:00
Andreas Lauser
3e54344556 black-oil fluid system: remove some spurious spaces 2016-01-29 19:27:52 +01:00
Andreas Lauser
7c15621160 pvt multiplexers: don't spill the multiplexer macros
the #undef directives were wrong or missing...
2016-01-29 19:27:52 +01:00
Andreas Lauser
10fb871c64 Merge pull request #113 from jokva/clean-up-headers
Improve includes from opm-parser
2016-01-29 14:58:58 +01:00
Jørgen Kvalsvik
3bbfa75644 Improve includes from opm-parser
Adopting to opm-parser PR#661, add previously missing includes.

https://github.com/OPM/opm-parser/pull/661
2016-01-26 13:27:25 +01:00
Andreas Lauser
639f1be605 Merge pull request #112 from andlaus/autonomous_headers
make all headers stand-alone again
2016-01-21 13:18:22 +01:00
Andreas Lauser
5d270f4436 make all headers stand-alone again
i.e., after this all headers are supposed to be fully autonomous again
and can thus be included without preconditions. this property broke
when OPM/opm-parser#656 was merged.
2016-01-21 13:14:01 +01:00
Joakim Hove
2fdacd3f74 Merge pull request #111 from jokva/fix-header-include-parser656
Fixes missing includes (opm-parser PR-656)
2016-01-21 11:58:38 +01:00
Jørgen Kvalsvik
d1a2924e08 Fixes missing includes (opm-parser PR-656)
Adds missing includes which due to PR-656 in opm-parser are no longer
automatically pulled from other headers.
2016-01-19 14:11:44 +01:00
Andreas Lauser
515475a187 Merge pull request #109 from dr-robertk/PR/multiple-precision
Add tests using Scalar=float (try 2).
2016-01-15 22:30:52 +01:00
dr-robertk
925a014b83 Merge pull request #1 from andlaus/fix_float
Fix float
2016-01-15 14:23:08 -07:00
Andreas Lauser
54cb64bcb0 enable testing for Scalar == float for all unit tests
for some unit tests the precision of `float` is insufficient. To at
least enforce that the tested code compiles with `float` as Scalar,
they are wrapped by `while(false)` statements.
2016-01-15 16:07:40 +01:00
Andreas Lauser
29254f2fcc components: fix build failures caused by implicit casts to double
normally this is not a problem, but template functions which take two
arguments, will break, i.e., the following will not compile

```c++
float f = 1.23;
std::max(f, 2.0*f);
```

this is because the second argument for max gets silently cast to
`double` which causes the compiler to be confused because it cannot
determine a uniform type for the arguments passed to
std::max<T>(a, b)...
2016-01-15 16:03:29 +01:00
Andreas Lauser
fe44bcc8f9 Spline: consistently use the same (template) code for the scalar and Evaluation<> cases 2016-01-15 16:01:45 +01:00
Robert Kloefkorn
2a2b5b91de tests: added checks with Scalar=float. All tests compile with Scalar=float, but only
some work.
2016-01-14 17:28:07 -07:00
Robert Kloefkorn
92062f009c PengRobinson: make compile when Scalar is not double. 2016-01-14 17:27:44 -07:00
Robert Kloefkorn
c6c44acb4c LiveOilPvt/WetGasPvt: return value of vectorCopy is std::vector<double>. 2016-01-14 17:27:11 -07:00