Commit Graph
100 Commits
Author SHA1 Message Date
Bård Skaflestad e578f47d8a Catch up to opm-material reorganisation.
Specifically, file <opm/material/constants.hh> was renamed to
<opm/material/Constants.hpp> and this renaming must be reflected in
the CMake probes for opm-material.
2013-10-06 18:04:56 +02:00
Bård Skaflestad dc762989ab Merge pull request #40 from bska/nullptr-deref
Guard against null-pointer dereference.
2013-10-03 07:33:33 -07:00
Bård Skaflestad 7b395fabbb Guard against null-pointer dereference.
This restores the check that was lost in commit 79562ca.
2013-10-03 16:30:54 +02:00
Bård Skaflestad 8ad532c5b8 Fix warnings about "unused" parameters and typedefs.
CLang and recent GCC warn about the "typedef" 'OneColInt' in
AutoDiffHelpers.hpp being unused.  Similarly, GCC warns about unused
parameters in various place at level "-Wunused".  This change-set
either removes ('OneColInt') or suppresses those messages.
2013-09-26 19:21:45 +02:00
Bård Skaflestad 9b38a84507 Merge pull request #36 from atgeirr/master
Expanded README.md, now similar to README in opm-core.
2013-09-24 07:02:41 -07:00
Bård Skaflestad 341f0f666d Merge branch '037_cmake'
This synchronises the opm-autodiff build system with that of opm-core.
2013-09-24 15:55:13 +02:00
Bård Skaflestad 7d86ae5453 Revert " Add special variable for MultiArch-unaware components"
This reverts commit 1cadc5af6d.
2013-09-24 15:24:58 +02:00
Bård Skaflestad 9f411d6179 Revert " Use MultiArch-unaware path for dune.module"
This reverts commit 512d49c41a.
2013-09-24 15:24:48 +02:00
Bård Skaflestad cf9d417cad Merge pull request #34 from totto82/bugfixes
Changes in gravity potential to match Eclipse and Mrst
2013-09-24 04:02:55 -07:00
Bård Skaflestad 243432142e Merge pull request #32 from atgeirr/minor_improvements
A collection of minor improvements
2013-09-24 01:31:15 -07:00
Bård Skaflestad 1e5fdd53b3 Merge pull request #29 from andlaus/adapt_exception_code
Adapt exception code
2013-09-09 03:47:13 -07:00
Bård Skaflestad db1299cf0c Merge pull request #28 from rolk/028_eigen
Improve detection of the Eigen3 library
2013-09-02 01:53:51 -07:00
Bård Skaflestad 56db862baf Add CMake backwards compatibility for version < 2.8.3
Add features that aren't available in early versions of the 2.8.x
release series, enabling use of 2.8.0 if needed (e.g. Ubuntu 10.04)
2013-08-14 23:39:01 +02:00
Bård Skaflestad cb20a8cc74 Merge pull request #22 from jnygaard/scalar_mult
Scalar mult
2013-08-05 01:09:08 -07:00
Bård Skaflestad d92849b419 Merge pull request #21 from andlaus/gcc-4.4
Gcc 4.4
2013-07-30 13:27:53 -07:00
Bård Skaflestad 77193550a6 Merge pull request #19 from akva2/opm_depends
fixed: autodiff depends on opm-core
2013-07-10 07:26:06 -07:00
Bård Skaflestad 9ae786a324 Merge pull request #18 from akva2/eigen3_fix_continuous_installs
fixed: workaround issues with ExternalProject_Add
2013-07-10 01:58:07 -07:00
Bård Skaflestad a9b90b34f8 Use UMFPACK solver if available in sim_simple.cpp.
Fall back to Eigen's BiCGSTAB solver if UMFPACK is not available.  The
BiCGSTAB is built into Eigen and consequently always available when
Eigen is found.
2013-07-09 14:39:44 +02:00
Bård Skaflestad e9ad8f0b5e Merge remote-tracking branch 'andlaus/no-umfpack' into optional-umfpack 2013-07-09 14:34:08 +02:00
Bård Skaflestad 09bd9a44ac Fix mismerge in commit b54df70.
We lost the SuiteSparse detection.
2013-07-09 13:54:47 +02:00
Bård Skaflestad b54df706a9 Merge branch 'master' into optional-umfpack
Conflicts:
	CMakeLists.txt

Import akva2's modified Eigen support.
2013-07-09 13:50:45 +02:00
Bård Skaflestad 221a7261a8 Exclude examples/sim_simple.cpp if UMFPACK is unavailable
Not all systems provide UMFPACK so even if Eigen provides the required
bindings, we should not assume that the underlying library and/or
headers are available.  Currently, only examples/sim_simple.cpp uses
UMFPACK unconditionally, so the simplest solution is to exclude that
example unless UMFPACK is available.
2013-07-09 13:32:35 +02:00
Bård Skaflestad a43fe760c1 Use the shared_ptr<> from Boost.
Not all implementations support the TR1, and if they do, the type
might not be in a namespace called std::tr1 .  Favour the
implementation from Boost for reasons of portability.

This is inspired (and necessitated) by commit OPM/opm-core@68eb3fb
which, incidentally, cleaned up some header pollution on which we
inadvertently depended.
2013-07-04 20:59:29 +02:00
Bård Skaflestad f044d5189a Merge pull request #11 from rolk/011_eigen
Set path to Eigen3 directory with -DEIGEN3_ROOT=
2013-06-25 09:23:11 -07:00
Bård Skaflestad 3e2965a301 Indent file lists using <tab> rather than <space>
This is the common convention throughout all OPM modules' CMake-based
build systems.
2013-06-09 20:40:57 +02:00
Bård Skaflestad b0c09f73be Merge pull request #4 from atgeirr/fully-implicit
Fully implicit simulator
2013-06-03 01:02:47 -07:00
Bård Skaflestad 8bab9f9ff8 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-06-03 00:16:04 +02:00
Bård Skaflestad a67ca87fd3 Encapsulate DUMP contents in "do { ... } while (0)"
This makes the macro more function-like and easier to read.
2013-06-03 00:15:40 +02:00
Bård Skaflestad 2606d94935 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-31 16:07:12 +02:00
Bård Skaflestad 7a44eb8254 Remove blank lines at EOF 2013-05-31 16:07:03 +02:00
Bård Skaflestad bac1a3a364 Add a couple of debugging aids to assist in FIBO development. 2013-05-30 18:43:11 +02:00
Bård Skaflestad d23a1c3066 Coalesce two adjacent '!NDEBUG' sections into one. 2013-05-30 17:56:49 +02:00
Bård Skaflestad 7432ca215f Include <cassert> for assert() macro. 2013-05-24 22:04:58 +02:00
Bård Skaflestad 2b57104097 Prefer BOOST_CHECK_EQUAL to BOOST_CHECK
The former is more assertive than the latter and provides better
diagnostics.  Incidentally, switching to *_EQUAL() also fixes an
assignment that was (probably) intended to be an equality test:

   BOOST_CHECK(count = num)

in both test cases.
2013-05-24 21:59:09 +02:00
Bård Skaflestad eee8c27346 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-24 21:49:27 +02:00
Bård Skaflestad 26e965e858 Add an operator<< for outputting vector results.
Use it out print reservoir and well pressures at end of solution.
2013-05-24 19:15:14 +02:00
Bård Skaflestad 2dffbb3a70 Add gather/scatter support for wells 2013-05-24 17:22:35 +02:00
Bård Skaflestad 747badaea8 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-24 15:56:23 +02:00
Bård Skaflestad c5ad446a0a Include well support in FIBOSolver interface.
Update callers accordingly.
2013-05-24 15:27:19 +02:00
Bård Skaflestad 18b80f49e5 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-24 14:50:46 +02:00
Bård Skaflestad 520a6a0a11 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit 2013-05-24 12:24:42 +02:00
Bård Skaflestad 3a31a1a61f Implement residualNorm() for reservoir part.
This is a prerequisite to having a working Newton loop.

This is a forward-port of commit 604f866.
2013-05-24 11:38:17 +02:00
Bård Skaflestad cf1885fb04 Merge remote-tracking branch 'atgeirr/fully-implicit' into fully-implicit
Conflicts:
	opm/autodiff/ImplicitBOStep.hpp
2013-05-24 11:34:10 +02:00
Bård Skaflestad 604f8666a6 Implement residualNorm()
This is a prerequisite to having a working Newton loop.
2013-05-24 11:28:36 +02:00
Bård Skaflestad 6fcb629e6e Merge pull request #3 from atgeirr/master
Multiple improvements to ImpesTPFAAD
2013-05-24 02:26:33 -07:00
Bård Skaflestad 12e4557b08 Add first cut at fully implicit system assembly.
Compile-tested only.

At this point, we only include reservoir effects--i.e., we don't
consider wells.
2013-05-23 18:28:50 +02:00
Bård Skaflestad 0c9cd6b901 Expose PhaseUsage to clients
This is likely to be a hack, but it does facilitate creating the fully
implicit solver for arbitrary two- and three-phase fluid systems.
2013-05-23 18:26:25 +02:00
Bård Skaflestad 2621283f1d Add operator+=
This simplifies updating residuals.
2013-05-23 18:24:37 +02:00
Bård Skaflestad e2b5586b31 Merge remote-tracking branch 'atgeirr/master' 2013-05-23 13:25:20 +02:00
Bård Skaflestad 04e48cf615 Merge remote-tracking branch 'atgeirr/master' 2013-05-22 13:00:03 +02:00
Bård Skaflestad 6d0202d529 collapseJacs(): Don't assume column-major ordering
The 'InnerIterator' is ordering agnostic, so there is no need to
assume that the Jacobians are stored in a particular ordering.
2013-05-22 11:26:49 +02:00
Bård Skaflestad 04e51491ee Merge pull request #2 from atgeirr/master
Multiple changes and advances
2013-05-22 01:17:51 -07:00
Bård Skaflestad 64b5c83f9d Merge remote-tracking branch 'bska/master' 2013-05-16 11:26:44 +02:00
Bård Skaflestad 409cfb1578 White-space cleanup.
No functional changes.
2013-05-16 11:23:59 +02:00
Bård Skaflestad 72dd6a851e Merge remote-tracking branch 'atgeirr/master' 2013-05-16 10:57:44 +02:00
Bård Skaflestad 0063799e86 Merge remote-tracking branch 'atgeirr/master' 2013-05-16 10:29:19 +02:00
Bård Skaflestad c8fb7169aa Move rel-perm and viscosity calculations closer to use
This is an aesthetic change, only.
2013-05-16 09:58:34 +02:00
Bård Skaflestad fa2e02a579 The 'pflux' is really the hydraulic head.
Rename variable accordingly.
2013-05-16 09:51:34 +02:00
Bård Skaflestad ef354792cd Implement first cut at Darcy (total) flux calculation.
This is compile-tested only.
2013-05-16 09:48:56 +02:00
Bård Skaflestad b46cef383f Build 'test_impestpfa_ad' along with the 'examples' 2013-05-16 09:48:01 +02:00
Bård Skaflestad 8bc5f66d8d Promote 'test_impestpfa_ad' to an 'example'
This was the original intention, but the file was misplaced during
the module reorganisation.
2013-05-16 09:33:58 +02:00
Bård Skaflestad 970f308f59 New sentence -> capital first letter. 2013-05-16 00:10:51 +02:00
Bård Skaflestad b74d988a7b New sentence -> capital letter. 2013-05-16 00:10:32 +02:00
Bård Skaflestad 24204cf33e Merge remote-tracking branch 'atgeirr/master' 2013-05-15 16:10:54 +02:00
Bård Skaflestad e0c85a2fdb Adapt to CMake-based build system.
Specifically,

  - #include <config.h> where appropriate (all .cpp files)
  - Adjust include statements to account for sub-directory locations
    of .hpp files.
2013-05-15 16:10:20 +02:00
Bård Skaflestad d2f412e27a Fix inverted set of automated test cases. 2013-05-15 16:08:56 +02:00
Bård Skaflestad 2500f1ae58 Adopt imported build system to OPM-Autodiff specifics
Updated include statements &c to follow.
2013-05-15 15:49:48 +02:00
Bård Skaflestad 582a947d9b Complete import of CMake support from OPM-Core 2013-05-15 10:40:00 +02:00
Bård Skaflestad 57f73517c0 Move MRST example closer to actual example 2013-05-15 10:37:50 +02:00
Bård Skaflestad 9309024d1e First partitioning into source/examples/tests
Reorganisations are likely.
2013-05-15 10:35:39 +02:00
Bård Skaflestad 5ce44e05e6 This is OPM-Autodiff 0.1
We don't depend on any Dune modules.
2013-05-15 10:26:06 +02:00
Bård Skaflestad 116f39e8ab Import CMake support from OPM-Core 2013-05-15 10:24:52 +02:00
Bård Skaflestad 930b88334f Merge upstream changes. 2013-05-15 10:12:30 +02:00
Bård Skaflestad 9139d8a48b Merge remote-tracking branch 'atgeirr/master' 2013-05-15 10:10:01 +02:00
Bård Skaflestad c0dead5e97 Add spdiag() prototype to silence GCC 4.6 warning.
GCC's flag -Wmissing-declarations requires that a valid prototype
exist for non-template (global) functions prior to the corresponding
function definition.
2013-05-15 09:34:59 +02:00
Bård Skaflestad 0225e6c9ee Ignore autosave files from Vim. 2013-05-14 17:45:20 +02:00
Bård Skaflestad b85c0dce88 Add test cases for density and water viscosity.
Currently, ViscosityAD fails due to missing pressure derivatives in
the viscosity primitives.
2013-05-14 17:29:49 +02:00
Bård Skaflestad cebb6fd5fa Add required fluid densities 2013-05-14 15:46:00 +02:00
Bård Skaflestad eb1836c977 Disable 'param' output for all test cases. 2013-05-14 15:45:31 +02:00
Bård Skaflestad 6583aca34c Default to using tables as-is. 2013-05-14 15:41:45 +02:00
Bård Skaflestad ac5350a598 All "parameter" values must be strings. 2013-05-14 15:41:34 +02:00
Bård Skaflestad 667cae6d84 Expose 'param' and 'deck' in TestFixture. 2013-05-14 15:31:41 +02:00
Bård Skaflestad a1ca968991 Merge remote-tracking branch 'atgeirr/master' 2013-05-14 15:19:13 +02:00
Bård Skaflestad 99c3ec2824 Start a test suite for class BlackoilPropsAd.
Relies on external data ("fluid.data") to describe the fluid model.
2013-05-14 14:59:31 +02:00
Bård Skaflestad 1069cfae6d Merge remote-tracking branch 'atgeirr/master' 2013-05-14 13:41:11 +02:00
Bård Skaflestad a13d78bb06 Start fleshing out overall structure of Newton loop
Specifically,
  - Extract method solveJacobianSystem() for solving a single,
    system of linear equations (i.e., the Newton step).
  - Extract method residualNorm() for computing the residual norm.
    Used in loop control.
  - Stub out a method for computing fluxes.

Compile and run-tested on a linear, gravity-driven flow problem.
2013-05-14 13:40:56 +02:00
Bård Skaflestad 55165bd68d Enforce row-major ordering of the pressure Jacobian
Otherwise, we will use the transposed Jacobian as a coefficient
matrix in the 'linsolver_'.  This is wrong when solving compressible
problems for which the Jacobian matrix is not symmetric.
2013-05-14 11:53:09 +02:00
Bård Skaflestad 3f0f0363c3 Add first, working gravity solution
When run as

    ./test_impestfpa_ad permeability=1.01325e15 ref_pressure=1.0e-5 \
    mu1=1000 mu2=1000 rho1=1 rho2=1

this example reproduces the expected solution (a one-Pascal pressure
increase per cell).

Note that this is an incompressible case, so 'test_impestpfa_ad' must
be compiled with the pre-processor symbol

    HACK_INCOMPRESSIBLE_GRAVITY

defined to a true value (e.g., -DHACK_INCOMPRESSIBLE_GRAVITY=1)
2013-05-14 11:40:07 +02:00
Bård Skaflestad 35cb155537 Merge remote-tracking branch 'atgeirr/master' 2013-05-13 16:37:27 +02:00
Bård Skaflestad e31486e288 Add tentative implementation of gravity flux. 2013-05-13 16:31:26 +02:00
Bård Skaflestad a141e79ead Construct (and store) gravity operator on grid.
The gravity flux of phase 'i' across an (internal) interface is then
given by

    gflux = mob_i * (G * rho_i)

assuming 'rho_i' contains the phase density (at reservoir conditions)
of phase 'i' and 'mob_i' is the phase mobility of phase 'i' at the
interface.
2013-05-13 16:11:48 +02:00
Bård Skaflestad 4b737497d5 Implement static gravity potential in DerivedGeology.
This is a stepping stone towards implementing gravity support in
ImpesTPFAAD.
2013-05-13 13:30:00 +02:00
Bård Skaflestad 4721d402e4 Remove an instance of EOL whitespace. 2013-05-13 10:35:50 +02:00
Bård Skaflestad 61f184cdc9 Use constant intermediate quantities. 2013-05-12 22:48:15 +02:00
Bård Skaflestad a174d4eb51 Put spdiag() into an anonymous namespace.
This avoids warnings (GCC 4.6) about missing prior function declaration.
2013-05-08 19:21:09 +02:00
Bård Skaflestad 92592672fe Use upwind mobility flux. 2013-05-08 15:06:13 +02:00
Bård Skaflestad 093daa93d7 Implement first cut at pressure system assembly.
Compile-tested only.
2013-05-08 14:34:48 +02:00
Bård Skaflestad baab2cdf43 Implement simple constructor for sparse, diagonal matrix.
This is, effectively, the same as MATLAB's

    spdiags(d, 0)

constructor.
2013-05-08 14:32:48 +02:00
Bård Skaflestad 673c044a6c Rename 'phase' parameter p->phase to avoid confusion. 2013-05-08 13:13:57 +02:00
Bård Skaflestad dfd33d8973 Merge remote-tracking branch 'atgeirr/master' 2013-05-08 13:02:59 +02:00