From 610473a6b33e467f9352585b4747e49c8749991d Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Mon, 15 May 2023 08:07:49 +0200 Subject: [PATCH] Fix a few signed/unsigned warnings --- src/cosserat-continuum.cc | 6 +++--- test/nonplanarcosseratenergytest.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cosserat-continuum.cc b/src/cosserat-continuum.cc index 11f95531..eef6a5a8 100644 --- a/src/cosserat-continuum.cc +++ b/src/cosserat-continuum.cc @@ -468,7 +468,7 @@ int main (int argc, char *argv[]) try BlockVector<FieldMatrix<double,3,3> > dOV; Dune::Functions::interpolate(orientationPowerBasis, dOV, orientationDirichletValues); - for (int i = 0; i < compositeBasis.size({0}); i++) { + for (std::size_t i = 0; i < compositeBasis.size({0}); i++) { FieldVector<double,3> x0i = x[_0][i].globalCoordinates(); for (int j=0; j<3; j++) { if (deformationDirichletDofs[i][j]) @@ -523,7 +523,7 @@ int main (int argc, char *argv[]) try //Therefore, x and the dirichletDofs are converted to a RigidBodyMotion structure, as well as the Hessian and Gradient that are returned by the assembler std::vector<TargetSpace> xTargetSpace(compositeBasis.size({0})); BitSetVector<TargetSpace::TangentVector::dimension> dirichletDofsTargetSpace(compositeBasis.size({0}), false); - for (int i = 0; i < compositeBasis.size({0}); i++) { + for (std::size_t i = 0; i < compositeBasis.size({0}); i++) { for (int j = 0; j < 3; j ++) { // Displacement part xTargetSpace[i].r[j] = x[_0][i][j]; dirichletDofsTargetSpace[i][j] = deformationDirichletDofs[i][j]; @@ -570,7 +570,7 @@ int main (int argc, char *argv[]) try solver.solve(); xTargetSpace = solver.getSol(); } - for (int i = 0; i < xTargetSpace.size(); i++) { + for (std::size_t i = 0; i < xTargetSpace.size(); i++) { x[_0][i] = xTargetSpace[i].r; x[_1][i] = xTargetSpace[i].q; } diff --git a/test/nonplanarcosseratenergytest.cc b/test/nonplanarcosseratenergytest.cc index a8dd5a48..20f181f7 100644 --- a/test/nonplanarcosseratenergytest.cc +++ b/test/nonplanarcosseratenergytest.cc @@ -101,7 +101,7 @@ double calculateEnergy(const int numLevels, const F1 referenceConfigurationFunct BlockVector<FieldVector<double,3> > helperVector2(feBasis.size()); Dune::Functions::interpolate(deformationPowerBasis, helperVector2, configurationFunction); - for (int i = 0; i < feBasis.size(); i++) { + for (std::size_t i = 0; i < feBasis.size(); i++) { for (int j = 0; j < dimworld; j++) sol[i].r[j] = helperVector2[i][j]; -- GitLab