Commit Graph

3875 Commits

Author SHA1 Message Date
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
Roland Kaufmann
47b2c64675 Always search for dune.module in no-arch lib-dir
The previous version may have ended up in lib64/ instead of lib/;
now we remove the arch-specific suffix from the path, and always
use the no-arch version.
2013-08-27 23:18:36 +02:00
Roland Kaufmann
1065ca3589 Noarch lib-dir was only used in one wrong place
dune.module does not contain any paths to architecture-specific
binaries. It is therefore always installed in no-arch lib/ directory.
Thus, there is no need to have a variable for this, and there was
no other users of this variable either.
2013-08-27 22:26:21 +02:00
Bård Skaflestad
d5f36f14ac Merge pull request #349 from rolk/349_ertver
Test ERT for a newer API level
2013-08-27 07:36:08 -07:00
Roland Kaufmann
8131f70434 Test ERT for a newer API level
We use an ERT version which needs to know whether at least this
function signature exists. The earlier implementation covers too
many versions.
2013-08-27 14:37:14 +02:00
Roland Kaufmann
78e1fe14d4 Merge pull request #348 from rolk/348_ssroot
Allow build tree of SuiteSparse to be used as root
2013-08-27 00:17:33 -07:00
Roland Kaufmann
476aff4697 Allow build tree of SuiteSparse to be used as root
With this changeset, the build tree of SuiteSparse can be used as the
root; the package does not have to be installed.
2013-08-27 09:05:04 +02:00
Bård Skaflestad
98fc921ce3 Merge remote-tracking branch 'upstream/master' 2013-08-26 18:30:50 +02:00
Bård Skaflestad
74380b0964 Merge pull request #335 from rolk/335_multiver
Support multi-versioned installation
2013-08-26 06:08:36 -07:00
Bård Skaflestad
8b98840a72 Merge pull request #346 from andlaus/fix_superlu_and_quadmath
Fix superlu and quadmath
2013-08-26 06:07:22 -07:00
Bård Skaflestad
0522184cfb Merge pull request #334 from rolk/334_macver
Support configuration on MacOS X using Apple toolchain
2013-08-26 06:05:38 -07:00
Bård Skaflestad
3c465de5be Merge pull request #340 from rolk/340_suitesparse
Remove subdirectory from SuiteSparse include
2013-08-26 06:04:21 -07:00
Bård Skaflestad
5edf6be8aa Merge pull request #342 from rolk/342_signals
Provide event mechanism using C++11 instead of Boost::Signals
2013-08-26 05:59:32 -07:00
Roland Kaufmann
ccf4fcae12 Change from pass-by-value to pass-by-const-ref
The object is copied when put into the list, so there should be no
danger of dangling references.
2013-08-26 14:33:23 +02:00
Bård Skaflestad
372ed60f3c Merge pull request #339 from andlaus/alugrid_parallel_found_no_list
avoid to make ALUGRID_PARALLEL_FOUND a list
2013-08-26 04:22:14 -07:00
Bård Skaflestad
1d28905cb1 Merge pull request #341 from rolk/341_known
Mark known feature variables as used
2013-08-26 04:17:15 -07:00
Roland Kaufmann
542d607674 Remove dependency on Boost::Signals
The functionality has been replaced with equivalents from C++11.
2013-08-26 13:11:25 +02:00
Bård Skaflestad
e9ac0eaade Merge pull request #343 from andlaus/ewoms_add_opm_material
add opm-material to the eWoms prerequisites
2013-08-26 04:09:27 -07:00
Roland Kaufmann
e9bd8464b2 Replace old timestep completed event with new scheme 2013-08-26 13:08:49 +02:00
Andreas Lauser
980a1b6eb9 add opm-material to the eWoms prerequisites
this is needed by the imminent switch of eWoms to the OPM build
system.
2013-08-26 13:06:34 +02:00
Roland Kaufmann
3156d0749a Add classes for event-handling
The new classes Event and EventSource can be used as a simple mechanism
for implementing event-based callbacks in the simulators.
2013-08-26 12:52:03 +02:00