Commit Graph
1441 Commits
Author SHA1 Message Date
Tor Harald Sandve 62f81859cd Extend relperm and capilary pressure tables with constant values such
that the derivatives at the endpoints are zero
2013-09-24 11:14:22 +02:00
Tor Harald Sandve badc3c0e9e Extrapolate unsaturated function values as in Eclipse and Mrst 2013-09-24 11:14:22 +02:00
Andreas Lauser a0c41819f7 include <tuple> in Spline.hpp
it seems like this is implicitly included by some other header, but
only in debug mode. *grr* thanks to @bska for catching this...
2013-09-23 15:21:39 +02:00
Andreas Lauser c971e7c590 remove 'constexpr' from the property system
it is not really needed and unneccessarily breaks the build on gcc-4.4
2013-09-23 13:45:41 +02:00
Atgeirr Flø Rasmussen d086ee5c63 Merge pull request #344 from andlaus/import_propertysystem
Import propertysystem
2013-09-23 04:18:02 -07:00
Bård Skaflestad af1e3de84b Merge pull request #379 from rolk/379_famg
Fix LinearSolverIstl cleanup also for fast AMG branch
2013-09-23 01:31:04 -07:00
Andreas Lauser 71e6638f04 className(): minor comment and guard macro name fixes 2013-09-20 12:45:10 +02:00
Andreas Lauser 1b3217ec4b className(): get rid of the ugly ClassNameHelper_ class
since full specialization of function templates is okay in C++ (only
partial specialization is not allowed for them).
2013-09-20 12:36:40 +02:00
Andreas Lauser c3cc059860 className(): remove unused argument object for the className(foo) variant
some compilers may warn about this under some circumstances.
2013-09-20 12:18:10 +02:00
Roland Kaufmann 8faf68dabb Replace int with size_t to avoid possible size mismatch 2013-09-20 10:53:47 +02:00
Roland Kaufmann 44d1dac890 Fix LinearSolverIstl cleanup also for fast AMG branch
To avoid deprecation warnings the number of smoothing steps was passed
through the Criterion instead of directly to the constructor in commit
a7f32b934b.

However, due to an insufficient test matrix this was not tested using
the fast AMG variant of DUNE so it breaks the builds if
`-DHAS_DUNE_FAST_AMG` is defined.

This change should apply the same type of change to this branch as for
the others. The number of smoothing steps is put into a constant to
avoid the magic number 1 to appear in too many places (although I am
not sure the number for pre- and post-smoothing always should be the
same).
2013-09-20 10:00:21 +02:00
Andreas Lauser e15a28de68 add authors to the files according to git logs 2013-09-19 20:09:07 +02:00
Andreas Lauser d5770b92ea Import the property system from eWoms 2013-09-19 20:08:59 +02:00
Andreas Lauser 9284edb16b import Dune's class name code 2013-09-19 20:00:14 +02:00
Atgeirr Flø Rasmussen 86d09115b9 Merge pull request #345 from andlaus/import_splines
Import splines
2013-09-19 10:26:02 -07:00
Andreas Lauser 0d0ab3bd5a refactor the spline code: merge everything into one class 2013-09-19 18:48:54 +02:00
Atgeirr Flø Rasmussen 3ef57842a9 Merge pull request #376 from rolk/376_warn
Quelch needless warnings (found by Clang)
2013-09-19 05:05:00 -07:00
Roland Kaufmann 82cf04d9f1 Convert functions in anonymous namespace into statics
These functions are referred to from templates which may not be
instantiated. Since they were in an anonymous namespace they were
not reachable otherwise, and a warning is emitted. This only applies
to Clang; GCC consider them used.

If we make them static helper functions instead, the warning
disappears.
2013-09-19 13:10:16 +02:00
Roland Kaufmann 244c867505 Don't warn about functions not emitted
If a function is used by a template but this template is not
instantiated, the function will still be defined in the header
of a module but it won't be callable because it is in an anonymous
namespace and thus we get a warning.

This only happens in Clang; GCC consider functions referenced from
templates as used.

fixup! Don't warn about functions not emitted
2013-09-19 13:09:44 +02:00
Roland Kaufmann a7f32b934b Set linear solver steps in criterion instead of ctor
The constructor that takes the number of steps is deprecated; this
generates needless warnings.
2013-09-19 10:32:49 +02:00
Roland Kaufmann 18fad484ed Use struct since that was the original declaration
Otherwise we get a warning later when the real thing is defined.
2013-09-19 10:00:31 +02:00
Andreas Lauser c106385d9e move the new stuff to opm/core/utility 2013-09-18 23:02:16 +02:00
Atgeirr Flø Rasmussen 1b78495769 Merge pull request #364 from andlaus/fix_headers
fix headers
2013-09-18 03:54:47 -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
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 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
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 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
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 3c465de5be Merge pull request #340 from rolk/340_suitesparse
Remove subdirectory from SuiteSparse include
2013-08-26 06:04:21 -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
Roland Kaufmann e9bd8464b2 Replace old timestep completed event with new scheme 2013-08-26 13:08:49 +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
Roland Kaufmann e41c56d0da Remove subdirectory from SuiteSparse include
SuiteSparse may or may not be installed in a suitesparse/ directory.

FindSuiteSparse will look in a suitesparse/ subdirectory when trying
to locate umfpack.h, but it will add the full directory to the compiler
command-line (e.g. `-I/usr/include/suitesparse`) and not that of the
parent. Since the parent is usually included too, it is not noticed
that it is advertedly using another include paths than its own.

However, if we have SuiteSparse installed in a non-system location,
using the subdirectory in the `#include` statement may now cause an
error, even though configuration actually found SuiteSparse!
2013-08-25 09:35:51 +02:00
Roland Kaufmann ada41cc792 Remove bindings to AGMG from library
AGMG is now under a closed-source license, meaning that results
obtained with this solver is not freely reproducible by others.
Its use is therefore discouraged.

As of version 2.3, the DUNE AMG parts are competitive, so there
is a free and open alternative.
2013-08-13 23:25:04 +02:00
Bård Skaflestad c50b62fe5a Merge pull request #308 from rolk/308_agmg
Resurrect support for AGMG library

This is an interim milestone that may serve as point from which to 
resurrect the AGMG suppert fully if the AGMG author ever decides to 
re-release the software under an open licence.
2013-08-13 14:17:38 -07:00
Andreas Lauser bd094b2e11 replace boost::scoped_ptr by std::unique_ptr
thanks to Bård Skaflestad, Atgeirr Rasmusen and Roland Kaufmann for
the hint.
2013-08-08 15:21:38 +02:00