Commit Graph

1405 Commits

Author SHA1 Message Date
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
Andreas Lauser
70949c6edb use std::shared_ptr instead of boost::shared_ptr
our policy is that we only use boost if necessary, i.e., if the oldest
supported compiler does not support a given feature but boost
does. since we recently switched to GCC 4.4 or newer, std::shared_ptr
is available unconditionally.
2013-08-08 13:25:58 +02:00
Roland Kaufmann
51546a5c5f Function has a different name in the parallel vs. serial version 2013-08-07 01:13:08 +02:00
Roland Kaufmann
99eca2a247 Name #defines to be compatible with DUNE macros 2013-08-02 09:03:49 +02:00
Roland Kaufmann
f2f199258d Define API version macros for other code to query
Note the distinction between the version (1.0) and the release label
(2013.03). The latter is not really usable to check for API
compatibility. (See <http://www.semver.org>).
2013-08-01 11:26:10 +02:00
Bård Skaflestad
3e803a4780 Merge pull request #290 from rolk/290_version
Embed version string into the library
2013-07-31 04:57:55 -07:00
Bård Skaflestad
1967631b83 Merge pull request #285 from rolk/285_shadow
Provide way of shadowing only some properties
2013-07-31 04:05:13 -07:00
Roland Kaufmann
155bb2fc9c Include version information in the library
This version information can be queried programmatically by using the
expored opm_core_version symbol.
2013-07-31 12:22:18 +02:00
Bård Skaflestad
2dac509c97 Merge pull request #289 from andlaus/make-gcc44-mandatory
Make gcc44 mandatory
2013-07-30 13:25:35 -07:00
Bård Skaflestad
6d3cbafa54 Merge pull request #288 from andlaus/fix-clang-warnings
fix a few CLang warnings
2013-07-30 12:18:54 -07:00
Andreas Lauser
b52b2cd555 fix new 'unused variable' warnings on GCC
that one was due to the fact that the constructor arguments were no
longer used to initialize (unused) private member variables. These
warnings did not appear in CLang for some reason. Again, thanks to
Bård Skaflestad for the review.
2013-07-30 19:07:46 +02:00
Andreas Lauser
31e7e7e01d better fix for the alignment warning of the previous patch
'work' is a small, constant size array for temporary data so it can be
allocated on the stack and the 'work' parameter can be eliminated entirely.

Thanks to Bård Skaflestad for the suggestion!
2013-07-30 19:07:30 +02:00
Andreas Lauser
562bcf2e7d replace boost::array by std::array
GCC 4.4 supports std::array, so there is not much point in keeping
compatibility with ancient compilers...
2013-07-30 17:46:32 +02:00
Andreas Lauser
5a7992fc56 fix a few CLang warnings
most of them quite insignificant, but still annoying. The only
exception is the warning about the changed alignment for the 'work'
argument of spu_implicit_assemble(). AFAICT, the only reason why it
worked was that the pointer produced by malloc() was passed
directly. (malloc() seems to fulfill all alignment criteria.) To fix
this, I've changed that argument's type from char* to double*.
2013-07-30 16:27:20 +02:00
Joakim Hove
0595269934 Added static_cast<void> to avoid warnings about unused variables 2013-07-30 15:41:32 +02:00
Joakim Hove
f5ac9fc240 Actually using filename argument in GridManager::saveEGRID 2013-07-30 15:37:49 +02:00
Joakim Hove
bdd587bf93 Minor merge fixup - sorry 2013-07-30 14:56:21 +02:00
Joakim Hove
07ed1a19f1 Merge remote-tracking branch 'upstream/master' into save-eclgrid-after-deactivating-cells
Conflicts:
	opm/core/io/eclipse/EclipseGridParser.cpp
	opm/core/io/eclipse/EclipseGridParser.hpp
2013-07-30 14:49:37 +02:00
Roland Kaufmann
a74791bcac Use underscore for data members 2013-07-30 13:24:57 +02:00
Roland Kaufmann
26b2d2794c Provide way of shadowing only some properties
The current implementations of IncompPropertiesInterface are very
all-or-nothing. In some situations, you want to read rock and fluid
properties from an Eclipse file, but use analytical functions for
the unsaturated properties. Or you want to update properties based
on a marching filter.

This patch provides a way to mix various property objects, or to
"shadow" the properties with a raw array of data, so you don't have
to reimplement the entire interface just to make a small change.
2013-07-30 13:11:52 +02:00
Júlio Hoffimann
8385a9bcbb Remove trailing whitespaces 2013-07-28 08:34:13 -03:00
Joakim Hove
9cc3d4dd2d Changed EclipseGridParser::saveEGRID() to take globalCells as input 2013-07-25 12:08:08 +02:00
Joakim Hove
59b99f7444 Added method saveEGRID() on GridManager 2013-07-24 14:43:06 +02:00
Joakim Hove
8c32146093 Rewritten EclipseGridParser to use input actnum instead of ACTNUM from deck 2013-07-24 14:42:40 +02:00
Markus Blatt
4a9dd8c483 Fixes setting the verbosity for AGMG.
If verbosity is true, we set the iprint parameter such that the
output is print to standard out. If not, we use a negative number
such that only error messages are printed to standard out.
2013-07-05 12:19:57 +02:00
Roland Kaufmann
002e22b9ec Zero-initialize structure to avoid returning undefined
The compiler will otherwise complain that we are returning undefined
data. There is no way for the client code to know whether this was
the case.
2013-07-05 10:59:52 +02:00
Bård Skaflestad
d332129676 Merge pull request #274 from blattms/non-tr1
Changed std::tr1 occurences to boost.
2013-07-04 12:01:51 -07:00
Markus Blatt
68eb3fbcb1 Changed std::tr1 occurences to boost.
std::tr1 might not be supported by all compilers and will eventually
be dropped by others. Using boost instead makes this more
portable.
2013-07-04 16:04:35 +02:00
Bård Skaflestad
254f70e504 Merge pull request #267 from laods/verbosity
Change verbosity level of warning message in transport solver
2013-06-28 02:02:31 -07:00
Atgeirr Flø Rasmussen
34f2d637ab Merge pull request #263 from bska/remove-redef-kluge
Disable build kluge that is no longer pertinent
2013-06-24 06:02:10 -07:00
Markus Blatt
4f41c2ac72 Fixed unused parameters and whitespace issues. 2013-06-21 12:49:35 +02:00
Bård Skaflestad
33320270fc Disable build kluge that is no longer pertinent
The <have_boost_redef.hpp> header was introduced (commit 82369f9) as
a work-around for a particular interaction in the Autotools-based
setup of OPM-Core and the Dune core modules.  Notably, Dune's
"Enable" trick for Boost failed on some older Autoconf systems.  Now
that we're using CMake, however, that kluge is no longer needed
because we (OPM-Core) always

  #define HAVE_BOOST 1

i.e., as an explict true/false value.

Therefore, we need no longer include <have_boost_redef.hpp> .  The
header will be removed at a later time.
2013-06-20 23:14:39 +02:00
Markus Blatt
b3f24972cc Fixed spelling 2013-06-20 17:01:35 +02:00
Markus Blatt
c87b98abbb Unifies the way how AMG is called.
After this patch one can set the prolongation factor for all
AMG calls and the number of smoothing steps for all except
of FastAMG that currently only supports on step.
2013-06-20 16:55:07 +02:00
Markus Blatt
97b8203773 Merge remote-tracking branch 'upstream/master' 2013-06-20 16:07:58 +02:00
Lars Vingli Odsæter
f8bad8fd92 Change verbosity level of warning message in transport solver
Don't print message "s was clamped in some cells" unless preprocessor
symbol 'VERBOSE' is set.
2013-06-20 13:30:23 +02:00
Markus Blatt
5072014198 Merge remote-tracking branch 'upstream/master'
Conflicts:
	opm/core/linalg/LinearSolverIstl.cpp
2013-06-19 14:55:50 +02:00