mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
avoid dead stores
This commit is contained in:
parent
a31f1cefd5
commit
adfe80cba0
@ -664,7 +664,7 @@ private:
|
||||
static int getNumThreads()
|
||||
{
|
||||
|
||||
int threads = 1;
|
||||
int threads;
|
||||
|
||||
#ifdef _OPENMP
|
||||
// This function is called before the parallel OpenMP stuff gets initialized.
|
||||
@ -681,6 +681,8 @@ private:
|
||||
if (input_threads > 0)
|
||||
threads = input_threads;
|
||||
}
|
||||
#else
|
||||
threads = 1;
|
||||
#endif
|
||||
|
||||
return threads;
|
||||
|
@ -90,8 +90,7 @@ void stabilizeNonlinearUpdate(BVector& dx, BVector& dxOld,
|
||||
if (omega == 1.) {
|
||||
return;
|
||||
}
|
||||
auto i = dx.size();
|
||||
for (i = 0; i < dx.size(); ++i) {
|
||||
for (auto i = 0*dx.size(); i < dx.size(); ++i) {
|
||||
dx[i] *= omega;
|
||||
tempDxOld[i] *= (1.-omega);
|
||||
dx[i] += tempDxOld[i];
|
||||
|
@ -214,7 +214,7 @@ assembleControlEqInj(const WellState& well_state,
|
||||
std::vector<double> convert_coeff(well_.numPhases(), 1.0);
|
||||
well_.rateConverter().calcInjCoeff(/*fipreg*/ 0, well_.pvtRegionIdx(), convert_coeff);
|
||||
|
||||
double coeff = 1.0;
|
||||
double coeff;
|
||||
|
||||
switch (injectorType) {
|
||||
case InjectorType::WATER: {
|
||||
|
Loading…
Reference in New Issue
Block a user