Commit Graph

847 Commits

Author SHA1 Message Date
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
Arne Morten Kvarving
73f21509d8 use a fully qualified source0 url 2013-10-30 10:51:25 +01:00
Andreas Lauser
f8f64e66d1 Valgrind: fix a small issue that only appears with multiple compile units
this were forgotten 'inline' statements for some client request functions.
2013-10-29 12:23:13 +01:00
Arne Morten Kvarving
e95867b1ff update packaging 2013-10-22 13:29:59 +02:00
Roland Kaufmann
38cbfd638e Install header-only pkgconfig file to generic lib/
The previous version assumed that we had libraries, and thus always
installs the .pc file in the multi-arch library directory. However,
we now have modules which does not have a library, but whose header
files still need to be located. Since the lib/ directory is usually
in the pkgconfig search path, it is natural to put them there.
2013-10-21 17:19:35 +02:00
Roland Kaufmann
cb26cae664 Specify dir. layout and stylesheets in common templates
These options should be common to all OPM modules to get the same look
for the generated documentation.
2013-10-21 17:19:33 +02:00
Andreas Lauser
0a5c518211 update the label of the release 2013-10-21 15:57:42 +02:00
Andreas Lauser
25d3d784cf add Doxylocal file
this is supposed to fix 'make doc'
2013-10-16 12:20:16 +02:00
Andreas Lauser
5e8232d2f3 change API version to 3.0 2013-10-12 16:17:50 +02:00
Roland Kaufmann
fcecd662ba Allow static linking for SuiteSparse to be forced
If -DSUITESPARSE_USE_STATIC=ON, then the build system will only look for
static versions of the libraries that are part of SuiteSparse, even if
dynamic/shared versions are present on the system. Thus, the default of
preferring dynamic libraries can be overridden.

SuiteSparse is rarely built ourselves, but still uncommon enough to not
be present on computing clusters.

This patch allows us to install the libraries on a workstation, for
instance from package suitesparse-devel and link to it statically
without having to maintain our own build tree.
2013-10-11 19:56:25 +02:00
Roland Kaufmann
a26284ba61 Pass BUILDNAME and SITE options along to CTest/CDash
By passing these options through ./configure, one can use dunecontrol
to build a complete stack and still get a customized description in
CDash (such as when building in a cluster or VM where the actual machine
name does not matter, or when you want to add key options to the name
shown) without having to run a second configuration just to set those
in the cache.

Also fixes a bug where --with-cmake would skip any further option
specified after it.
2013-10-08 19:20:25 +02:00
Roland Kaufmann
336a7b99c7 Enable MPI if path is given
Assume that ./configure --with-mpi= also implies --enable-mpi; if you
absolutely want to specify path without enabling (?!) then you can do
--with-mpi=... --disable-mpi (in that order).

This patch look for anything after the equal sign of the --with
parameter and only set the variable _MPI_PREFIX_PATH if that is given;
it always toggle USE_MPI.
2013-10-08 13:49:14 +02:00
Roland Kaufmann
553bfd1805 Use dSYM bundles as debugging containers (on MacOS X)
gdb on MacOS X does not seem to be very fond of "flat" dSYM files, but
it can read the bundle variant fine. Thus we change that to enable
debugging across several tools.
2013-10-04 14:20:40 +02:00
Andreas Lauser
aa6c0cd0e3 also install the *.inc files
*grr* forgetting to adapt the file lists constantly pops up as an
 issue. thanks to @akva2 for finding it (once more)!
2013-09-26 17:42:37 +02:00
Andreas Lauser
8e2e9d4ef0 tabulated component: don't catch NumericalProblem anymore
this lead to a compiler warning on gcc 4.8 that this case was already
covered by catching std::exception. Since we did the same in both
branches anyway, these statements were not required...
2013-09-25 16:14:24 +02:00
Bård Skaflestad
e784fc8a97 Catch up to opm-material reorganisation.
Specifically, file <opm/material/constants.hh> was renamed to
<opm/material/Constants.hpp> and this renaming must be reflected in
the CMake probes for opm-material.
2013-09-25 10:57:57 +02:00
Andreas Lauser
6c3fe32feb use monotonic splines for the black-oil curves 2013-09-24 19:21:33 +02:00