mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
elasticity_preconditioners: avoid dead store static analyzer warning
This commit is contained in:
parent
247d4cb432
commit
295e71828b
@ -49,7 +49,7 @@ Schwarz::type* Schwarz::setup2(std::shared_ptr<Operator>& op,
|
|||||||
it != e; ++it) {
|
it != e; ++it) {
|
||||||
std::array<int, 3> ijk;
|
std::array<int, 3> ijk;
|
||||||
gv.getIJK(set.index(*it), ijk);
|
gv.getIJK(set.index(*it), ijk);
|
||||||
const int rowix = (ijk[0]/cps) + (nel1/cps)*(ijk[1]/cps);
|
auto rowix = [&ijk,nel1]{ return (ijk[0]/cps) + (nel1/cps)*(ijk[1]/cps); };
|
||||||
// loop over nodes
|
// loop over nodes
|
||||||
for (int n=0;n<8;++n) {
|
for (int n=0;n<8;++n) {
|
||||||
int idx = set.subIndex(*it, n, 3);
|
int idx = set.subIndex(*it, n, 3);
|
||||||
@ -59,11 +59,11 @@ Schwarz::type* Schwarz::setup2(std::shared_ptr<Operator>& op,
|
|||||||
for (size_t q=0;q<mpc->getNoMaster();++q) {
|
for (size_t q=0;q<mpc->getNoMaster();++q) {
|
||||||
int idx2 = A.getEquationForDof(mpc->getMaster(q).node, m);
|
int idx2 = A.getEquationForDof(mpc->getMaster(q).node, m);
|
||||||
if (idx2 > -1)
|
if (idx2 > -1)
|
||||||
rows[rowix].insert(idx2);
|
rows[rowix()].insert(idx2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (A.getEquationForDof(idx, m) > -1)
|
if (A.getEquationForDof(idx, m) > -1)
|
||||||
rows[rowix].insert(A.getEquationForDof(idx, m));
|
rows[rowix()].insert(A.getEquationForDof(idx, m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user