Switch to storing a complete fluid-matrix derivative in the
compr_quantities rather than the total compressibility. Maintain the
"volume discrepancy" field. Also, add traditional memory management
functions.
Functions csrmatrix_write_stream() and vector_write_stream() subsume
the output responsibilities of csrmatrix_write() and vector_write(),
respectively, but do not deal with opening or closing streams. This
allows, e.g., a call such as
csrmatrix_write_stream(A, stderr);
for debugging purposes.
Re-implement csrmatrix_write() and vector_write() in terms of
csrmatrix_write_stream() and vector_write_stream(), respectively.
The members cannot be 'const' in C lest the structure be impossible to
create using traditional C idioms (a sequence of malloc() calls). If
the library is to be usable in a more general context, we cannot impose
C++ specific conveniences.
Specifically, move accumulation out of IFSH_MS and into a separate
function, 'coarse_sys_compute_fs_flux', in the coarse-system module.
This decoupling facilitates independent access to the projection
operation and is more natural.
Contingent upon preprocessor symbol "USE_MIM_IP_TPFA" and only a
mimetic two-point discretisation (not cell-centred systems). Hide
existing discretisation behind preprocessor symbol "USE_MIM_IP_SIMPLE".
Introduce two intermediate variables, c1, and c2, to hold cell numbers
during the building of the cell<->cell neighbourhood. This reduces
the statement complexity--both for the human reader and the compiler...
Automake 1.11 introduced the concept of "silent build rules" wherein the
build commands are reported as
CC cfsh.lo
rather than something along the lines of
bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../../opmpressure/src -I.. -DMATLAB_MEX_FILE=1 -I/work/opt/matlab/R2009b/extern/include/ -O3 -DNDEBUG -std=c99 -Wall -Wextra -pedantic -march=native -mtune=native -MT cfsh.lo -MD -MP -MF .deps/cfsh.Tpo -c -o cfsh.lo ../../../../../opmpressure/src/cfsh.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../../../opmpressure/src -I.. -DMATLAB_MEX_FILE=1 -I/work/opt/matlab/R2009b/extern/include/ -O3 -DNDEBUG -std=c99 -Wall -Wextra -pedantic -march=native -mtune=native -MT cfsh.lo -MD -MP -MF .deps/cfsh.Tpo -c ../../../../../opmpressure/src/cfsh.c -fPIC -DPIC -o .libs/cfsh.o
The former is much easier to read and, consequently, more conducive to
visually noticing diagnostics from the toolset (compiler, linker &c).
On the other hand, only fairly recent editions of Automake have the
"silent rule" capability, so enable silent rules only if available. In
particular, Automake 1.10.x (the default Automake version in MacOS X
10.6) does not support the capability. Neither does the default
Automake in CentOS 5.6.
Further details on silent build rules can be found at
http://sources.redhat.com/automake/automake.html#Optionshttp://www.flameeyes.eu/autotools-mythbuster/automake/silent.html
Thanks to Arne Morten Kvarving in Dune Flyspray issue #922
(http://www.dune-project.org/flyspray/index.php?do=details&task_id=922)
for the tip on how to preserve "configure.ac" backwards compatibility
with Automake < 1.11 .
1. Changed calculation of face pressures to avoid using mobilities.
2. Added 'scratch_f' array to cfs_tpfa_impl struct (for use by above routine).
3. Changed interface of cfs_tpfa_fpress() to pass the data struct.
Specifically, GCC in strict ISO C90 mode warns of:
cfs_tpfa.c: In function ‘cfs_tpfa_impes_maxtime_cell’:
cfs_tpfa.c:1086: warning: ISO C90 forbids mixed declarations and code
0. Writes total fluid volumes to octave and vtk output files.
(following considerations ONLY apply to IMPES mode: do_impes=true)
1. Now we do timestep safety evaluations for IMPES, a la Coats.
This is done after the pressure computation.
2. If current timestep is unsafe, we set the new timestep to the safe one,
divided by 1.5.
3. If minimum_stepsize is set, we will not further reduce the timestep once
it is below the minimum (yes, this is not quite a "minimum").
All in all, timestepping and reporting should be reconsidered to make a
user-friendly yet controllable impes code. The current impes mode does
not interact well with timestep_file for instance.