mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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:
@@ -4,6 +4,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "blas_lapack.h"
|
#include "blas_lapack.h"
|
||||||
|
#include "flow_bc.h"
|
||||||
|
|
||||||
#include "cfs_tpfa.h"
|
#include "cfs_tpfa.h"
|
||||||
#include "sparse_sys.h"
|
#include "sparse_sys.h"
|
||||||
@@ -210,6 +211,7 @@ void
|
|||||||
cfs_tpfa_assemble(grid_t *G,
|
cfs_tpfa_assemble(grid_t *G,
|
||||||
const double *ctrans,
|
const double *ctrans,
|
||||||
const double *P,
|
const double *P,
|
||||||
|
flowbc_t *bc,
|
||||||
const double *src,
|
const double *src,
|
||||||
struct cfs_tpfa_data *h)
|
struct cfs_tpfa_data *h)
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@@ -238,6 +240,9 @@ cfs_tpfa_assemble(grid_t *G,
|
|||||||
|
|
||||||
h->A->sa[j1] += ctrans[i];
|
h->A->sa[j1] += ctrans[i];
|
||||||
h->A->sa[j2] -= 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
|
#define OPM_CFS_TPFA_HEADER_INCLUDED
|
||||||
|
|
||||||
#include "grid.h"
|
#include "grid.h"
|
||||||
|
#include "flow_bc.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -45,6 +46,7 @@ void
|
|||||||
cfs_tpfa_assemble(grid_t *G,
|
cfs_tpfa_assemble(grid_t *G,
|
||||||
const double *ctrans,
|
const double *ctrans,
|
||||||
const double *P,
|
const double *P,
|
||||||
|
flowbc_t *bc,
|
||||||
const double *src,
|
const double *src,
|
||||||
struct cfs_tpfa_data *h);
|
struct cfs_tpfa_data *h);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user