From 94fc6de78abae7a3bf8022b035e92c2d0cd9003b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 18 Oct 2011 20:38:28 +0200 Subject: [PATCH] Rework compressibility representation. 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. --- src/compr_quant.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/compr_quant.h b/src/compr_quant.h index cacfb5511..b35311768 100644 --- a/src/compr_quant.h +++ b/src/compr_quant.h @@ -29,15 +29,21 @@ extern "C" { #endif struct compr_quantities { - int nphases; /* Number of phases/components */ + int nphases; /* Number of phases/components */ - double *totcompr; /* Total compressibility per cell */ - double *voldiscr; /* Volume discrepancy per cell */ double *Ac; /* RB^{-1} per cell */ + double *dAc; /* d/dp (RB^{-1}) per cell */ double *Af; /* RB^{-1} per face */ double *phasemobf; /* Phase mobility per face */ + double *voldiscr; /* Volume discrepancy per cell */ }; +struct compr_quantities * +compr_quantities_allocate(size_t nc, size_t nf, int np); + +void +compr_quantities_deallocate(struct compr_quantities *cq); + void compr_flux_term(grid_t *G, const double *fflux,