Commit Graph
111 Commits
Author SHA1 Message Date
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
Atgeirr Flø Rasmussen a797ce5f32 Use subset() for simpler code. 2013-05-08 12:59:38 +02:00
Atgeirr Flø Rasmussen 1065dbd2f8 Add subset() free function.
Also add overload for UpwindSelector::select() taking constants (not AD variables).
2013-05-08 12:57:38 +02:00
Atgeirr Flø Rasmussen 9fd6678d99 Variable name change. 2013-05-08 12:55:25 +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
Atgeirr Flø Rasmussen 8e687194ed Bugfix: do not use unititialized transi_ if no gravity. 2013-05-07 13:32:59 +02:00
Bård Skaflestad b4a49c5844 Merge remote-tracking branch 'atgeirr/master' 2013-05-07 13:28:08 +02:00
Atgeirr Flø Rasmussen 9a901b32cc Merge remote-tracking branch 'bska/master' 2013-05-07 13:15:13 +02:00
Atgeirr Flø Rasmussen c028d52f5a Added gravity treatment to transport solver (untested). 2013-05-07 13:13:38 +02:00
Bård Skaflestad 2fc7c65118 Ignore simulators 2013-05-07 10:51:05 +02:00
Atgeirr Flø Rasmussen 748b3d3fdd Minor simplification: make fw_face from fw_cell. 2013-05-07 10:08:09 +02:00
Atgeirr Flø Rasmussen 3888904e61 Removed unused code. 2013-05-07 10:07:25 +02:00
Atgeirr Flø Rasmussen e217b70ee0 Add single-AD quantity select() method.
Also make comments into Doxygen comments.
2013-05-07 10:06:22 +02:00
Atgeirr Flø Rasmussen f83c03de63 Updated check for umfpack for (opm-core) implicit solver. 2013-05-07 00:46:35 +02:00
Atgeirr Flø Rasmussen 82f3aba1af Fix use of relperm derivatives w.r.t. saturation.
Also reinstate residual norm output.
2013-05-07 00:45:38 +02:00
Atgeirr Flø Rasmussen c5811d141f Added simulator program capable of running with AD transport solver.
Use the parameter 'transport_solver_type' to choose between 'reorder',
'implicit' and 'ad' (the new one).
2013-05-06 23:45:05 +02:00
Atgeirr Flø Rasmussen 9cc6ca368b Added simulator class that can use AD transport solver.
This is based on a copy of SimulatorIncompTwophase, and should be refactored.
2013-05-06 23:41:41 +02:00
Atgeirr Flø Rasmussen faad6157ec Created transport solver using AD.
Only two-phase incompressible so far.
2013-05-06 23:41:04 +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
Atgeirr Flø Rasmussen 24c3e807c3 Moved helpers to separate file. 2013-05-06 14:00:17 +02:00
Bård Skaflestad 7980f3f6cb Suppress output from assignment in MATLAB. 2013-05-06 13:37:04 +02:00
Atgeirr Flø Rasmussen 18ec43f255 Use harmonic averaging of mobility for pressure eqns. 2013-05-06 13:28:30 +02:00
Atgeirr Flø Rasmussen ea993f6647 Tighten tolerance for better fit with sim_simple.cpp. 2013-05-06 13:27:48 +02:00
Atgeirr Flø Rasmussen 1509773ec4 Minor refactoring of UpwindSelector.
Also rename -> UpwindSelectorTotalFlux.
2013-05-06 12:52:28 +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
Atgeirr Flø Rasmussen 8ffb2b0904 Added arithmetic operators taking constants.
Also simplified sim_simple.cpp by using new operators to get
rid of ADB::constant() usage.
2013-05-06 11:50:42 +02:00
Atgeirr Flø Rasmussen 2adbccd4f0 Treat source terms properly. 2013-05-06 11:25:55 +02:00
Atgeirr Flø Rasmussen 4366341971 Constified everything. 2013-05-06 11:11:32 +02:00
Atgeirr Flø Rasmussen 1aaec4b9a0 Simplified construction of total flux. 2013-05-06 10:45:29 +02:00
Atgeirr Flø Rasmussen 507914bd8f Rename s00 -> sw0. 2013-05-06 10:29:47 +02:00
Atgeirr Flø Rasmussen 17cc1c5042 Capitalize type name. 2013-05-06 10:03:35 +02:00
Atgeirr Flø Rasmussen 11be220440 Give type name initial capital. 2013-05-06 09:53:16 +02:00
Atgeirr Flø Rasmussen 60b8e8c40d Merge remote-tracking branch 'bska/master' 2013-05-06 09:49:00 +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
Atgeirr Flø Rasmussen e59e5cc5f2 Unfinished version of Armadillo-using AD class added. 2013-05-06 09:43:26 +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