1) Move extra fields found in struct CornerpointGrid into struct UnstructuredGrid.

2) Remove typedef grid_t
3) Remove struct CornerpointGrid.
4) handle fallout.
This commit is contained in:
Jostein R. Natvig
2012-02-01 14:56:38 +01:00
parent 04f88cee52
commit 37296545a4
4 changed files with 36 additions and 36 deletions

View File

@@ -128,7 +128,7 @@ impl_deallocate(struct cfs_tpfa_res_impl *pimpl)
/* ---------------------------------------------------------------------- */
static struct cfs_tpfa_res_impl *
impl_allocate(grid_t *G ,
impl_allocate(struct UnstructuredGrid *G ,
struct WellCompletions *wconn ,
size_t max_conn,
int np )
@@ -181,7 +181,7 @@ impl_allocate(grid_t *G ,
/* ---------------------------------------------------------------------- */
static struct CSRMatrix *
construct_matrix(grid_t *G, struct WellCompletions *wconn)
construct_matrix(struct UnstructuredGrid *G, struct WellCompletions *wconn)
/* ---------------------------------------------------------------------- */
{
int f, c1, c2, w, i, nc, nnu;
@@ -362,7 +362,7 @@ compute_darcyflux_and_deriv(int np,
static void
compute_compflux_and_deriv(grid_t *G ,
compute_compflux_and_deriv(struct UnstructuredGrid *G ,
int np ,
const double *cpress,
const double *trans ,
@@ -459,7 +459,7 @@ compute_well_compflux_and_deriv(struct cfs_tpfa_res_wells *W ,
static int
count_internal_conn(grid_t *G, int c)
count_internal_conn(struct UnstructuredGrid *G, int c)
{
int c1, c2, f, i, nconn;
@@ -478,7 +478,7 @@ count_internal_conn(grid_t *G, int c)
static int
init_cell_contrib(grid_t *G ,
init_cell_contrib(struct UnstructuredGrid *G ,
int c ,
int np ,
double pvol ,
@@ -526,7 +526,7 @@ init_cell_contrib(grid_t *G ,
static void
compute_cell_contrib(grid_t *G ,
compute_cell_contrib(struct UnstructuredGrid *G ,
int c ,
int np ,
double pvol ,
@@ -621,7 +621,7 @@ assemble_sources(double dt ,
/* ---------------------------------------------------------------------- */
static int
assemble_cell_contrib(grid_t *G,
assemble_cell_contrib(struct UnstructuredGrid *G,
int c,
struct cfs_tpfa_res_data *h)
/* ---------------------------------------------------------------------- */
@@ -878,7 +878,7 @@ assemble_well_contrib(struct cfs_tpfa_res_wells *W ,
/* ---------------------------------------------------------------------- */
static void
compute_fpress(grid_t *G,
compute_fpress(struct UnstructuredGrid *G,
int np,
const double *htrans,
const double *pmobf,
@@ -935,7 +935,7 @@ compute_fpress(grid_t *G,
/* ---------------------------------------------------------------------- */
static void
compute_flux(grid_t *G,
compute_flux(struct UnstructuredGrid *G,
int np,
const double *trans,
const double *pmobf,
@@ -1020,7 +1020,7 @@ compute_wflux(int np ,
static size_t
maxconn(grid_t *G)
maxconn(struct UnstructuredGrid *G)
{
int c;
size_t m, n;
@@ -1056,7 +1056,7 @@ cfs_tpfa_res_destroy(struct cfs_tpfa_res_data *h)
/* ---------------------------------------------------------------------- */
struct cfs_tpfa_res_data *
cfs_tpfa_res_construct(grid_t *G ,
cfs_tpfa_res_construct(struct UnstructuredGrid *G ,
struct WellCompletions *wconn ,
int nphases)
/* ---------------------------------------------------------------------- */
@@ -1111,7 +1111,7 @@ cfs_tpfa_res_construct(grid_t *G ,
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_assemble(grid_t *G,
cfs_tpfa_res_assemble(struct UnstructuredGrid *G,
double dt,
struct cfs_tpfa_res_forces *forces,
const double *zc,
@@ -1169,7 +1169,7 @@ cfs_tpfa_res_assemble(grid_t *G,
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_flux(grid_t *G ,
cfs_tpfa_res_flux(struct UnstructuredGrid *G ,
struct cfs_tpfa_res_forces *forces ,
int np ,
const double *trans ,
@@ -1194,7 +1194,7 @@ cfs_tpfa_res_flux(grid_t *G ,
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_fpress(grid_t *G,
cfs_tpfa_res_fpress(struct UnstructuredGrid *G,
int np,
const double *htrans,
const double *pmobf,
@@ -1213,7 +1213,7 @@ cfs_tpfa_res_fpress(grid_t *G,
#if 0
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_retrieve_masstrans(grid_t *G,
cfs_tpfa_res_retrieve_masstrans(struct UnstructuredGrid *G,
int np,
struct cfs_tpfa_res_data *h,
double *masstrans_f)
@@ -1226,7 +1226,7 @@ cfs_tpfa_res_retrieve_masstrans(grid_t *G,
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_retrieve_gravtrans(grid_t *G,
cfs_tpfa_res_retrieve_gravtrans(struct UnstructuredGrid *G,
int np,
struct cfs_tpfa_res_data *h,
double *gravtrans_f)
@@ -1240,7 +1240,7 @@ cfs_tpfa_res_retrieve_gravtrans(grid_t *G,
/* ---------------------------------------------------------------------- */
static double
cfs_tpfa_res_impes_maxtime_cell(int c,
grid_t *G,
struct UnstructuredGrid *G,
struct compr_quantities *cq,
const double *trans,
const double *porevol,
@@ -1356,7 +1356,7 @@ cfs_tpfa_res_impes_maxtime_cell(int c,
/* ---------------------------------------------------------------------- */
double
cfs_tpfa_res_impes_maxtime(grid_t *G,
cfs_tpfa_res_impes_maxtime(struct UnstructuredGrid *G,
struct compr_quantities *cq,
const double *trans,
const double *porevol,
@@ -1383,7 +1383,7 @@ cfs_tpfa_res_impes_maxtime(grid_t *G,
/* ---------------------------------------------------------------------- */
void
cfs_tpfa_res_expl_mass_transport(grid_t *G,
cfs_tpfa_res_expl_mass_transport(struct UnstructuredGrid *G,
well_t *W,
struct completion_data *wdata,
int np,

View File

@@ -54,7 +54,7 @@ struct cfs_tpfa_res_data {
struct cfs_tpfa_res_data *
cfs_tpfa_res_construct(grid_t *G ,
cfs_tpfa_res_construct(struct UnstructuredGrid *G ,
struct WellCompletions *wconn ,
int nphases);
@@ -62,7 +62,7 @@ void
cfs_tpfa_res_destroy(struct cfs_tpfa_res_data *h);
void
cfs_tpfa_res_assemble(grid_t *G,
cfs_tpfa_res_assemble(struct UnstructuredGrid *G,
double dt,
struct cfs_tpfa_res_forces *forces,
const double *zc,
@@ -75,7 +75,7 @@ cfs_tpfa_res_assemble(grid_t *G,
struct cfs_tpfa_res_data *h);
void
cfs_tpfa_res_flux(grid_t *G ,
cfs_tpfa_res_flux(struct UnstructuredGrid *G ,
struct cfs_tpfa_res_forces *forces ,
int np ,
const double *trans ,
@@ -88,7 +88,7 @@ cfs_tpfa_res_flux(grid_t *G ,
double *wflux );
void
cfs_tpfa_res_fpress(grid_t *G,
cfs_tpfa_res_fpress(struct UnstructuredGrid *G,
int np,
const double *htrans,
const double *pmobf,
@@ -100,19 +100,19 @@ cfs_tpfa_res_fpress(grid_t *G,
#if 0
void
cfs_tpfa_retrieve_masstrans(grid_t *G,
cfs_tpfa_retrieve_masstrans(struct UnstructuredGrid *G,
int np,
struct cfs_tpfa_data *h,
double *masstrans_f);
void
cfs_tpfa_retrieve_gravtrans(grid_t *G,
cfs_tpfa_retrieve_gravtrans(struct UnstructuredGrid *G,
int np,
struct cfs_tpfa_data *h,
double *gravtrans_f);
double
cfs_tpfa_impes_maxtime(grid_t *G,
cfs_tpfa_impes_maxtime(struct UnstructuredGrid *G,
struct compr_quantities *cq,
const double *trans,
const double *porevol,
@@ -122,7 +122,7 @@ cfs_tpfa_impes_maxtime(grid_t *G,
const double *gravity);
void
cfs_tpfa_expl_mass_transport(grid_t *G,
cfs_tpfa_expl_mass_transport(struct UnstructuredGrid *G,
well_t *W,
struct completion_data *wdata,
int np,

View File

@@ -30,7 +30,7 @@ impl_deallocate(struct ifs_tpfa_impl *pimpl)
/* ---------------------------------------------------------------------- */
static struct ifs_tpfa_impl *
impl_allocate(grid_t *G)
impl_allocate(struct UnstructuredGrid *G)
/* ---------------------------------------------------------------------- */
{
struct ifs_tpfa_impl *new;
@@ -57,7 +57,7 @@ impl_allocate(grid_t *G)
/* ---------------------------------------------------------------------- */
static struct CSRMatrix *
ifs_tpfa_construct_matrix(grid_t *G)
ifs_tpfa_construct_matrix(struct UnstructuredGrid *G)
/* ---------------------------------------------------------------------- */
{
int f, c1, c2;
@@ -122,7 +122,7 @@ ifs_tpfa_construct_matrix(grid_t *G)
/* fgrav = accumarray(cf(j), grav(j).*sgn(j), [nf, 1]) */
/* ---------------------------------------------------------------------- */
static void
compute_grav_term(grid_t *G, const double *gpress,
compute_grav_term(struct UnstructuredGrid *G, const double *gpress,
double *fgrav)
/* ---------------------------------------------------------------------- */
{
@@ -155,7 +155,7 @@ compute_grav_term(grid_t *G, const double *gpress,
/* ---------------------------------------------------------------------- */
struct ifs_tpfa_data *
ifs_tpfa_construct(grid_t *G)
ifs_tpfa_construct(struct UnstructuredGrid *G)
/* ---------------------------------------------------------------------- */
{
struct ifs_tpfa_data *new;
@@ -185,7 +185,7 @@ ifs_tpfa_construct(grid_t *G)
/* ---------------------------------------------------------------------- */
void
ifs_tpfa_assemble(grid_t *G,
ifs_tpfa_assemble(struct UnstructuredGrid *G,
const double *trans,
const double *src,
const double *gpress,
@@ -232,7 +232,7 @@ ifs_tpfa_assemble(grid_t *G,
/* ---------------------------------------------------------------------- */
void
ifs_tpfa_press_flux(grid_t *G,
ifs_tpfa_press_flux(struct UnstructuredGrid *G,
const double *trans,
struct ifs_tpfa_data *h,
double *cpress,

View File

@@ -39,17 +39,17 @@ struct ifs_tpfa_data {
struct ifs_tpfa_data *
ifs_tpfa_construct(grid_t *G);
ifs_tpfa_construct(struct UnstructuredGrid *G);
void
ifs_tpfa_assemble(grid_t *G,
ifs_tpfa_assemble(struct UnstructuredGrid *G,
const double *trans,
const double *src,
const double *gpress,
struct ifs_tpfa_data *h);
void
ifs_tpfa_press_flux(grid_t *G,
ifs_tpfa_press_flux(struct UnstructuredGrid *G,
const double *trans,
struct ifs_tpfa_data *h,
double *cpress,