Commit Graph

4874 Commits

Author SHA1 Message Date
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
Bård Skaflestad
61254bec37 Add traditional implementation of the finite-<something> assembly
process.
2010-09-13 16:11:15 +00:00
Bård Skaflestad
ad508cf6e0 Add simple type for describing boundary conditions for the flow
equation.
2010-09-13 15:46:06 +00:00
Bård Skaflestad
0a69e72f3c Maintain number of columns (typically equal to number of rows) when
building sparsity structure.
2010-09-11 13:48:53 +00:00
Bård Skaflestad
41a3b5719b Add utilities to assist in forming global coefficient matrix from
Schur complement reduction contributions.
2010-09-10 17:26:46 +00:00
Bård Skaflestad
de2b2551cc Add initial cut at well definition. 2010-09-10 17:14:00 +00:00
Bård Skaflestad
b04ee86a03 Disable direct assembly routines. A more elaborate (and expensive)
scheme is, regrettably, needed for most linear solvers.
2010-09-09 16:49:16 +00:00
Bård Skaflestad
c350f18100 Add simple support routines for building CSR matrices. 2010-09-09 16:48:03 +00:00
Bård Skaflestad
c3c7000815 Complete revision 5188. Sorry about the breakage. 2010-09-09 16:46:28 +00:00
Bård Skaflestad
488b83a642 Factor hash-set support out to separate module. It will be used in
deriving the non-zero structure of the global sparse matrix in
  models with wells.  At least for now.  We may wish to use another
  approach at some time...
2010-09-09 16:44:58 +00:00
Bård Skaflestad
0423d13a1c Remove particular MATLAB support. The "blas_lapack.h" include file
already provides pertinent definition of MAT_SIZE_T .
2010-09-09 08:37:52 +00:00
Bård Skaflestad
b836029a4a Ignore debug output from 'coarse_sys.c'. 2010-09-08 16:22:52 +00:00
Bård Skaflestad
5366d18fc2 Correct embarrassing indexing error: Both the fine-scale
ip-contributions and the resulting coarse-scale ip matrix have
  dimensions (number of basis functions)-by-(number of basis
  functions).
2010-09-08 09:09:34 +00:00
Bård Skaflestad
5075c7a222 Only output debug info for IP/B if factoring B failed. 2010-09-08 09:05:13 +00:00
Bård Skaflestad
472d44d846 Add debugging support. 2010-09-08 08:46:47 +00:00
Bård Skaflestad
1dd34c7a4c Add MEX gateway to constructing coarse-scale inverse inner product
matrix.  Add test script too.  Runs, but does not yet produce
  expected results.
2010-09-07 17:34:16 +00:00
Bård Skaflestad
bb4dc52e70 Store explicit degrees of freedom in coarse system. Update calling
interfaces to reflect that only the number of coarse blocks is
  needed rather than the complete coarse topology where applicable.
2010-09-07 13:46:12 +00:00
Bård Skaflestad
048da5987a Complete moving geometry support to separate module. 2010-09-07 10:45:29 +00:00
Bård Skaflestad
8257bc51aa Move geometry support to separate module. 2010-09-07 10:42:38 +00:00
Bård Skaflestad
97808326f5 Fix two (related) comment typos. 2010-09-06 21:04:44 +00:00
Bård Skaflestad
b6a8c75854 Fix typo in comment. 2010-09-06 19:43:25 +00:00
Bård Skaflestad
b8806b475d Fix use-of-uninitialised bug in derivation of coarse-block
inner-product matrix.

  Pointy hat: bska
2010-09-06 15:34:27 +00:00
Bård Skaflestad
d316d03f18 Tentative implementation of coarse-sys block contributions. 2010-09-06 15:23:46 +00:00
Bård Skaflestad
2326275d6f Add tentative type definition for coarse-system management. 2010-09-02 16:26:37 +00:00
Bård Skaflestad
94d4adbb6b Add local definition of MAT_SIZE_T, contingent upon preprocessor
symbol 'MATLAB_MEX_FILE' that is automatically defined by MATLAB's
  MEX function.

  Add declarations for factorisation, lin-sys solution, and matrix
  inversion for (symmetric) positive definite full matrices in full
  and packed formats.  Will be used in the coarse-system assembly
  process.
2010-09-02 16:25:29 +00:00
Jostein R. Natvig
0734f8d842 Add copy of (proposed) grid structure. 2010-08-31 14:09:05 +00:00
Bård Skaflestad
4f1939b81b Don't use cutesy contractions in error messages. Refer to the same
parameter names as in the documentation.
2010-08-31 14:00:43 +00:00
Bård Skaflestad
25d4faadc7 Document 'expected_nconn' parameter. Export topo->subfacepos and
topo->subfaces if expected_nconn>0.
2010-08-31 13:15:52 +00:00
Bård Skaflestad
c324097c63 Don't generate "negative" indices (size_t's) whilst double-probing
the set.  Allow 'm' table-lookups (i==m is valid).  Full table
  detected by inspecting final s[j].  Finally, hash_set_insert_core()
  does not return the key but rather the index at which the key was
  inserted.  Update assertion in hash_set_expand() to respect this
  property.

  Also, for increased transparency during debugging, assign
  intermediate quantities of the hash function to separate variables.
2010-08-31 12:27:21 +00:00
Bård Skaflestad
d4f13d3411 Suppress signed/unsigned comparison warnings. 2010-08-31 08:12:07 +00:00
Bård Skaflestad
11c12f8fb6 Fix egregious off-by-one. Now generates coarse grid for 1.122e6
Cartesian cells in 0.1 seconds on a laptop computer.
2010-08-31 01:40:05 +00:00
Bård Skaflestad
2dd2b8d6aa Spell 'API' correctly. 2010-08-30 21:48:26 +00:00
Bård Skaflestad
14f2011baa Add MEX auto-build support for function 'mex_generate_coarsegrid'. 2010-08-30 21:43:39 +00:00
Bård Skaflestad
e0c6e24ab7 Correct a number of small, but crucial, mistakes:
- Initialise new neighbours to INT_MIN rather than -1.  The latter
      is a valid block (the outside) and it is better to properly
      distinguish unset values from boundary blocks.

    - Ensure NULL-initialisation of a block's neighbour structure when
      this structure has just been allocated.

    - Adjust bin-search algorithm to support i==nneigh (target larger
      than all existing neighbouring blocks).

    - This means that if i==nneigh, then we must take precaution so as
      not to reference any invalid table elements.  However, an
      explicit check for i<nneigh means that the semantics of the
      memmove() statement becomes more transparent.

    - Finally, we must properly assign the 'nblocks' and 'nfaces'
      fields of the struct coarse_topology before returning to caller.
2010-08-30 21:42:52 +00:00
Bård Skaflestad
9cdeab3f04 For the pow2(n)'th time: MATLAB indices are one-based... 2010-08-30 21:32:49 +00:00