ifs_tpfa_assemble(): Coalesce external forces into single branch.

This commit is contained in:
Bård Skaflestad committed 2012-03-16 14:30:13 +01:00
1 parent 78687dc5c9
commit e8712565a8
1 file changed
+8 -6
+8 -6
View File
@@ -388,13 +388,15 @@ ifs_tpfa_assemble(struct UnstructuredGrid *G ,
}
is_neumann = 1;
if ((F != NULL) && (F->bc != NULL)) {
is_neumann = assemble_bc_contrib(G, F->bc, trans, h);
}
if (F != NULL) {
if (F->bc != NULL) {
is_neumann = assemble_bc_contrib(G, F->bc, trans, h);
}
if ((F != NULL) && (F->src != NULL)) {
for (c = 0; c < G->number_of_cells; c++) {
h->b[c] += F->src[c];
if (F->src != NULL) {
for (c = 0; c < G->number_of_cells; c++) {
h->b[c] += F->src[c];
}
}
}