Commit Graph

863 Commits

Author SHA1 Message Date
Andreas Lauser
e319859b20 FluidSystems::BlackOil: increase the fugacity coefficient of gas in water by a factor of 1000
this makes the PVS model work with SPE-9 and the NCP model to converge
better...
2014-01-24 15:15:22 +01:00
Andreas Lauser
4605bd9d55 remove all vim and emacs modelines
for emacs, add a toplevel .dir-locals.el file instead...
2014-01-16 18:41:00 +01:00
Andreas Lauser
f441ae9797 simplify the valgrind client request helpers
the macros where used to make the influence of the valgrind calls zero
even for debug builds if valgrind client requests were
unavailable. Since this resulted in some inconsistencies, and the
performance hit is not terribly large, we now always use the same
inlined functions. For optimized builds the impact of those is still
zero...
2013-12-14 12:03:44 +01:00
Roland Kaufmann
9f4c145f09 Only add linker option if it is not really there
This code is run unconditionally each time we do a reconfigure; if the
option is added at each time, they will accumulate (needlessly) on the
command-line, making it harder to inspect the log.
2013-12-12 15:48:30 +01:00
Roland Kaufmann
99d9c9092d Provide CMake find module for opm-autodiff
If the module root is not explicitly specified, the loading of its
configuration is delegated to a find module, which does a heuristic
search in known/surrounding directories. Most OPM modules use the
common logic in OpmPackage; this patch configures the search
specifically for opm-autodiff.
2013-12-12 15:48:30 +01:00
Roland Kaufmann
1f342d3907 Search after new Eigen3 versions in sibling dirs
If we have checked out a newer Eigen3 directory in a sibling directory
to ours, assume that this is because the system version is obsolete and
that we want to use this one instead.
2013-12-12 15:48:29 +01:00
Roland Kaufmann
75f84731d4 If given build tree as Eigen3 root, find source
Eigen3 is a template-library, so we must compile the source code
directly together with ours instead of linking to a library.

If the build script gives us the location of a "built" Eigen3,
meaning a directory in which CMake has been run, locate the true
source directory from the cache entries.
2013-12-12 15:48:29 +01:00
Andreas Lauser
7983bdb057 fix the screw-ups caused by 23e513c 2013-12-03 12:13:53 +01:00
Andreas Lauser
8cdd2923c9 update the in-file copyright holder statements
this patch is quite large as there were various bug fixes to the
script which generates these statements
2013-12-02 17:26:34 +01:00
Andreas Lauser
23e513c584 replace in-source copyright comments by the standard OPM ones 2013-12-02 16:35:57 +01:00
Andreas Lauser
99362cf2e4 configure: fix all except one warning produced by shellcheck
thanks to @bska for pointing this tool out!
2013-11-25 18:50:21 +01:00
Roland Kaufmann
daa6c84ba9 Only add parent directories for actual variants
Otherwise we'll inadvertedly add the root directory and will probably
find the system implementation underneath there.
2013-11-25 18:50:21 +01:00
Roland Kaufmann
c22f5e2e51 Only add build sub-directory if it is actually used
Otherwise the search will cascade down one level too many.
2013-11-25 18:50:21 +01:00
Roland Kaufmann
bda0bdfe71 Search in build/ sub-dir if only suite root is given
If the package suite was given (e.g. DUNE_ROOT=/blum), then the code
set up the root for each individual package automatically (e.g.
DUNE_COMMON_ROOT=/blum/dune-common), but the path which was then
activated did not get the local build sub-directory (e.g. if we are
building opm-autodiff in /frub/opm-autodiff/build, then the local
build directory is "build/"), and thus this was not appended to the
library search path. The result was that the source was found (because
the root pointed to a valid source tree), but the library was not
(because it is "hidden" in the subdirectory).
2013-11-25 18:50:21 +01:00
Andreas Lauser
96ab863a45 remove all print statements in classes intended for use of other modules
because these classes should not have any side effects. case in point:
the warnings intended to be printed once get printed once per process
which can be quite a few times for parallel simulations with thousands
of cores. This could also be avoided by checking the MPI rank, but
IMHO this is way too much boilerplate code for a feature of questionable
value.
2013-11-23 00:47:49 +01:00
Andreas Lauser
f14693af18 fix syntax error in configure shell script
strangly enough, it seems to work like it was in some circumstances...
2013-11-22 18:41:04 +01:00
Andreas Lauser
4537574c50 include the latest review comments by Roland Kaufmann 2013-11-21 12:56:33 +01:00
Joakim Hove
071cff4ced Changed the check_cxx_source_compiles() in Findopm-parser to look for Deck.hpp; Parser.hpp had uneccasary complicated interaction with cJSON 2013-11-21 12:56:33 +01:00
Andreas Lauser
a339029cdb configure script: add a stub implementation for the --config-cache argument
so far, it is only a flag which prevents the cache from being
deleted. To warn the user about a potential infinite loop, a warning
is printed if this flag was specified and some compiler or some compiler
flags were set by the user. This idea was proposed by Roland Kaufmann.
2013-11-21 12:56:33 +01:00
Andreas Lauser
03972c1ba9 configure script: also delete the cmake cache
This replicates the autotools behavior and was suggested by Roland
Kaufmann.
2013-11-21 12:56:33 +01:00
Andreas Lauser
15e0775d71 build system: prevent endless loop when using dunecontrol
this seems to be a bug in cmake 2.8.10.2: if the user sets the
CMAKE_CXX_COMPILER variable for a build directory where this variable
has already been set, one gets an endless loop. This stings especially
if using the dunecontrol compatibility layer as the compiler flags are
unconditionally set via the CXX_FLAGS environment variable in the
options file. Running duncontrol on a module twice will thus trigger the
infinite loop if some compiler flags are set by the user.

The solution is relatively simple: Delete the CMakeFiles directory
before calling cmake. for the dunecontrol compatibility mode, we do
this in the configure script. For details about the cmake bug, see
http://www.cmake.org/Bug/view.php?id=14119
2013-11-21 12:56:33 +01:00
Andreas Lauser
7e78229c3b fix test for HAVE_QUAD on some instances of ubuntu 13.10
I haven't figured out why this happens, but on one of my computers
running kubuntu 13.10 g++ says the following if one tries to use
quadruple precision math:

/home/erne/src/ewoms/ewoms/common/quad.hh: In static member function ‘static quad std::numeric_limits<__float128>::min()’:
/home/erne/src/ewoms/ewoms/common/quad.hh:52:14: error: unable to find numeric literal operator ‘operator"" Q’
     { return FLT128_MIN; }

since this happens only on this machine and only with the c++ (but
not the C) compiler, i suppose that this is either an upgrade issue
with kubuntu or an issue with the ubuntu gcc stack. Strangely enough,
my other kubuntu machine does not have a problem with that...

In any case also testing for assignability of constants and using the
C++ compiler for the quadmath test won't hurt...
2013-11-21 12:56:33 +01:00
Joakim Hove
185c1fc399 Updated modules to find Opm-parser 2013-11-21 12:56:32 +01:00
Joakim Hove
768b9e8c44 Updated modules for Findcjson and Findopm-parser 2013-11-21 12:56:32 +01:00
Joakim Hove
5d532b4fa6 Added opm-parser-prereqs.cmake 2013-11-21 12:56:32 +01:00
Joakim Hove
b26e84a75f Added CMake find modules opm-parser and cjson 2013-11-21 12:56:32 +01:00
Roland Kaufmann
a2dcdd9450 Only add option for shared libraries once
The way the test was done previously, it was added for *every* option
after `--enable-shared`, not only that one.
2013-11-21 12:56:32 +01:00
Roland Kaufmann
e3672bd7bc Allow to search for multiple libraries in package
Some packages are split up in several library files, where each of them
doesn't have their own CMake find-module. So we cannot put this list in
the prerequisites. Unlike the headers, where we just add the directory,
all the libraries must be explicitly named on the link line. Thus, we
should allow to specify more than one name in the lib parameter.

The first name specified is designated as the "primary" library and is
assigned to the _LIBRARY variable; the others occur in _LIBRARIES as if
they were prerequisites.

Note that the build system cannot replicate this setup itself; it always
assumes that we are building (at most) one library from the source
files.
2013-11-21 12:56:31 +01:00
Andreas Lauser
9af95b234b Parker-Lenhard: work around a debug mode bug of GCC 4.4
The resize() method for std::vector seems to copy an uninitialized
object for the new objects in the array on GCC 4.4. This means that we
should not assume that the copied objects are finalized in the
Parker-Lenhard parameters. Strangely enough this only seems to affect
older GCCs (at least 4.4) and only in debug mode...
2013-11-16 10:10:42 +01:00
Andreas Lauser
a4e3e771d7 EclDefaultMaterial: produce something meaningful for krn()
at least mathematically meaningful. whether it makes sense phyiscally
is still to be determined...
2013-11-15 17:10:48 +01:00
Andreas Lauser
eb95c78cef Capillary pressure laws: enforce that parameter objects are finalized before they are used
this only has an effect if compiled in debug mode, i.e., if the NDEBUG
symbol is not defined.
2013-11-15 16:15:10 +01:00
Andreas Lauser
0a7e764310 add a tabulated piecewise linear two-phase material law
this is intended to be used for ECLIPSE saturation curves, but the
code is more generic. (Be aware that using cubic splines for the
interpolation between sampling points is probably a better choice in
most cases.)
2013-11-14 18:46:27 +01:00
Andreas Lauser
dc2baad36c fix headercheck 2013-11-14 11:55:11 +01:00
Andreas Lauser
078eea9a9a make EclDefaultMaterial three-phase API conformant 2013-11-14 11:55:00 +01:00
Andreas Lauser
0b1c225b1a guard macros: _HH -> _HPP 2013-11-13 18:45:52 +01:00
Andreas Lauser
f451a0629b test_fluidmatrixinteractions: mark some variables as OPM_UNUSED
this should prevent some warnings on GCC 4.6. Thanks to Arne Morten
Kvarving for investigating this.
2013-11-13 12:27:37 +01:00
Andreas Lauser
ee253954d1 Brooks-Corey: explicitly include <cmath>
it seems to be implicitly included by newer compilers, but not GCC
4.4. In this case I agree with GCC 4.4...

Thanks to Bård Skaflestad for the hat-tip.
2013-11-13 11:37:37 +01:00
Andreas Lauser
ca4201001a rename "pcwn" to "pcnw" and "pcng" to "pcgn"
because it is p_n - p_w and p_g - p_n instead of the other way round.
2013-11-12 18:11:40 +01:00
Andreas Lauser
97b250b1f6 fluid-matrix interactions: API extension
- add methods to calculate the derivatives of the capillary pressures
  and relative permeabilities with regard to the phase saturations,
  temperature, absolute pressure and phase composition
- extend the unit test to enforce the above
- make the NullMaterial conform to the API and add it to the unit test
- introduce Opm::NullMaterialTraits for material laws that don't use
  any phase indices
2013-11-12 18:11:40 +01:00
Andreas Lauser
fcf7e58cb0 add the three-phase capillary pressure law Eclipse uses by default 2013-11-11 13:23:55 +01:00
Andreas Lauser
a2600964ae Cosmetic change: remove the subdirectories for sources of the tests
that was a leftover of eWoms/Dumux...
2013-11-11 13:23:55 +01:00
Andreas Lauser
7c0ff8309f Refactor the twophase laws
They are now all generic capillary pressure laws, but with some
additional methods to make working with them easier. For this reason,
they have been moved up one directory to opm/material/fluidmatrixinteractions

Also, a unit test which ensures that all capillary pressure laws
conform to their respective APIs has been added.
2013-11-11 13:23:47 +01:00
Andreas Lauser
332c2f64b3 rename doxygen groups "fluidmatrixinteractions(laws|params)" to "FluidMatrixInteractions"
and improve the van Genuchten law
2013-11-05 13:13:16 +01:00
Andreas Lauser
720f51cee3 fix end of namespace comments
long live python ;)!
2013-11-04 14:15:53 +01:00
Andreas Lauser
79689e467e blackoil fluid system: rename gasFormationFactor to gasDissolutionFactor
that was a thinko/reado of mine...
2013-11-04 14:07:53 +01:00
Andreas Lauser
7b49b64eb7 capillary pressure laws: move the M-phase laws one directory up
since they are also generic in the sense that they can depend on
arbitrary quanities expressed by the fluid state, not just
saturations...
2013-11-03 17:03:36 +01:00
Andreas Lauser
2ff952494b H2O: remove too expensive range checks
when they worked, they were only used in debug mode anyway...
2013-11-03 15:38:00 +01:00
Arne Morten Kvarving
62d6ab18ac make packaging compatible with EL5 2013-10-30 17:26:33 +01:00
Arne Morten Kvarving
b683a8acb1 el5 adjustments 2013-10-30 13:24:01 +01:00
Andreas Lauser
324cce0e0b Merge pull request #15 from akva2/qualified_source0
use a fully qualified source0 url
2013-10-30 03:36:22 -07:00