Commit Graph

151 Commits

Author SHA1 Message Date
Andreas Lauser
0d4996f43f EclMaterialLawManager: rename the *Pointer() methods to something more appropriate
they are now called materialLawParamsPointerReferenceHack() and
oilWaterScaledEpsInfoDrainagePointerReferenceHack() which -- in my
opinion -- describes better what they do and which are also
sufficiently clunky and scary names to deter people from using them.
2016-07-06 12:57:51 +02:00
Andreas Lauser
7192a3495e MaterialLawManager: don't use the materialLawParamsPointer() method in materialLawParams()
this fixes the issue of https://github.com/OPM/opm-material/pull/155
in a better manner. (I hope.)
2016-07-06 11:12:09 +02:00
Andreas Lauser
ad253d699f rename MathToolbox::toLhs to MathToolbox::decay
this is because this method is completely analogous to std::decay()...
2016-06-03 21:28:45 +02:00
Andreas Lauser
71da62bebe fix some signedness issues
mainly these issues stemmed from the fact that floating point values
can be negative and casting negative values to unsigned integers leads
to very large unsigned values instead of 0.
2016-04-20 15:37:09 +02:00
Andreas Lauser
05bf95d232 use Toolbox::scalarValue() instead of Toolbox::value() where appropriate
in opm-material "where appropriate" is equivalent to "everywhere" as
far as I can see.
2016-04-20 11:38:17 +02:00
Andreas Lauser
3e7e35a2a1 squelch masochisic compiler warnings
this is the clang-3.9 and GCC 6.0 edition for the OPM 2016.04 release.
2016-04-17 11:42:33 +02:00
Pål Grønås Drange
ac0652805d Using API get3DProperties() 2016-04-11 14:59:01 +02:00
Pål Grønås Drange
f1405bbafd Updated opm-material to use new opm-parser Eclipse3DProperties API 2016-04-08 15:31:32 +02:00
Andreas Lauser
da401551be clean up the licensing preable of source files
this patch removes the in-file lists in favor of a global list of in
the COPYING file. this is done because (a) maintaining a list of
authors at the beginning of each source file is a major pain in the
a**, (b) for this reason, the list of authors was not accurate in
about 85% of all cases where more than one person was involved and (c)
this list is not legally binding in any way (the copyright is at the
person who authored a given change; if these lists had any legal
relevance, one could "aquire" the copyright of the module by forking
it and replacing the lists...)
2016-03-15 00:58:09 +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
e30b43ad7e fix a bunch of deprecation warnings caused by OPM/opm-parser#687 2016-02-19 23:32:52 +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
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
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
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
58c9022a98 fix a compiler warning 2016-01-29 19:27:52 +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
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
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
cf7d072399 remove some unneeded spaces 2016-01-14 19:35:21 +01:00
Joakim Hove
df618f43a6 Merge pull request #103 from joakim-hove/table-column
Using new table api
2016-01-08 15:29:04 +01:00
Joakim Hove
d8898a1c1a Update EclMateriallawmanager to use new Table api. 2016-01-08 14:35:23 +01:00
Andreas Lauser
e2e05f53f6 Merge pull request #106 from andlaus/remove_asserts
EclEpsScalingPoints: Remove some spurious asserations
2016-01-05 12:10:46 +01:00
Joakim Hove
bc56a40992 Removed assert - allow nonzero min swat. 2016-01-05 12:02:22 +01:00
Andreas Lauser
10f2397c6a EclEpsScalingPoints: Remove some spurious asserations
these were added to make sure that the input data confirms to what is
required by the ECL documentation. It is better to do these
consistency checks externally, though. (and also not just in debug
mode.)
2016-01-05 12:00:39 +01:00
Andreas Lauser
7068aa3669 fix clang-3.5 and GCC-4.9 extra-pedantic warnings
hopefully this fixes all of them. While doing this, I noticed that the
warnings produced by GCC 5 and GCC 4.9 differ. I did not try to
compile it with GCC 5, though.
2016-01-04 15:31:43 +01:00
Andreas Lauser
a9a648a667 make the API of the Spline class more similar to the Tabulated*Function classes 2016-01-04 15:31:16 +01:00
Atgeirr Flø Rasmussen
b9b3a232c4 Silence warnings from Dune includes. 2015-11-10 11:11:24 +01:00
Andreas Lauser
812f556e97 Merge pull request #77 from blattms/redistribute-EclMaterialLawManager
Give access to the shared_ptr of the parameters.
2015-10-28 11:51:01 +01:00
Andreas Lauser
76e31b3323 make it compile again if opm-parser is not available
this is basically a simple #if HAVE_OPM_PARSER which was forgotten...
2015-10-27 12:28:03 +01:00
Andreas Lauser
bc9e243873 Stone1: fix another division by zero
this time, the guilty guy is the base of the "beta" factor.
2015-10-22 18:30:03 +02:00
Andreas Lauser
8a46ffb5bd End-point scaling: prevent division by zero
this occured if threepoint scaling was enabled and the last two
saturations were identical. I'm actually not sure if the deck is valid
in this case (should not twopoint scaling used in this case?), but it
seems like it occures in Real Life (TM) and it is accepted by E100, so
let's do the same. (Note that the behavior of E100 may still be
different if the two last scaled saturation endpoints are identical
and the unscaled ones are not, or vice versa. In that case, the input
data is quite certainly rubbish, though.)
2015-10-22 18:30:03 +02:00
Andreas Lauser
bd3a148e79 Stone1: smallish cleanups
- move the oil relperm for connate water to the parameters. this
  improves performance slightly. (although I have some doubts that the
  effect is measurable in real world simulations.)
- clarify some comments
- remove unneeded parameters from the parameter object of the Stone1
  material law. (reduces memory consumption slightly.)
2015-10-22 18:30:03 +02:00
Andreas Lauser
a38f44a2c3 Stone1: make the results identical to the ones produces by E100
It looks like the equations that scale the saturations for the Stone 1
model given by the Eclipse documentation are wrong. ("wrong" in the
sense that they seem not to be the ones implemented by E100).

With this change, the oil relperm seems to be identical to the ones of
E100 for SPE-1 based test deck. I'd be grateful if somebody else could
have look at this before it is merged.
2015-10-22 18:30:03 +02:00
Andreas Lauser
6636901f12 EclStone1MaterialParams: initialize the exponent correctly
it seems like this was a thinko or a copy-and-pasto...
2015-10-22 18:30:03 +02:00
Andreas Lauser
5622351d5e fix build on GCC 4.4
the explicit include of <array> is beneficial anyway.
2015-10-13 11:46:19 +02:00
Markus Blatt
60b4169283 Give access to the shared_ptr of the parameters.
This is needed to keep the pointer structure when creating
a new material law manager for just a subgrid.
2015-10-08 12:16:12 +02:00
Andreas Lauser
d52579277a use the error macros from opm-common 2015-10-08 11:49:10 +02:00
Andreas Lauser
a99f43428d EclEpsScalingPoints: remove incorrect assertation
the documentation only requires the maximum gas satuation to
correspond to 1-Swco, not that the gas and water relperms are equal at
that point.
2015-10-07 21:23:41 +02:00
Joakim Hove
3136ec04ed Changed Table code to use TableContainer 2015-10-04 17:00:55 +02:00
Andreas Lauser
731d2fccf1 various improvements
- add unit tests for the EclMaterialLawManager and the black-oil PVT classes
- rework the API of the blackoil PVT classes so that it follows the
  initFromDeck() pattern and uses multiplexer classes instead of
  dynamic polymorphism to select the concrete PVT approach
- the former change allowed to use the BlackOil fluid system with
  arbitrary Evaluations, i.e., it is not limited to a single
  Evaluation class which is specified as a class template argument
  anymore.
- more fixes for GCC and clang warnings. now it should be reasonably
  hard to trigger warnings using these compilers.

this commit squashes the following patches:

- add a unit test for the EclMaterialLawManager
- black oil: simplify the WaterPvtInterface
- add a unit test for the PVT classes of the black oil fluid system
- black oil: improvements to the PVT classes
- blackoil PVT: remove dynamic polymorphism
2015-09-29 14:09:19 +02:00
Andreas Lauser
cacf06468f EclMaterialLawManager: remove the non-element specific initialization
This simplifies the satfunc initialization code paths considerably and
avoids troubles with SWATINIT if endpoint scaling and hysteresis is
disabled. on the flipside it now requires more memory in the simple case.

It seems to me that the usual proverb about optimization holds once
more: Say 99.5% of all time: premature optimization is the root of all
evil.
2015-09-28 12:29:20 +02:00
Markus Blatt
1292fbdb43 Prevent missing return statement warning. 2015-09-23 17:11:58 +02:00
Markus Blatt
418c4a5c57 Prevent yet another signed-unsigned warning. 2015-09-23 17:11:08 +02:00
Markus Blatt
d0751b7ff4 Do not store compressedToCartesianIndex mapping
It is only needed during initialization and not afterwards.
Therefore we can save some space here.
2015-09-23 17:09:39 +02:00
Andreas Lauser
b1f9d86974 make it work with single precision scalars 2015-09-23 12:53:13 +02:00
Andreas Lauser
17b7b3b7f3 EclDefaultMaterial: improve the division-by-zero avoidance logic 2015-09-23 12:53:13 +02:00
Andreas Lauser
7dffa66f96 EclDefaultMaterial: calculate the oil relperm according to the ECL technical description
the differences are not huge, but they can be seen...

(note that the "almost" match of the summary files with Eclipse is
still accomplished, but the "spot-on" match with the current opm-core
saturation functions goes away.)
2015-09-23 12:53:13 +02:00
Andreas Lauser
a6499a01aa fix most of the warnings enabled by masochists
most of these people like to inflict pain on themselfs (i.e., warnings
in their own code), but they usually don't like if pain is inflicted
on them by others (i.e., warnings produced by external code which they
use). This patch should make these kinds of people happy. I'm not
really sure if the code is easier to understand with this, but at
least clang does not complain for most of the warnings of
"-Weverything" anymore.
2015-09-23 12:36:52 +02:00