mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-03 21:16:54 -06:00
Implement compressible (volume flux) source term assembly.
This commit is contained in:
parent
79b5e94127
commit
fb1316802c
@ -507,6 +507,20 @@ compute_cell_contrib(grid_t *G ,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
assemble_sources(struct compr_src *src, struct cfs_tpfa_res_data *h)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < src->nsrc; i++) {
|
||||
assert (src->cell[i] >= 0 );
|
||||
assert (((size_t) src->cell[i]) < h->J->m);
|
||||
|
||||
h->F[ src->cell[ i ] ] += src->flux[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
static int
|
||||
assemble_cell_contrib(grid_t *G,
|
||||
@ -765,6 +779,11 @@ cfs_tpfa_res_assemble(grid_t *G,
|
||||
assemble_cell_contrib(G, c, h);
|
||||
}
|
||||
|
||||
if (src != NULL) {
|
||||
assert (src->nphases == cq->nphases);
|
||||
assemble_sources(src, h);
|
||||
}
|
||||
|
||||
res_is_neumann = 1;
|
||||
|
||||
if (res_is_neumann && h->pimpl->is_incomp) {
|
||||
|
Loading…
Reference in New Issue
Block a user