mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 22:45:35 -06:00
Tentatively add boundary condition support.
We currently handle only Dirichlet (pressure) BC's, and the feature is largely untested. More work remaining.
This commit is contained in:
parent
650de8a127
commit
dba90f41bd
@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "blas_lapack.h"
|
||||
#include "flow_bc.h"
|
||||
|
||||
#include "cfs_tpfa.h"
|
||||
#include "sparse_sys.h"
|
||||
@ -210,6 +211,7 @@ void
|
||||
cfs_tpfa_assemble(grid_t *G,
|
||||
const double *ctrans,
|
||||
const double *P,
|
||||
flowbc_t *bc,
|
||||
const double *src,
|
||||
struct cfs_tpfa_data *h)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -238,6 +240,9 @@ cfs_tpfa_assemble(grid_t *G,
|
||||
|
||||
h->A->sa[j1] += ctrans[i];
|
||||
h->A->sa[j2] -= ctrans[i];
|
||||
} else if (bc->type[f] == PRESSURE) {
|
||||
h->A->sa[j1] += ctrans[i];
|
||||
h->b [c ] += ctrans[i] * bc->bcval[f];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define OPM_CFS_TPFA_HEADER_INCLUDED
|
||||
|
||||
#include "grid.h"
|
||||
#include "flow_bc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -45,6 +46,7 @@ void
|
||||
cfs_tpfa_assemble(grid_t *G,
|
||||
const double *ctrans,
|
||||
const double *P,
|
||||
flowbc_t *bc,
|
||||
const double *src,
|
||||
struct cfs_tpfa_data *h);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user