Commit Graph

5358 Commits

Author SHA1 Message Date
Bård Skaflestad
b7b844bd07 Import BLAS/LAPACK Autoconf support from mainline GNU repo
http://www.gnu.org/software/autoconf-archive/
2010-09-28 12:14:13 +00:00
Atgeirr Flø Rasmussen
bb21bd202f Zeros matrix and rhs before assembly. 2010-09-28 11:59:55 +00:00
Bård Skaflestad
55b821eded Fix two blatantly ignorant formulation errors in the Schur reduction
implementation of well contributions:

    - First, we were neglecting the connection-to-block strength
      reduction factor 'L' in the 'w2r' term.  This error was
      compounded by even implementing the wrong *sign* of the term.

    - Secondly, the local well-connection number is hardly ever two,
      so index 'wdp' by 'w' rather than '2'.

  Pointy hat: bska.
2010-09-28 11:02:44 +00:00
Atgeirr Flø Rasmussen
521399dfcc Work in progress on C++ ifsh interface. 2010-09-27 12:01:50 +00:00
Atgeirr Flø Rasmussen
6e0570351a Added subrepo for libmimetic. It is currently on internal server. 2010-09-27 07:48:31 +00:00
Bård Skaflestad
ccf632510f Release memory resources for 'W' structure before returning to M. 2010-09-27 07:34:03 +00:00
Atgeirr Flø Rasmussen
4a11c7ad7d Work in progress on C++ interfaces. 2010-09-27 07:25:25 +00:00
Bård Skaflestad
cdabecba1d Impose total rate constraint on rate-controlled wells. Forgotten in
previous revision.
2010-09-27 07:23:17 +00:00
Bård Skaflestad
e551137f18 Implement partial well support. Schur reduction, assembly and
system solve *appear* to be okay in rudimentary testing.
  Back-substitution (i.e., cell pressure and interface fluxes) not yet
  aware of wells.
2010-09-26 21:36:32 +00:00
Bård Skaflestad
b2a22ee0e6 Implement global assembly of well contributions. 2010-09-26 21:34:55 +00:00
Bård Skaflestad
f169093288 Correct a number of clerical errors in Schur reduction for wells. 2010-09-26 21:34:07 +00:00
Bård Skaflestad
283513a342 - Correct an embarrassing loop-index error. We were looping over
'w', but increasing 'i'.

  - Adopt changes to 'cwells' convention (stores both well number
    (in 2*pos+0) and inverse perf index (in 2*pos+1)).
2010-09-26 21:32:35 +00:00
Bård Skaflestad
400bd0cedb Add (incomplete) stop-gap implementation of well support. 2010-09-24 17:29:39 +00:00
Bård Skaflestad
167cac19a2 Assume input 'WI' array is already permuted in accordance with the
c->w mapping.
2010-09-24 17:27:50 +00:00
Bård Skaflestad
a245c45c23 Add global assembly of (symmetric) well contributions for cells. 2010-09-24 17:26:48 +00:00
Bård Skaflestad
20b66033a0 M-x delete-trailing-whitespace . 2010-09-24 14:18:53 +00:00
Bård Skaflestad
d7634f730e M-x delete-trailing-whitespace . 2010-09-24 14:17:05 +00:00
Bård Skaflestad
8cf595df43 Don't bother checking for NULL-ness in dtor. Ifsh_destroy() already
does this, and it is okay to rely on this fact.
2010-09-24 12:53:30 +00:00
Atgeirr Flø Rasmussen
f3105558f2 Preliminary, unfinished version of C++ interface code. 2010-09-24 12:11:14 +00:00
Bård Skaflestad
790feb6831 In preparation of adding well support to ifsh_assemble(), re-factor
current implementation out into two separate helper functions,
  ifsh_set_effective_params(), and ifhs_assemble_grid().
2010-09-24 12:00:01 +00:00
Atgeirr Flø Rasmussen
8eeb8db15f Added extern "C" statements for C++ compatibility. 2010-09-24 09:07:50 +00:00
Atgeirr Flø Rasmussen
77c65d1cc2 Created Makefile.am for use with dune build system.
Very primitive version so far, and only includes ifsh-related things.
2010-09-24 07:47:07 +00:00
Bård Skaflestad
4deb63137a Form complete, rather than partial, w2w connection. 2010-09-22 18:46:55 +00:00
Bård Skaflestad
a115ac702b Implement cell-based contributions to global linear systems from
wells.  In particular, this represents the equivalent of
  hybsys_schur_complement_*() for wells.
2010-09-22 16:59:52 +00:00
Bård Skaflestad
58022e240c Add place-holders for effective well IP/gravity pressure fields.
Don't (yet) allocate any data storage for these.
2010-09-22 16:57:45 +00:00
Jostein R. Natvig
297b79d4f0 Add simple test of mex_ifsh. 2010-09-22 11:48:08 +00:00
Bård Skaflestad
c81336db05 Make buildable.
Pointy hat to: bska.
2010-09-22 08:07:25 +00:00
Bård Skaflestad
96c077f877 Add partial well support (cell contributions). Global assembly remaining. 2010-09-21 15:38:32 +00:00
Bård Skaflestad
883fda040f In preparation of implementing well support, add a new field ('q')
to struct hybsys, and use this field to store 'src-F2*gpress' per
  cell.  Implement back substitution in terms of hybsys:q, rather than
  computing this value in hybsys_compute_press_flux().
2010-09-21 08:28:49 +00:00
Bård Skaflestad
ebee9a2710 Add a bit of summary to functions and data structure. 2010-09-19 17:18:53 +00:00
Bård Skaflestad
8879c1fd7c Add auto-build support for function 'mex_ifsh'. Also, add auto-build
support for function 'mex_compute_coarse_contrib', even if this
  function is entirely for testing/development purposese.
2010-09-17 20:54:13 +00:00
Bård Skaflestad
5d0278ba1b Add MEX gateway routine to fully assembled (mimetic/hybrid)
incompressible flow solver.  Supports boundary conditions (addBC),
  and source terms (addSource).  Single phase only.

  Initial testing is promising (one-phase linear pressure drop across
  cartGrid([250, 250, 10]) solved in about one minute).
2010-09-17 17:51:07 +00:00
Bård Skaflestad
e61ce75f18 Use M's notion of the MAT_SIZE_T when building for M. 2010-09-17 17:43:07 +00:00
Bård Skaflestad
fa214b1264 Declare procedure for deriving cell pressures and interface fluxes
(i.e., projected half-contact fluxes).
2010-09-17 17:42:02 +00:00
Bård Skaflestad
9ed3196485 Modify the implementation data:
- Store effective Binv rather than Schur complement 'S'.
    - Add integer and floating point work arrays (BC handling,
      pressure/flux back-substitution &c.)

  Always allocate integer work array.  Consequently, no need to jump
  through hoops to avoid issues surrounding malloc(0).

  Add simple procedure for imposing prescribed interface pressure
  values (i.e., Dirichlet conditions).

  Correct a few clerical errors (use of unitialised vars &c).

  Assemble global system, but only for reservoir contributions.  Well
  contributions remain.

  Add trivial procedure for deriving cell pressures and interface
  fluxes (projected half-contact fluxes).
2010-09-17 17:41:05 +00:00
Bård Skaflestad
129703add0 White-space adjustment. No functional changes. 2010-09-17 07:35:05 +00:00
Bård Skaflestad
e988e091eb Add initial support for assembling the Schur complement system
directly from cell contributions.  Incomplete.
2010-09-16 17:03:11 +00:00
Bård Skaflestad
790d6f4b8b Track reverse mapping into WI/depth tables in 'cwells'. Update
allocation sizes accordingly.
2010-09-16 06:37:23 +00:00
Bård Skaflestad
d96229619e Separate well connections (typically static) from well controls
(often dynamically changing throughout simulation).
2010-09-15 17:27:59 +00:00
Bård Skaflestad
6a1b45fda4 Spell parameter name consistently in header and body.
Clue-by-four provided by GCC.
2010-09-15 17:27:14 +00:00
Bård Skaflestad
aa19c72d49 Re-factor creation and destruction of cell->well mapping out to
separate module.  Update callers.
2010-09-15 12:13:53 +00:00
Bård Skaflestad
dd0aa25511 Summarise purpose of each function. 2010-09-14 19:45:13 +00:00
Bård Skaflestad
3eb2d36c51 Summarise function purposes.
While here, guard against invalid DOFs in fill_grid_connections().
2010-09-14 14:12:16 +00:00
Bård Skaflestad
bf8f33be9a We use memset(), so #include <string.h>. 2010-09-14 13:18:17 +00:00
Bård Skaflestad
237bfbc6a7 Don't state that we reverse-insert (i.e., push-forward) the bin
elements when we in fact use jrn's much more straight-forward
  push-back mode.
2010-09-14 12:21:30 +00:00
Bård Skaflestad
bcac0e78da Summarise purpose for remaining functions. Document a few
parameters and return values.

  While here, convert function pair coarse_topology_build_coarsef()
  and coarse_topology_build_final() to CSR push-back build mode.
2010-09-14 12:15:49 +00:00
Bård Skaflestad
54d7094311 Include <assert.h> for assert() support. 2010-09-14 11:48:48 +00:00
Bård Skaflestad
671c9ff74d Insert "H1 lines" to summarise purpose. Document a few parameters
and return values as well.

  While here, convert CSR build to push-back mode.
2010-09-14 11:19:08 +00:00
Bård Skaflestad
431910898c Insert "H1 lines" to summarise purpose. 2010-09-14 11:17:55 +00:00
Bård Skaflestad
a58b81c105 Remove special MATLAB compilation support. This is provided by blas_lapack.h. 2010-09-13 16:11:49 +00:00