Commit Graph

2589 Commits

Author SHA1 Message Date
Roland Kaufmann
f5c82a00b1 Compile with debug symbols and strip afterwards
Always include debug symbols in the build, and strip them to a separate
file after compiling. The GNU debugger will automatically pick up the
external debug symbols due to a link we put in the executable.

Having debug symbols do not affect the level of optimization in the GNU
toolchain.
2013-02-11 22:36:49 +01:00
Roland Kaufmann
0443b80cfc Include configuration file without directory spec.
If the program is built out-of-source-tree then the configuration file
(which is generated and not part of the source) will not be available
relative to the source code file.
2013-02-11 22:36:49 +01:00
Roland Kaufmann
d37e7740bd Remove test when the feature is not available 2013-02-11 22:36:49 +01:00
Roland Kaufmann
6aae2aeda4 Compile programs in the tests/ directory 2013-02-11 22:36:49 +01:00
Roland Kaufmann
2a653ab51a Link with DUNE if available 2013-02-11 22:36:48 +01:00
Roland Kaufmann
b057f4ccea Probe for DUNE libraries
Search for known headers and library files that indicates that DUNE is
available on the system, and setup compiler and linker variables.

Unfortunately, this module has hard-coded some knowledge of the
dependencies on other modules, and knowledge of which symbols that
should be defined. This information must be revised whenever a new
version of DUNE is released, because it is hard and error-prone to
infer this automatically.

As for the name of the modules, see the comment by mblatt at 2012-05-22
in the thread about CMake evaluation in the DUNE user forum:
<http://www.dune-project.org/flyspray/index.php?do=details&task_id=1000>
2013-02-11 22:36:48 +01:00
Roland Kaufmann
b435e1994e Link with SuperLU if available 2013-02-11 22:36:48 +01:00
Roland Kaufmann
5d54f2728b Include all necessary information to link in standard variables
Users shouldn't be required to add anything that the standard variables
in their own CMakeLists.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
85a8ef5ead Provide binary value for HAVE_SUPERLU 2013-02-11 22:36:48 +01:00
Roland Kaufmann
a1141b56f7 Add define for SuperLU later than 2005
This is a prerequisite for using the find module, but some code
explicitly check this macro anyway.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
779b02dda2 Search module for SuperLU library
Original downloaded from:
  <https://svn.dune-project.org/svn/dune-istl/branches/cmake/cmake/modules/FindSuperLU.cmake>

Renamed to all capitals in name so that the name of the package is
consistent with the variables it returns.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
f5c9f97c83 Link with UMFPACK in SuiteSparse if available 2013-02-11 22:36:48 +01:00
Roland Kaufmann
751c721c55 Probe for SuiteSparse libraries
Search for modules in this library in the same style as Boost; by
specifying a list of components. If all on the list is present, then
a list of libraries to link with, is returned.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
5876ab7f30 Check for dynamic linking of Boost::Test library
BOOST_TEST_DYN_LINK must be defined if you are *building* Boost::Test as
a shared object, and the client programs must also include this option
when they use the header files, to link to it correctly.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
370b8580d1 Link with C++ Boost library 2013-02-11 22:36:48 +01:00
Roland Kaufmann
21c4194b7c Link against XML parser library 2013-02-11 22:36:48 +01:00
Roland Kaufmann
b47d0de4c6 Link against BLAS+LAPACK numerical libraries
The tests for these packages are part of the standard CMake installation
so there is no config modules for them here.
2013-02-11 22:36:48 +01:00
Roland Kaufmann
1af93bd757 Use generic boilerplate macro to include packages 2013-02-11 22:36:47 +01:00
Roland Kaufmann
4dd3f9ec96 Append standard variables to project after finding package
Normally a package returns a set of standard variables such as
Xxx_INCLUDE_DIRS. Adding this to a list that is collected for the
project amounts to a bunch of boilerplate which can rather be
encapsulated in a macro.
2013-02-11 22:36:47 +01:00
Roland Kaufmann
644fc9f5cf Don't repeat option if already present 2013-02-11 22:36:47 +01:00
Roland Kaufmann
a4cf98055d Add options without repeating them on the command-line 2013-02-11 22:36:47 +01:00
Roland Kaufmann
9a1b24c621 Compile with C++0x/11 if available
We want to compile with the -std=c++0x since DUNE uses this settings and
we need to use the same ABI as that one if we are going to link with it.

Find module is a copy of the one in cmake/modules in (the cmake branch of)
dune-common.
2013-02-11 22:36:47 +01:00
Roland Kaufmann
ddd9728f5e Added library version 2013-02-11 22:36:47 +01:00
Roland Kaufmann
6021359643 Remove files which are not part of the official library
Some files are distributed with the source, but does not end up in the
final shared object. These files are captured by the glob, so we have
to remove them afterwards. (There are fewer of these files than
explicitly list all files that should be included in the build).
2013-02-11 22:36:47 +01:00
Roland Kaufmann
400715656b Put results of platform checks in configuration header
Various features in the code base will be enabled depending on the
values written by the build system in here.
2013-02-11 22:36:47 +01:00
Roland Kaufmann
eee961a527 Define function to write a list of variables to config.h
A fundamental problem with the configure_file() command is CMake is that
the author of the template file config.h.in must know which variables
all modules need to have defined, and this is not easily communicated.

The idea behind this function is: Each Find-module can return a list of
variables that it has filled with probed values, and that should be
written to config.h, which is again included by the header file of this
module.

Each project thus defines its own config.h file, which is common between
all module's headers.
2013-02-11 22:36:47 +01:00
Roland Kaufmann
ec4c39c0d0 Ignore files generated by the CMake scripts 2013-02-11 22:36:47 +01:00
Roland Kaufmann
f675894df3 Barebones CMake configuration file 2013-02-11 22:36:47 +01:00
Roland Kaufmann
9f5eff19a2 Remove remnants of old attempt to support CMake 2013-02-11 22:36:47 +01:00
Atgeirr Flø Rasmussen
fab3ea9723 Merge pull request #93 from bska/ert-nondefault-location-build-fix
Fix build if ERT is installed in a non-default location
2012-11-08 23:31:48 -08:00
Atgeirr Flø Rasmussen
8af339d6be Merge pull request #92 from bska/signed-vs-unsigned-ert
Fix signed-vs-unsigned comparison warning
2012-11-08 23:30:45 -08:00
Bård Skaflestad
55263da177 Fix build if ERT is installed in non-default location
The existing description did not properly account for ERT (or, more
appropriately, the "libecl" part of ERT) being installed in a
non-default location (e.g., somewhere below ${HOME}).

As EclipseGridParser.hpp declares various ERT-dependent types and
functions if a build configuration supports ERT (activated by the
`--with-ert' configure option), we need a proper include path to
reference the ERT headers.  The fix is simple--just insert the
$(ERT_CPPFLAGS) into the already existing $(AM_CPPFLAGS).
2012-11-08 13:59:19 +01:00
Bård Skaflestad
44f54cb712 Fix signed-vs-unsigned comparison warning
The existing code compared the output of data->size(), which is a
std::vector<double>::size_type (typically std::size_t) and therefore an
unsigned integer type to the number 'grid.number_of_cells' which is a
(signed) 'int'.  This leads to an annoying warning when increasing the
warning level in GCC.

While here, also insert code to verify that the 'stride' is a positive
number lest the subsequent assignment loop reference (*data) elements
out of bounds.
2012-11-07 17:23:45 +01:00
Bård Skaflestad
eb4bf0a373 Merge pull request #91 from joakim-hove/writeEclActive
Write ecl active
2012-11-07 06:40:00 -08:00
Joakim Hove
43adfaeda5 Added start_date_ property to the SimulatorTimer class 2012-11-07 14:53:26 +01:00
Joakim Hove
a3efb49de2 Added comments + make sure to only export active cells in writeEclData 2012-11-07 13:31:46 +01:00
Bård Skaflestad
d399b2d7cc Merge pull request #89 from atgeirr/gravity-in-wells
Gravity in wells
2012-11-07 03:53:04 -08:00
Joakim Hove
f1d2a0db95 Merge pull request #90 from atgeirr/binary_io
Fix for writeECLData()
2012-11-06 22:28:08 -08:00
Atgeirr Flø Rasmussen
ae6c388546 Fix incorrect size in ecl_kw_alloc() call.
Also, add more checks to ensure sanity.
2012-11-06 20:45:49 +01:00
Atgeirr Flø Rasmussen
5ca3f98725 Update CompressibleTpfa wellbore gravity handling.
Should now be in sync with cfs_tpfa_residual C interface. Simple well
gravity model implemented.
More flexibility in well gravity models would be a natural future extension.
2012-11-06 19:28:22 +01:00
Atgeirr Flø Rasmussen
bbc80e4b83 Add HAVE_ERT guards to writeECLData.cpp. 2012-11-06 16:18:22 +01:00
Bård Skaflestad
9a33a3266e Merge branch 'master' into gravity-in-wells 2012-11-06 15:37:06 +01:00
Bård Skaflestad
d64ccdfbfd Merge pull request #88 from joakim-hove/IMPORT
Minor fix to import_rewrite when rewrite is run in current directory.
2012-11-06 06:35:57 -08:00
Joakim Hove
5c81635563 Minor fix to import_rewrite when rewrite is run in current directory. 2012-11-06 15:16:01 +01:00
Bård Skaflestad
69070133bd Merge branch 'master' into gravity-in-wells 2012-11-05 15:48:07 +01:00
Atgeirr Flø Rasmussen
ef297d90ea Merge pull request #87 from atgeirr/multidim_upwind
Time-of-flight: multidimensional upwinding and new program
2012-11-05 05:29:02 -08:00
Atgeirr Flø Rasmussen
51bbc85a26 Bugfix tof computations with multidimensional upwinding.
Cell tof depends on downwind face tof in a more complicated way
with multidim upwinding, this was not done correctly.
2012-11-05 14:26:00 +01:00
Bård Skaflestad
f466ae6a51 Account for gravity in well connection flux calculation
We previously ignored effects of gravity in the calculation of the well
connection fluxes (i.e., perforation fluxes).  This commit includes
those effects where appropriate.
2012-11-01 13:34:27 +01:00
Atgeirr Flø Rasmussen
3325d4ef39 Implemented multidimensional upwinding.
The 'SMU' variant is chosen for its smoothness.
2012-10-30 13:10:50 +01:00
Atgeirr Flø Rasmussen
3aef179030 Merge branch 'master' into multidim_upwind 2012-10-30 10:35:41 +01:00