#4348 System , cppcheck : Remove unused local variables

This commit is contained in:
Magne Sjaastad 2019-04-20 14:24:17 +02:00
parent 3c2f4eb692
commit e2d21bb4f9

View File

@ -219,29 +219,6 @@ void RivTensorResultPartMgr::calculateElementTensors(const RigFemPart&
(*elmTensors)[elmIdx] = tensorSumOfElmNodes * (1.0 / 8.0);
}
}
std::array<std::vector<float>, 3> elmPrincipals;
std::vector<std::array<cvf::Vec3f, 3>> elmPrincipalDirections;
elmPrincipals[0].resize(elmCount);
elmPrincipals[1].resize(elmCount);
elmPrincipals[2].resize(elmCount);
elmPrincipalDirections.resize(elmCount);
for (size_t nIdx = 0; nIdx < elmCount; ++nIdx)
{
cvf::Vec3f principalDirs[3];
cvf::Vec3f principalValues = (*elmTensors)[nIdx].calculatePrincipals(principalDirs);
elmPrincipals[0][nIdx] = principalValues[0];
elmPrincipals[1][nIdx] = principalValues[1];
elmPrincipals[2][nIdx] = principalValues[2];
elmPrincipalDirections[nIdx][0] = principalDirs[0];
elmPrincipalDirections[nIdx][1] = principalDirs[1];
elmPrincipalDirections[nIdx][2] = principalDirs[2];
}
}
//--------------------------------------------------------------------------------------------------