so far, using function evaluation objects instead of primitive
floating point scalars only worked for trivial parameter caches which
do not store any values (most of the time, this means that the
ParameterCache is `NullParameterCache`), or it explicitly did not work
(like for `Spe5ParameterCache`). this patch fixes the problem by
making the parameter caches of fluid systems template classes which
are templated on the type of scalar values. On the flipside, this
requires changes to all downstream modules that use fluid systems.
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...)
in my testing, the GCC SVN version from 4th of March causes problems
if lvalue references are just passed through and neither GCC-5 nor
clang 3.6 show any obvious differences in performance. (I guess that's
because of the copy elision compiler optimizations in conjunction with
inlining.)
It is also worthwhile to know that clang 3.6 is about 20% faster with
ebos than both, GCC-6 and GCC-5. I can only speculate why this is the
case, but since the performance improvement seems to evenly apply to
the linearization and linear-solve parts, the auto-vectorizer of clang
possibly works better for ebos than the one of GCC...
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
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.)
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...
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.
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.
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.