Commit Graph

3745 Commits

Author SHA1 Message Date
Bård Skaflestad
4765286e75 Merge pull request #367 from rolk/367_ssparse
Fix search for SuiteSparse/UMFPACK when path is explicitly given
2013-09-12 01:32:31 -07:00
Roland Kaufmann
22297c42f2 Allow use of uppercase version of the _ROOT var
The convention is to use uppercase names, in particular our own
./configure script uses this, so we should at least allow it here
(in addition to the old way for backward compatibility)
2013-09-12 10:10:19 +02:00
Roland Kaufmann
1c69a03f26 Don't set a default search path; use CMake's default
If we set a default search path ourself, then this will be used if we
specify a SuiteSparse_ROOT with error! Instead, we should just leave
our SuiteSparse_SEARCH_PATH variable empty and then let CMake fill in
its defaults. If there is a directory specified on the other hand
(indicating that we want exactly that location), only use that and
turn all the default paths completely off.
2013-09-12 10:08:19 +02:00
Bård Skaflestad
63779f03fa Merge pull request #366 from rolk/366_redhat
Detect OS version when running on RHEL/CentOS 5.x
2013-09-12 00:43:57 -07:00
Roland Kaufmann
9df45bf39d Test variables instead of contents
If you test the contents of a variable, this is not necessarily true
in CMake (since the contents here is a path, and not a variable name;
the default test is "does this variable exist", not "is this a non-
empty string" like in shell script)
2013-09-12 09:36:19 +02:00
Roland Kaufmann
dba7c228ce Detect OS version when running on RHEL/CentOS 5.x
These versions only have /etc/redhat-release, not any of the newer
files.
2013-09-11 22:49:00 +02:00
Atgeirr Flø Rasmussen
4eb03c7e87 Merge pull request #365 from bska/shadowing-symbols
Reduce likelihood of shadowing symbols in OPM_THROW
2013-09-11 04:33:33 -07:00
Andreas Lauser
16e7b7ac33 fix headers
make all non-implementation headers includable without
preconditions. Also, this removes the GravityColumnSolver.hpp file,
because it tried to include a non-existing file and it was thus unused.
2013-09-11 13:11:47 +02:00
Bård Skaflestad
6d84217836 Reduce likelihood of shadowing symbols in OPM_THROW
The OPM_THROW macro uses an internal symbol, 'oss', which is, strictly
speaking, in the client's namespace.  Moreover, as the
"EclipseGridParseHelpers.hpp" header uses the same symbol, and for
similar purposes, this produces warnings at "-Wshadow" in GCC when
compiling that header.

Rename the macro's symbol to 'oss__' (double trailing underscore) to
reduce the likelihood of shadowing a previous definition.
2013-09-11 01:03:25 +02:00
Bård Skaflestad
a4b80532f6 Merge remote-tracking branch 'upstream/master' 2013-09-10 23:42:43 +02:00
Bård Skaflestad
4254832fae Merge pull request #363 from andlaus/require_opm_core_in_opm_material
require opm-core from the opm-material module
2013-09-10 14:24:56 -07:00
Andreas Lauser
8399cff98f require opm-core from the opm-material module
this is required to use the exception code of opm-core in
opm-material. Also, the Dune prerequisites of opm-material can be
removed once PR #345 is merged into opm-core...
2013-09-10 13:34:47 +02:00
Bård Skaflestad
dba6ee9e32 Merge remote-tracking branch 'upstream/master' 2013-09-10 10:42:09 +02:00
Bård Skaflestad
a1f2036b3e Merge pull request #361 from rolk/361_cxxpath
Test for executable and preserve erroneous path for messages
2013-09-10 01:40:40 -07:00
Roland Kaufmann
7285bd8fdf Test for executable and preserve erroneous path for messages
If an alternate compiler is specified, then check if this is actually
executable before assigning it so that we don't end up with specifying
an empty name to CMake. If the path does not exist, it will be preserved
so that CMake will complain with an easily identifiable error message.
2013-09-10 08:55:25 +02:00
Bård Skaflestad
a9a73474c1 Merge remote-tracking branch 'upstream/master' 2013-09-09 16:03:44 +02:00
Bård Skaflestad
bc13496fa2 Merge pull request #356 from blattms/fix-compiler-path-from-variable
Extracts the full compiler path and feeds it to cmake.
2013-09-09 07:01:30 -07:00
Andreas Lauser
8ef3b6e6c7 introduce classes for monotonic, full, periodic and natural cubic splines 2013-09-09 13:29:50 +02:00
Andreas Lauser
2302fc6ce5 add functions to analytically invert polynomials up to degree three 2013-09-09 13:29:37 +02:00
Andreas Lauser
575855f896 add tridiagonal matrix
this class can do both, more and less than dune-istl's BTDMatrix. more
because it supports entries on the lower left and upper right, less
because it does not support a block structure. The primary motivation
for this class were the spline classes which for which the former
feature is required to implement periodic splines and the latter is
not necessary...
2013-09-09 13:17:47 +02:00
Andreas Lauser
d42178c203 Introduce OPM_UNUSED as a portable wrapper to __attribute__((unused))
This works pretty much the same way as DUNE_DEPRECATED (without message).

Thanks to Elias Pipping for implementing this.

dune-common SVN revision: r6556
2013-09-09 13:16:21 +02:00
Bård Skaflestad
8f0be4c421 Merge remote-tracking branch 'upstream/master' 2013-09-09 12:55:31 +02:00
Bård Skaflestad
0652b09210 Merge pull request #352 from andlaus/refactor_exception_classes
Refactor exception handling code
2013-09-09 03:45:44 -07:00
Andreas Lauser
4db6760b9d fix the SparseVector and SparseTable unit tests
also, throw std::logic_error in the OPM_ERROR_IF macro
2013-09-06 13:27:14 +02:00
Bård Skaflestad
fb64b96695 Merge pull request #359 from rolk/359_cart
Document Cartesian info fields for unstructured grids
2013-09-06 01:13:34 -07:00
Roland Kaufmann
a25e3ea851 Document Cartesian info fields for unstructured grids
The previous text contained an ambiguity of the contents of the field
global_cell in case it was non-null; this could be interpreted as if
the grid was non-Cartesian. However, this is not the convention that
has been followed in current clients.

The new text writes a warning about this, as well as giving a tip on
how an unstructured grid may be signaled through the structure (the
cartdims field is zero-initialized in the create_empty_grid function,
so this array must be actively initialized by the client).
2013-09-06 09:51:26 +02:00
Andreas Lauser
5d435d396c catch all exceptions in all tutorials and examples 2013-09-05 13:04:38 +02:00
Andreas Lauser
c4c771e39b ErrorMacros: remove compatibility macros 2013-09-05 13:04:38 +02:00
Andreas Lauser
23f215bec4 convert users of MESSAGE to OPM_MESSAGE 2013-09-05 13:04:38 +02:00
Andreas Lauser
c25ec5999e convert users of the ASSERT and the ASSERT2 macros to standard assert() 2013-09-05 13:04:37 +02:00
Andreas Lauser
19e5d5cea2 convert THROW to OPM_THROW 2013-09-05 13:04:37 +02:00
Andreas Lauser
0eaf62c7e3 Add a file with OPM specific exceptions 2013-09-05 13:04:37 +02:00
Andreas Lauser
47bb5cde46 refactor the exception throwing code 2013-09-05 13:04:37 +02:00
Andreas Lauser
7a5a725f25 Replace boost::is_integral by std::is_integral 2013-09-05 13:04:37 +02:00
Andreas Lauser
3c9baded80 replace BOOST_STATIC_ASSERT by C++-2011's static_assert 2013-09-05 13:04:37 +02:00
Andreas Lauser
d11db08084 include iostream in the files which use std::cerr or std::cout
for some of these files this is needed to make to keep it compiling
after the next patch because the new ErrorMacros.hpp file will no
longer implicitly includes <iostream>. for the remaining files it is
just good style.

While at it, the includes for most of these files have been ordered in
order of decreasing abstraction level.
2013-09-05 13:04:37 +02:00
Markus Blatt
f35b177f3e Change which test for cmake28 to use command -v. 2013-09-05 12:49:57 +02:00
Markus Blatt
7b2ed3a5e1 substituted which with command -v. 2013-09-05 12:49:21 +02:00
Bård Skaflestad
1d61208d88 Merge pull request #357 from andlaus/test_std_is_integral
C++-11 Features: add test for std::is_integral
2013-09-05 02:01:05 -07:00
Andreas Lauser
f983af5a0b C++-11 Features: add test for std::is_integral 2013-09-03 17:49:18 +02:00
Markus Blatt
cefd7e7702 Extracts the full compiler path and feeds it to cmake.
Previously, specifying the compiler name with a variable
to configure ("configure CC=gcc") lead to CMake complaining
that <builddir>/$CC was not a valid path. This patch fixes
this by extracting the full path with "which <compiler>".
Should fix issue #355.
2013-09-02 18:03:05 +02:00
Bård Skaflestad
a1315bc0ca Merge remote-tracking branch 'upstream/master' 2013-08-30 16:45:56 +02:00
Bård Skaflestad
0b9834be56 Merge pull request #331 from rolk/331_sync
Provide protocol for exchanging state with client
2013-08-30 07:41:14 -07:00
Roland Kaufmann
5348ffd467 Provide protocol for exchanging state with client
The state that is passed to the simulator object is directly
accessible without any encapsulation towards the client. After
the notification callback was introduced, this allows the client
to observe the state in the middle of a simulation.

However, it may be that the simulator has some internal state
which is not reflected in the state object because there is a
cost associated by flushing it into the TwophaseState format.

The notification is called back on every timestep, not just the
ones that will do reporting. It may even be that reporting is
done dynamically and is not known at the time of setup. (It is
more like a condition variable).

Consequently, flushing the state in every timestep is a bad
idea. This patch sets up a new method sync() which it is expected
that the notification will call if it needs the state for
reporting purposes.

Currently it is a no-op. It just establishes a protocol that
other, compatible implementations can also use.
2013-08-30 15:14:22 +02:00
Bård Skaflestad
e06a423920 Merge remote-tracking branch 'upstream/master' 2013-08-28 21:10:13 +02:00
Bård Skaflestad
76a7cba75e Merge pull request #351 from rolk/351_cxx
Alternate compiler cannot be set with environment variables
2013-08-28 04:10:39 -07:00
Bård Skaflestad
cf90e27830 Merge pull request #350 from rolk/350_dunemod
Dune.module is searched for in the wrong directory
2013-08-28 03:53:08 -07:00
Roland Kaufmann
23e1896e40 Mimic Autotools way to specify non-standard Boost
If Boost is installed in say /usr/include/boost141 and
/usr/lib64/boost141, then there is no root you can specify to pick
them both up. However, whereas Autotools uses --with-boost and
--with-boost-libdir, FindBoost in CMake changes to using two different
variables: BOOST_INCLUDEDIR and BOOST_LIBRARYDIR. Using the header
directory for BOOST_ROOT will not work (in particularily not with
old CMake versions).
2013-08-28 11:03:15 +02:00
Roland Kaufmann
976c5c54a2 Print version number in log together with location 2013-08-28 09:47:52 +02:00
Roland Kaufmann
c26ea374ea Special handling for some recognized env. vars.
CMake does not like that you specify the compiler with the environment
variables, instead preferring that you set them as cache variables.
This layer translate between the names of the the two.
2013-08-28 00:27:41 +02:00