Commit Graph

4190 Commits

Author SHA1 Message Date
Bård Skaflestad
8ffb83467f Implement facility for passing external solver software to resolve
the local systems of linear equations.

  Implement utility for deriving symmetrised (projected) basis
  function flux values from a back-substitution process following a
  local system solve.
2010-10-04 12:15:53 +00:00
Bård Skaflestad
203890ed69 CSR start pointer definition loop runs from 1 to nbins+1 inclusive.
Fix off-by-one in define_csr_sparsity...

  Replace useless table of number of *internal* fine-scale faces per
  block with the marginally more useful total number of fine-scale
  faces per block.  Otherwise we were allocating too little space for
  the local systems.
2010-10-04 09:00:21 +00:00
Bård Skaflestad
8b5fa452ee Edge closer to working BF computation. Local system solve and BF
storage remaining.  Largely untested.
2010-10-03 22:40:55 +00:00
Bård Skaflestad
f30e381b7c Assert copyright. 2010-10-03 22:38:38 +00:00
Bård Skaflestad
8413144b50 Correct a few off-by-ones in the CSR push-back implementation. 2010-10-03 22:01:15 +00:00
Bård Skaflestad
4e21adc80b Reorder internal functions to expose logical sections.
Catch up to renaming of fields in struct coarse_sys (-r5448).

  Implement first cut at local system assembly.  Untested.
2010-10-01 18:20:58 +00:00
Bård Skaflestad
e163a62fc6 Rename position fields of struct coarse_sys to emphasise relation
with corresponding data array.
2010-10-01 18:19:43 +00:00
Atgeirr Flø Rasmussen
8df279ca1c Documented mim_ip_simple_all. 2010-10-01 12:21:24 +00:00
Atgeirr Flø Rasmussen
c0daca5232 Documented most of ifsh.h. 2010-10-01 12:06:16 +00:00
Bård Skaflestad
d8b36289d5 Move the (C equivalent of the) const_cast<>() to mim_ip_simple_all()
call site.
2010-10-01 07:34:29 +00:00
Bård Skaflestad
914d43e260 Expand allocation implementation. Still incomplete. 2010-09-30 22:07:13 +00:00
Bård Skaflestad
6126c0b4ea Add a routine for allocating a CSR matrix with known number of rows
and non-zeros.  Note that this routine is for allocation only.
  Caller must create and manage sparsity structure if this is being
  used in a global assembly process.

  This routine finds utility in MsMFEM BF construction.
2010-09-30 21:37:14 +00:00
Bård Skaflestad
4fce254e66 Assert copyright. 2010-09-30 20:08:18 +00:00
Bård Skaflestad
ecdd4f06c1 Initial, incomplete, gateway routine to basis function assembly. 2010-09-30 16:11:57 +00:00
Atgeirr Flø Rasmussen
ac1de1e360 First attempt at gravity and boundary conditions. Does not seem to work yet. 2010-09-30 13:55:26 +00:00
Bård Skaflestad
d3db74115d Add a word of caution on BC (flux) values in assemble() method. 2010-09-30 07:53:07 +00:00
Atgeirr Flø Rasmussen
9a408dc319 Added some simple state management to prevent certain call order errors. 2010-09-30 07:35:28 +00:00
Bård Skaflestad
5826cc1c5e M-x delete-trailing-whitespace . 2010-09-29 16:37:39 +00:00
Bård Skaflestad
ec5456011b Ignore files generated by Autotools suite. 2010-09-29 13:05:33 +00:00
Bård Skaflestad
65938abe93 Split MEX support out of libmimetic and into two separate dirs. 2010-09-29 09:42:03 +00:00
Bård Skaflestad
900041729b Remove disabled code. 2010-09-29 09:41:09 +00:00
Bård Skaflestad
1982240882 - We hereby nominate indexing by 2 in pimpl->cwells as one of the
worst decisions ever.  Fix yet another fall-out from this decision
    in the global assembly of well contributions.  Possibly the final
    *extant* of these, but further such changes will likely be
    introduced whenever we make a change.

    Revision needed.

  - Use correct sign when assembling total rate constraints.  Target
    values (currently) denote *injection* fluxes.
2010-09-29 09:31:50 +00:00
Atgeirr Flø Rasmussen
eb5ab6d8e5 Added faceFluxToCellFlux(). 2010-09-29 07:59:11 +00:00
Bård Skaflestad
53b9546364 The global assembly of well contributions requires local-to-global
mappings pertinent to the actual cell/well in question, not the
  first cell/well pair.

  With this change (and -r5370), we are now able to form (and solve)
  the complete well configuration on the IO Centre model.  The
  solution, however, leaves a lot to be desired.  Further
  investigation is required.
2010-09-28 18:36:27 +00:00
Bård Skaflestad
bd37e812e7 Engage brain. The '&&' operator returns true or false, not the
value of the second expression.
2010-09-28 18:33:52 +00:00
Atgeirr Flø Rasmussen
28fbbcf2bd Updated to match changes to ifsh.h. 2010-09-28 14:36:57 +00:00
Bård Skaflestad
05b363fb3c Eliminate unused variables (mostly 'src' in pressure/flux reconstruction). 2010-09-28 14:15:59 +00:00
Bård Skaflestad
b93984b0ba Eliminate unused variable. 2010-09-28 14:05:13 +00:00
Bård Skaflestad
52ce1c33cf Implement back-substitution support for wells. The test script
(test_mex_ifsh) appears to yield satisfactory results, but (much)
  more testing is needed.

  Declare ifsh feature complete.
2010-09-28 13:52:47 +00:00
Atgeirr Flø Rasmussen
1bb1b168d6 Better safe than sorry: making sure vectors are zeroed before calling ifsh_-routines.
Also added numCellFaces().
2010-09-28 13:07:37 +00:00
Bård Skaflestad
91fe03a9d0 Declare headers (in a suitable $(includedir)), extra Autoconf macro
directory, and disable Dune-specific Automake include rule.

  Rely on Dune users to re-enable the latter (but not to expose the rest
  of the world to that enabling).
2010-09-28 12:21:18 +00:00
Bård Skaflestad
25ac296681 Add Autoconf setup. 2010-09-28 12:14:47 +00:00
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