From 3a713ac022f6893b745fd59b85a259ef33e55c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 26 Aug 2011 15:30:20 +0200 Subject: [PATCH 1/2] Add a simple QFS for testing from C. Not integrated into Autotools build system. Compile as gcc -g -Wall -ansi -pedantic -Wextra test_cfs_tpfa.c cfs_tpfa.c \ well.c flow_bc.c trans_tpfa.c sparse_sys.c compr_quant.c \ -lumfpack -llapack -lblas -lm (or variants thereof). --- src/compr_quant.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compr_quant.h b/src/compr_quant.h index 01cf2f4bf..cacfb5511 100644 --- a/src/compr_quant.h +++ b/src/compr_quant.h @@ -31,11 +31,11 @@ extern "C" { struct compr_quantities { int nphases; /* Number of phases/components */ - const double *totcompr; /* Total compressibility per cell */ - const double *voldiscr; /* Volume discrepancy per cell */ - const double *Ac; /* RB^{-1} per cell */ - const double *Af; /* RB^{-1} per face */ - const double *phasemobf; /* Phase mobility per face */ + double *totcompr; /* Total compressibility per cell */ + double *voldiscr; /* Volume discrepancy per cell */ + double *Ac; /* RB^{-1} per cell */ + double *Af; /* RB^{-1} per face */ + double *phasemobf; /* Phase mobility per face */ }; void From 9341b3aaac2b0fb52cdce00f28e0bdfad4902477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 1 Sep 2011 10:28:27 +0200 Subject: [PATCH 2/2] Silence warnings about "signed vs. unsigned" comparisons. --- src/sparse_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sparse_sys.c b/src/sparse_sys.c index f018fed91..67a0755ee 100644 --- a/src/sparse_sys.c +++ b/src/sparse_sys.c @@ -209,7 +209,7 @@ csrmatrix_write(const struct CSRMatrix *A, const char *fn) fp = fopen(fn, "wt"); if (fp != NULL) { - for (i = j = 0; i < A->m; i++) { + for (i = j = 0; (size_t)i < A->m; i++) { for (; j < A->ia[i + 1]; j++) { fprintf(fp, "%lu %lu %26.18e\n", (unsigned long) (i + 1),