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 .