Account for compressed BC representation during flux calculation.

This commit is contained in:
Bård Skaflestad 2012-03-13 23:28:43 +01:00
parent 436a7d666d
commit f2df9fe123

View File

@ -321,7 +321,7 @@ ifs_tpfa_press_flux(struct UnstructuredGrid *G,
/* ---------------------------------------------------------------------- */
{
int c1, c2, f;
size_t i;
size_t i, j;
double dh;
/* Assign cell pressure directly from solution vector */
@ -342,7 +342,9 @@ ifs_tpfa_press_flux(struct UnstructuredGrid *G,
if ((F != NULL) && (F->bc != NULL)) {
for (i = 0; i < F->bc->nbc; i++) {
if (F->bc->type[ i ] == BC_PRESSURE) {
f = F->bc->face[ i ];
for (j = F->bc->cond_pos[ i + 0 ];
j < F->bc->cond_pos[ i + 1 ]; j++) {
f = F->bc->face[ j ];
c1 = G->face_cells[2*f + 0];
c2 = G->face_cells[2*f + 1];
@ -357,6 +359,7 @@ ifs_tpfa_press_flux(struct UnstructuredGrid *G,
fflux[f] = trans[f] * (dh + h->pimpl->fgrav[f]);
}
}
/* Other boundary condtions currently not handled */
}