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
Bård Skaflestad
ea1cdcd478
Assert non-empty state quantities.
...
This avoids generating a null-pointer dereference for
&s[0]
in case of s.empty().
2013-05-08 13:02:51 +02:00
Bård Skaflestad
3ff5347ac9
Distinguish fluid from geology properties.
...
Most of class ImpesTPFAAD deals (or will deal) with fluid properties
with only a token nod to the geology--mostly in the form of derived
quantities such as transmissibility and pore volumes. There is no
need to conflate the roles of fluid interface and geology interface
for this purpose.
2013-05-08 09:39:48 +02:00
Bård Skaflestad
1b3e43068f
Include proper file header.
2013-05-08 00:19:25 +02:00
Bård Skaflestad
146b1223d2
Don't check input values. Defaults are fine.
...
While here, also return zero, which although not strictly needed,
nevertheless indicates to the reader that we're exiting successfully.
2013-05-08 00:17:35 +02:00
Bård Skaflestad
843499e071
Include <cassert> for assert() macro.
2013-05-08 00:11:21 +02:00
Bård Skaflestad
f3d8277d7a
Ignore 'ImpesTPFAAD' test program.
2013-05-07 21:41:02 +02:00
Bård Skaflestad
d0cb7d8a4c
Move buildAllCells() to anon. namespace.
...
This avoids diagnostics like "no previous declaration for ...".
2013-05-07 21:40:17 +02:00
Bård Skaflestad
cfb7c2916a
Merge remote-tracking branch 'bska/master'
2013-05-07 21:25:30 +02:00
Bård Skaflestad
083fef3c69
Merge remote-tracking branch 'atgeirr/master'
2013-05-07 21:23:18 +02:00
Bård Skaflestad
72fdc41caa
Add early foundations for compressible flow solver
...
This is highly incomplete and refactorings are likely.
2013-05-07 19:58:10 +02:00
Bård Skaflestad
b4a49c5844
Merge remote-tracking branch 'atgeirr/master'
2013-05-07 13:28:08 +02:00
Bård Skaflestad
2fc7c65118
Ignore simulators
2013-05-07 10:51:05 +02:00
Bård Skaflestad
0058e34aec
printSparseMatrix(): Use InnerIterator rather than index
...
This way, we're (slightly) more agnostic to the inner storage scheme.
2013-05-06 14:09:48 +02:00
Bård Skaflestad
c9d65f8c28
Merge remote-tracking branch 'atgeirr/master'
2013-05-06 14:01:06 +02:00
Bård Skaflestad
7980f3f6cb
Suppress output from assignment in MATLAB.
2013-05-06 13:37:04 +02:00
Bård Skaflestad
e9a1aa2a99
Fix mismerge.
2013-05-06 12:31:13 +02:00
Bård Skaflestad
bc547f82c6
Merge remote-tracking branch 'atgeirr/master'
...
Conflicts:
sim_simple.cpp
2013-05-06 12:29:47 +02:00
Bård Skaflestad
60509ca960
Output solution as a MATLAB function.
...
This way, we can run the example as
./sim_simple | sed -n '/s1 *=/,$p' > solution.m
to obtain a MATLAB function containing the 'solution'.
2013-05-06 09:43:48 +02:00
Bård Skaflestad
b06b0c99ca
Decrease amount of output and count iterations in the process.
...
Specifically, output the solution only at the end (in MATLAB
compatible format, for easy comparison) and annotate the diagnostic
output (i.e., cpu time and residual norm) with the iteration number.
2013-05-05 22:57:42 +02:00
Bård Skaflestad
056b7ae292
Make Darcy flux actually constant.
...
The definition from commit 6f22d10 included a non-zero derivative
which interfered with the automatic differentiation solver. Using a
fully constant Darcy flux enables using dt=150 while still computing
the correct solution.
While here, output the solution (s1) using more precision/digits for
comparison with 'sim_simple.m'.
2013-05-05 22:02:40 +02:00
Bård Skaflestad
6f22d10b06
Do real splitting based on total flux/fractional flow
...
We are now able to compute the correct solution with dt=0.5, but the
convergence rate is dismal.
2013-05-05 21:52:34 +02:00
Bård Skaflestad
e31101e80f
Incorporate transmissibility into water flux definition.
...
This means that we're computing the correct solution for dt=0.0005 (as
verified by 'sim_simple.m', but we're still failing larger time steps).
2013-05-05 16:44:51 +02:00