mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
remove unused variables and/or unused assignements
quells sca warnings
This commit is contained in:
parent
77dec4a64a
commit
ba547c8f8e
@ -119,14 +119,14 @@ namespace Opm {
|
|||||||
const ImplicitTransportDetails::NRControl& ctrl ,
|
const ImplicitTransportDetails::NRControl& ctrl ,
|
||||||
ReservoirState& state ,
|
ReservoirState& state ,
|
||||||
LinearSolver& linsolve,
|
LinearSolver& linsolve,
|
||||||
ImplicitTransportDetails::NRReport& rpt ) {
|
ImplicitTransportDetails::NRReport& rpt )
|
||||||
bool init;
|
{
|
||||||
typedef typename JacobianSystem::vector_type vector_type;
|
typedef typename JacobianSystem::vector_type vector_type;
|
||||||
typedef typename JacobianSystem::matrix_type matrix_type;
|
typedef typename JacobianSystem::matrix_type matrix_type;
|
||||||
|
|
||||||
asm_.createSystem(g, sys_);
|
asm_.createSystem(g, sys_);
|
||||||
model_.initStep(state, g, sys_);
|
model_.initStep(state, g, sys_);
|
||||||
init = model_.initIteration(state, g, sys_);
|
model_.initIteration(state, g, sys_);
|
||||||
|
|
||||||
MZero<matrix_type>::zero(sys_.writableMatrix());
|
MZero<matrix_type>::zero(sys_.writableMatrix());
|
||||||
VZero<vector_type>::zero(sys_.vector().writableResidual());
|
VZero<vector_type>::zero(sys_.vector().writableResidual());
|
||||||
@ -157,7 +157,7 @@ namespace Opm {
|
|||||||
VNorm<vector_type>::norm(sys_.vector().increment());
|
VNorm<vector_type>::norm(sys_.vector().increment());
|
||||||
|
|
||||||
// Begin line search
|
// Begin line search
|
||||||
double residual=VNorm<vector_type>::norm(sys_.vector().residual());
|
double residual;
|
||||||
int lin_it=0;
|
int lin_it=0;
|
||||||
bool finished=rpt.norm_res<ctrl.atol;
|
bool finished=rpt.norm_res<ctrl.atol;
|
||||||
double alpha=2.0;
|
double alpha=2.0;
|
||||||
@ -172,7 +172,7 @@ namespace Opm {
|
|||||||
sys_.vector().writableSolution());
|
sys_.vector().writableSolution());
|
||||||
|
|
||||||
sys_.vector().addIncrement();
|
sys_.vector().addIncrement();
|
||||||
init = model_.initIteration(state, g, sys_);
|
bool init = model_.initIteration(state, g, sys_);
|
||||||
if (init) {
|
if (init) {
|
||||||
MZero<matrix_type>::zero(sys_.writableMatrix());
|
MZero<matrix_type>::zero(sys_.writableMatrix());
|
||||||
VZero<vector_type>::zero(sys_.vector().writableResidual());
|
VZero<vector_type>::zero(sys_.vector().writableResidual());
|
||||||
|
@ -233,7 +233,6 @@ namespace Opm
|
|||||||
double ecl_time = 0.0;
|
double ecl_time = 0.0;
|
||||||
std::vector<double> ecl_sat;
|
std::vector<double> ecl_sat;
|
||||||
std::vector<double> ecl_press;
|
std::vector<double> ecl_press;
|
||||||
std::vector<double> init_saturation(saturation);
|
|
||||||
while ((!stationary) && (it_count < max_it_)) { // && transport_cost < max_transport_cost_)
|
while ((!stationary) && (it_count < max_it_)) { // && transport_cost < max_transport_cost_)
|
||||||
// Run transport solver.
|
// Run transport solver.
|
||||||
std::cout << "Running transport step " << it_count << " with stepsize "
|
std::cout << "Running transport step " << it_count << " with stepsize "
|
||||||
@ -242,7 +241,6 @@ namespace Opm
|
|||||||
this->flow_solver_.getSolution(), injection);
|
this->flow_solver_.getSolution(), injection);
|
||||||
// Run pressure solver.
|
// Run pressure solver.
|
||||||
if (converged) {
|
if (converged) {
|
||||||
init_saturation = saturation;
|
|
||||||
// this->flow_solver_.solve(this->res_prop_, saturation, this->bcond_, src,
|
// this->flow_solver_.solve(this->res_prop_, saturation, this->bcond_, src,
|
||||||
// this->residual_tolerance_, this->linsolver_verbosity_, this->linsolver_type_);
|
// this->residual_tolerance_, this->linsolver_verbosity_, this->linsolver_type_);
|
||||||
// max_mod = this->flow_solver_.postProcessFluxes();
|
// max_mod = this->flow_solver_.postProcessFluxes();
|
||||||
@ -324,7 +322,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Cutting time step\n";
|
std::cerr << "Cutting time step\n";
|
||||||
init_saturation = saturation_old;
|
|
||||||
stepsize=stepsize/2.0;
|
stepsize=stepsize/2.0;
|
||||||
}
|
}
|
||||||
++it_count;
|
++it_count;
|
||||||
@ -466,9 +463,6 @@ namespace Opm
|
|||||||
double side1_flux_oil = 0.0;
|
double side1_flux_oil = 0.0;
|
||||||
double side2_flux_oil = 0.0;
|
double side2_flux_oil = 0.0;
|
||||||
std::map<int, double> frac_flow_by_bid;
|
std::map<int, double> frac_flow_by_bid;
|
||||||
int num_cells = this->ginterf_.numberOfCells();
|
|
||||||
std::vector<double> cell_inflows_w(num_cells, 0.0);
|
|
||||||
std::vector<double> cell_outflows_w(num_cells, 0.0);
|
|
||||||
|
|
||||||
// Two passes: First pass, deal with outflow, second pass, deal with inflow.
|
// Two passes: First pass, deal with outflow, second pass, deal with inflow.
|
||||||
// This is for the periodic case, so that we are sure all fractional flows have
|
// This is for the periodic case, so that we are sure all fractional flows have
|
||||||
@ -497,7 +491,6 @@ namespace Opm
|
|||||||
assert(sc.isDirichlet());
|
assert(sc.isDirichlet());
|
||||||
frac_flow = this->res_prop_.fractionalFlow(c->index(), sc.saturation());
|
frac_flow = this->res_prop_.fractionalFlow(c->index(), sc.saturation());
|
||||||
}
|
}
|
||||||
cell_inflows_w[c->index()] += flux*frac_flow;
|
|
||||||
side1_flux += flux*frac_flow;
|
side1_flux += flux*frac_flow;
|
||||||
side1_flux_oil += flux*(1.0 - frac_flow);
|
side1_flux_oil += flux*(1.0 - frac_flow);
|
||||||
} else if (flux >= 0.0 && pass == 0) {
|
} else if (flux >= 0.0 && pass == 0) {
|
||||||
@ -507,7 +500,6 @@ namespace Opm
|
|||||||
frac_flow_by_bid[f->boundaryId()] = frac_flow;
|
frac_flow_by_bid[f->boundaryId()] = frac_flow;
|
||||||
// std::cout << "Inserted bid " << f->boundaryId() << std::endl;
|
// std::cout << "Inserted bid " << f->boundaryId() << std::endl;
|
||||||
}
|
}
|
||||||
cell_outflows_w[c->index()] += flux*frac_flow;
|
|
||||||
side2_flux += flux*frac_flow;
|
side2_flux += flux*frac_flow;
|
||||||
side2_flux_oil += flux*(1.0 - frac_flow);
|
side2_flux_oil += flux*(1.0 - frac_flow);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user