Commit Graph

3870 Commits

Author SHA1 Message Date
Roland Kaufmann
cdc45b2d56 Trim needless header includes 2013-11-25 14:14:45 +01:00
Roland Kaufmann
1cda556cb9 Remove dependency on ERT in header 2013-11-25 14:14:45 +01:00
Roland Kaufmann
5ce5975586 Coalesce called methods into init and timestep 2013-11-25 14:14:45 +01:00
Roland Kaufmann
572123675d Updated copyright statement at top 2013-11-25 14:14:45 +01:00
Roland Kaufmann
92fd082630 Remove now unused member holding starting time
If we restart from a later time, then the SimulatorTimer should be
restarted in that state as well, so it is already always a reflection
of how far we've progressed in the input file's schedule.
2013-11-25 14:14:45 +01:00
Roland Kaufmann
f637a0cea9 Replace summary variables with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
cf8c58a33d Replace restart and solution handling with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
b0a4881d45 Replace init setup with RAII type 2013-11-25 14:14:45 +01:00
Roland Kaufmann
3b8d42ca02 Make grid writing part of the grid type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
2ae164a878 Replace grid construction with RAII type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
97b0dcc3ac Centralize all time conversion
Remove duplicate code into a common helper function
2013-11-25 14:14:44 +01:00
Roland Kaufmann
f845163a0b Replace file name handling with RAII type 2013-11-25 14:14:44 +01:00
Roland Kaufmann
fa03df1e8b Replace data series handling with RAII type
The EclipseKeyword class takes care of cleaning up the handle after we
are done using it, and provides several convenience constructors that
make the code read easier.
2013-11-25 14:14:44 +01:00
Roland Kaufmann
7d7470d36b Add generic version of getXxxValue
This allows us to call getIntegerValue/getFloatingPointValue from
generic code where the type to be used is a template parameter.
2013-11-25 14:14:44 +01:00
Bård Skaflestad
1467a16a34 Merge pull request #439 from andlaus/fix_configure_syntax_error
fix syntax error in configure shell script
2013-11-25 03:52:30 -08:00
Bård Skaflestad
aa9117cf02 Merge pull request #420 from rolk/420_state
Refactor BlackoilState and TwophaseState to have a common interface for writing
2013-11-25 03:30:38 -08:00
Bård Skaflestad
6c56cff450 Merge pull request #436 from rolk/436_searchdir
Search in build/ sub-dir if only suite root is given
2013-11-25 02:29:41 -08:00
Andreas Lauser
c1fc5c53c6 fix syntax error in configure shell script
strangly enough, it seems to work like it was in some circumstances...
2013-11-22 18:39:49 +01:00
Roland Kaufmann
3c3e14daed Merge pull request #430 from andlaus/fix_infinite_configure
build system: prevent endless loop when using dunecontrol
2013-11-21 03:07:34 -08:00
Roland Kaufmann
9e54d276bd Only add parent directories for actual variants
Otherwise we'll inadvertedly add the root directory and will probably
find the system implementation underneath there.
2013-11-18 13:19:58 +01:00
Roland Kaufmann
6d433017a4 Only add build sub-directory if it is actually used
Otherwise the search will cascade down one level too many.
2013-11-18 13:19:18 +01:00
Roland Kaufmann
4379ee8da6 Search in build/ sub-dir if only suite root is given
If the package suite was given (e.g. DUNE_ROOT=/blum), then the code
set up the root for each individual package automatically (e.g.
DUNE_COMMON_ROOT=/blum/dune-common), but the path which was then
activated did not get the local build sub-directory (e.g. if we are
building opm-autodiff in /frub/opm-autodiff/build, then the local
build directory is "build/"), and thus this was not appended to the
library search path. The result was that the source was found (because
the root pointed to a valid source tree), but the library was not
(because it is "hidden" in the subdirectory).
2013-11-18 11:21:06 +01:00
Andreas Lauser
58122cc2f5 include the latest review comments by Roland Kaufmann 2013-11-15 13:14:50 +01:00
Atgeirr Flø Rasmussen
1ad84ae3fe Merge pull request #431 from bska/simplify-cpchop-output
CornerPointChopper: Tidy code to output GRDECL format of subsample
2013-11-14 08:36:42 -08:00
Bård Skaflestad
6aacc4f738 Merge pull request #432 from joakim-hove/find-opm-parser
CMAKE: check_cxx_source_compiles() in Findopm-parser to look for Deck.hpp
2013-11-14 08:19:21 -08:00
Joakim Hove
dc27dc1adf Changed the check_cxx_source_compiles() in Findopm-parser to look for Deck.hpp; Parser.hpp had uneccasary complicated interaction with cJSON 2013-11-14 10:20:05 +01:00
Bård Skaflestad
ca5c7bcb6e Remove long-disabled code
The code to condense the output using repeat counts was disabled
long ago (commit fc992da).  If we ever need this feature, we can
bring it back from history or reimplemented in a refined fashion.
2013-11-13 20:41:07 +01:00
Bård Skaflestad
d4b522459a outputField(): Use straight-line code
There is no need to use a nested loop to output a constant number of
items per line.  We only need to output a '\n' rather than a ' '
after every "nl" item output.
2013-11-13 20:37:59 +01:00
Bård Skaflestad
ac4fd4d0cd writeGrdecl(): Use outputField() for COORD and ZCORN
This leverages the "number-of-items-per-line" parameter introduced
in commit 608d4c1.
2013-11-13 20:33:13 +01:00
Bård Skaflestad
608d4c1a11 outputField(): Parametrise number of items per line
This is in preparation of leveraging the outputField() helper for
printing COORD and ZCORN too.
2013-11-13 20:29:47 +01:00
Andreas Lauser
4c1f238fb3 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-13 15:21:39 +01:00
Roland Kaufmann
9bb4941a38 Extract common parts of blackoil and incomp. state
Put the identical parts of the simulator state into a base class that
they can be referenced from when adressing the common fields.
2013-11-13 13:48:28 +01:00
Andreas Lauser
6b037027c3 configure script: also delete the cmake cache
This replicates the autotools behavior and was suggested by Roland
Kaufmann.
2013-11-13 11:46:27 +01:00
Bård Skaflestad
b59ec1639a Merge pull request #429 from karbor/master
Output newline after last entry before "/" when outputting grid to file....
2013-11-12 00:33:32 -08:00
Bård Skaflestad
20819e4861 Merge pull request #427 from andlaus/fix_spline
spline: some fixes to make Spline::intersect() work correctly
2013-11-11 12:54:20 -08:00
Andreas Lauser
ff619105eb fixup! spline: avoid bogous "might be used uninitialized" compiler warning on GCC 2013-11-11 18:13:43 +01:00
Andreas Lauser
2f36aa10fa 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-11 17:04:23 +01:00
Kari B. Skjerve
d18a90bced Output newline after last entry before "/" when outputting grid to file. This make gridfile more robust for later usage. 2013-11-11 14:13:38 +01:00
Roland Kaufmann
63f95c317d Merge pull request #428 from andlaus/make_quadmath_test_more_strict
fix test for HAVE_QUAD on some instances of ubuntu 13.10
2013-11-11 04:41:37 -08:00
Andreas Lauser
434a3a8dd5 spline: avoid bogous "might be used uninitialized" compiler warning on GCC 2013-11-10 17:55:41 +01:00
Andreas Lauser
c7703c0949 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-09 17:04:46 +01:00
Andreas Lauser
ae901534c3 spline: fix the monotinic_() method and creation of monotonic splines
also, extend the unit test for it. (*phew* that was much more fun than
appreciated because of all the index shifts. I'm still not 100% sure
that everything works in all corner cases, but at least my confidence
is at 95%.)
2013-11-07 19:53:31 +01:00
Andreas Lauser
c9067c4bda spline: some fixes to make Spline::intersect() work correctly
most of these issues are fallout from the conversion of the spline
class from a moments (second derivative) based approach to hermite
base functions:

- the second and third derivatives where incorrect, and the third
  derivative was not available in the public interface.
- The unit test did not check the derivatives
- The coefficients for the monomial basis were off by the factors
  stemming from the derivatives
- The intersectIntervall_() method used std::max() instead of
  std::min() at one place and still added the base offset for the x
  values as indicated by Stoer
2013-11-07 15:06:59 +01:00
Atgeirr Flø Rasmussen
86ca995629 Merge pull request #423 from rolk/423_eclbin
Write reservoir state in Eclipse binary format
2013-11-06 02:53:59 -08:00
Roland Kaufmann
55bfa65b30 Merge pull request #418 from joakim-hove/cmake-find-opm-parser
Add cmake capabailities to locate opm-parser and cJSON
2013-11-04 23:50:38 -08:00
Bård Skaflestad
ca9b5e1bee Merge pull request #416 from rolk/416_lib
Allow to search for multiple libraries in package
2013-11-04 10:24:29 -08:00
Bård Skaflestad
5d5ae9e877 Merge pull request #419 from flikka/blackoilstate-equals
Blackoilstate equals function, with tests and data
2013-11-04 06:19:57 -08:00
Kristian Flikka
ed8efaefe1 Replaced include math.h with cmath, and changed from fabs to abs. Fixed an error in the testfile, a filename was wrong 2013-11-04 13:51:32 +01:00
Bård Skaflestad
a848bba93f Merge pull request #417 from rolk/417_shared
Only add option for shared libraries once
2013-11-04 02:05:34 -08:00
Andreas Lauser
07ed5b4339 use bar instead of Pascal as the unit for the pressure field
Eclipse seems to write bars...
2013-11-01 11:36:06 +01:00