From 6673f924dc4281da5a3dba81a218f3f54176d1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 19 Nov 2010 15:11:57 +0100 Subject: [PATCH] Only check boundary conditions on outer boundary in compute_flux(). --- src/cfs_tpfa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cfs_tpfa.c b/src/cfs_tpfa.c index 4b45825f..84156804 100644 --- a/src/cfs_tpfa.c +++ b/src/cfs_tpfa.c @@ -487,7 +487,10 @@ compute_flux(grid_t *G, double t, dp; for (f = 0; f < G->number_of_faces; f++) { - if (bc->type[f] == FLUX) { + c1 = G->face_cells[2*f + 0]; + c2 = G->face_cells[2*f + 1]; + + if (((c1 < 0) || (c2 < 0)) && (bc->type[f] == FLUX)) { fflux[f] = bc->bcval[f]; continue; } @@ -498,9 +501,6 @@ compute_flux(grid_t *G, } t *= trans[f]; - c1 = G->face_cells[2*f + 0]; - c2 = G->face_cells[2*f + 1]; - if ((c1 >= 0) && (c2 >= 0)) { dp = cpress[c1] - cpress[c2]; } else if (bc->type[f] == PRESSURE) {