Fixed some warnings
This commit is contained in:
parent
acc2f42df3
commit
b002871fe1
@ -189,13 +189,12 @@ static void
|
||||
set_impl_pointers(struct UnstructuredGrid *G, struct ifsh_ms_data *h)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
size_t nb, n_fs_gconn;
|
||||
size_t nb;
|
||||
size_t nblkdof_tot, max_pairs, work_sz;
|
||||
|
||||
nb = h->pimpl->ct->nblocks;
|
||||
nblkdof_tot = h->pimpl->sys->blkdof_pos[nb];
|
||||
max_pairs = h->pimpl->max_nblkdof * (h->pimpl->max_nblkdof + 1) / 2;
|
||||
n_fs_gconn = G->cell_facepos[ G->number_of_cells ];
|
||||
|
||||
work_sz = h->pimpl->max_bcells + max_pairs;
|
||||
|
||||
|
@ -134,13 +134,12 @@ impl_allocate(struct UnstructuredGrid *G ,
|
||||
int np )
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
size_t nnu, ngconn, nwperf;
|
||||
size_t nnu, nwperf;
|
||||
struct cfs_tpfa_res_impl *new;
|
||||
|
||||
size_t ddata_sz;
|
||||
|
||||
nnu = G->number_of_cells;
|
||||
ngconn = G->cell_facepos[ G->number_of_cells ];
|
||||
nwperf = 0;
|
||||
|
||||
if (wconn != NULL) {
|
||||
@ -536,12 +535,10 @@ compute_cell_contrib(struct UnstructuredGrid *G ,
|
||||
const double *dAc ,
|
||||
struct cfs_tpfa_res_impl *pimpl)
|
||||
{
|
||||
int c1, c2, f, i, off, nconn, np2, p;
|
||||
int c1, c2, f, i, off, nconn, p;
|
||||
MAT_SIZE_T nrhs;
|
||||
double s, dF1, dF2, *dv, *dv1, *dv2;
|
||||
|
||||
np2 = np * np;
|
||||
|
||||
nconn = init_cell_contrib(G, c, np, pvol, dt, z, pimpl);
|
||||
nrhs = 1 + (1 + 2)*nconn; /* [z, Af*v, Af*dv] */
|
||||
|
||||
@ -627,9 +624,6 @@ assemble_cell_contrib(struct UnstructuredGrid *G,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
int c1, c2, i, f, j1, j2, off;
|
||||
int is_neumann;
|
||||
|
||||
is_neumann = 1;
|
||||
|
||||
j1 = csrmatrix_elm_index(c, c, h->J);
|
||||
|
||||
@ -1061,7 +1055,7 @@ cfs_tpfa_res_construct(struct UnstructuredGrid *G ,
|
||||
int nphases)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
size_t nc, nf, nwperf, ngconn;
|
||||
size_t nf, nwperf;
|
||||
struct cfs_tpfa_res_data *h;
|
||||
|
||||
h = malloc(1 * sizeof *h);
|
||||
@ -1077,10 +1071,8 @@ cfs_tpfa_res_construct(struct UnstructuredGrid *G ,
|
||||
}
|
||||
|
||||
if (h != NULL) {
|
||||
nc = G->number_of_cells;
|
||||
nf = G->number_of_faces;
|
||||
nwperf = 0;
|
||||
ngconn = G->cell_facepos[nc];
|
||||
|
||||
if (wconn != NULL) {
|
||||
nwperf = wconn->well_connpos[ wconn->number_of_wells ];
|
||||
|
@ -355,7 +355,6 @@ namespace Opm
|
||||
s0[i] = saturation_[cell];
|
||||
}
|
||||
do {
|
||||
int max_change_cell = -1;
|
||||
max_s_change = 0.0;
|
||||
for (int i = 0; i < num_cells; ++i) {
|
||||
const int cell = cells[i];
|
||||
@ -365,7 +364,6 @@ namespace Opm
|
||||
double s_change = std::fabs(saturation_[cell] - old_s);
|
||||
// std::cout << "cell = " << cell << " delta s = " << s_change << std::endl;
|
||||
if (max_s_change < s_change) {
|
||||
max_change_cell = cell;
|
||||
max_s_change = s_change;
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,6 @@ ridders (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *ctr
|
||||
double G0, G1, G2, G3;
|
||||
double s0, s1, s2, s3;
|
||||
double swap, sgn, root;
|
||||
int it;
|
||||
|
||||
ctrl->iterations = 0;
|
||||
|
||||
@ -114,7 +113,6 @@ ridders (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *ctr
|
||||
s3 = 0;
|
||||
G3 = 10;
|
||||
|
||||
it = 0;
|
||||
while ( (fabs(G3) > ctrl->nltolerance) &&
|
||||
(ctrl->iterations++ < ctrl->maxiterations))
|
||||
{
|
||||
@ -182,7 +180,6 @@ regulafalsi (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl
|
||||
double Gn, G0, G1;
|
||||
double sn, s0, s1;
|
||||
double swap, gamma_pegasus;
|
||||
int it;
|
||||
|
||||
ctrl->iterations = 0;
|
||||
|
||||
@ -212,7 +209,6 @@ regulafalsi (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl
|
||||
G1 = swap;
|
||||
}
|
||||
|
||||
it = 0;
|
||||
while ( (fabs(Gn) > ctrl->nltolerance) &&
|
||||
(ctrl->iterations++ < ctrl->maxiterations))
|
||||
{
|
||||
@ -267,7 +263,6 @@ bisection (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *c
|
||||
double Gn, G0, G1;
|
||||
double sn, s0, s1;
|
||||
double swap;
|
||||
int it;
|
||||
|
||||
ctrl->iterations = 0;
|
||||
|
||||
@ -297,7 +292,6 @@ bisection (double (*G)(double, void*), void *data, struct NonlinearSolverCtrl *c
|
||||
G1 = swap;
|
||||
}
|
||||
|
||||
it=0;
|
||||
while ( (fabs(Gn)>ctrl->nltolerance) &&
|
||||
(ctrl->iterations++ < ctrl->maxiterations) )
|
||||
{
|
||||
|
@ -49,7 +49,6 @@ static double
|
||||
differentiate(int n, double h, double x0, double *tab, double x)
|
||||
{
|
||||
int i;
|
||||
double a;
|
||||
|
||||
assert(h > 0);
|
||||
assert((x-x0) < h*INT_MAX);
|
||||
@ -68,8 +67,6 @@ differentiate(int n, double h, double x0, double *tab, double x)
|
||||
return (tab[n-1]-tab[n-2])/h;
|
||||
}
|
||||
|
||||
a = (x-x0 - i*h) / h;
|
||||
|
||||
return (tab[i+1]-tab[i])/h;
|
||||
}
|
||||
|
||||
|
@ -232,8 +232,8 @@ static void
|
||||
fill_cart_topology_3d(struct UnstructuredGrid *G)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
int Nx, Ny, Nz;
|
||||
int nxf, nyf, nzf;
|
||||
int Nx, Ny;
|
||||
int nxf, nyf;
|
||||
int i,j,k;
|
||||
|
||||
int *cfaces, *cfacepos, *fnodes, *fnodepos, *fcells;
|
||||
@ -244,11 +244,9 @@ fill_cart_topology_3d(struct UnstructuredGrid *G)
|
||||
|
||||
Nx = nx+1;
|
||||
Ny = ny+1;
|
||||
Nz = nz+1;
|
||||
|
||||
nxf = Nx*ny*nz;
|
||||
nyf = nx*Ny*nz;
|
||||
nzf = nx*ny*Nz;
|
||||
|
||||
cfaces = G->cell_faces;
|
||||
cfacepos = G->cell_facepos;
|
||||
@ -361,8 +359,6 @@ fill_cart_geometry_3d(struct UnstructuredGrid *G,
|
||||
const double *z)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
int Nx, Ny, Nz;
|
||||
int nxf, nyf, nzf;
|
||||
int i,j,k;
|
||||
|
||||
double dx, dy, dz;
|
||||
@ -373,13 +369,6 @@ fill_cart_geometry_3d(struct UnstructuredGrid *G,
|
||||
nx = G->cartdims[0];
|
||||
ny = G->cartdims[1];
|
||||
nz = G->cartdims[2];
|
||||
Nx = nx+1;
|
||||
Ny = ny+1;
|
||||
Nz = nz+1;
|
||||
|
||||
nxf = Nx*ny*nz;
|
||||
nyf = nx*Ny*nz;
|
||||
nzf = nx*ny*Nz;
|
||||
|
||||
ccentroids = G->cell_centroids;
|
||||
cvolumes = G->cell_volumes;
|
||||
@ -666,8 +655,6 @@ fill_cart_geometry_2d(struct UnstructuredGrid *G,
|
||||
{
|
||||
int i,j;
|
||||
int nx, ny;
|
||||
int nxf, nyf;
|
||||
int Nx, Ny;
|
||||
|
||||
double dx, dy;
|
||||
|
||||
@ -676,12 +663,6 @@ fill_cart_geometry_2d(struct UnstructuredGrid *G,
|
||||
|
||||
nx = G->cartdims[0];
|
||||
ny = G->cartdims[1];
|
||||
Nx = nx+1;
|
||||
Ny = ny+1;
|
||||
|
||||
nxf = Nx*ny;
|
||||
nyf = nx*Ny;
|
||||
|
||||
|
||||
ccentroids = G->cell_centroids;
|
||||
cvolumes = G->cell_volumes;
|
||||
|
Loading…
Reference in New Issue
Block a user