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:
Bård Skaflestad 2010-11-04 19:05:41 +01:00
parent 650de8a127
commit dba90f41bd
2 changed files with 7 additions and 0 deletions

View File

@ -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];
}
}

View File

@ -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);