From 3323c5733147154ebeb39b09ab4ce73092ad2b66 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Thu, 31 Mar 2016 08:43:14 +0200 Subject: [PATCH] Fixed warnings --- src/generic/EffectiveEnergyDrift.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generic/EffectiveEnergyDrift.cpp b/src/generic/EffectiveEnergyDrift.cpp index a5bee933a..6ccdc437a 100644 --- a/src/generic/EffectiveEnergyDrift.cpp +++ b/src/generic/EffectiveEnergyDrift.cpp @@ -157,7 +157,7 @@ isFirstStep(true){ //construct biases from ActionWithValue with a component named bias vector<ActionWithValue*> tmpActions=plumed.getActionSet().select<ActionWithValue*>(); - for(int i=0;i<tmpActions.size();i++) if(tmpActions[i]->exists(tmpActions[i]->getLabel()+".bias")) biases.push_back(tmpActions[i]); + for(unsigned i=0;i<tmpActions.size();i++) if(tmpActions[i]->exists(tmpActions[i]->getLabel()+".bias")) biases.push_back(tmpActions[i]); //resize counters and displacements useful to communicate with MPI_Allgatherv indexCnt.resize(nProc); @@ -186,7 +186,7 @@ void EffectiveEnergyDrift::update(){ Tensor B=atoms.getPbc().getBox(); Tensor IB=atoms.getPbc().getInvBox(); #pragma omp parallel for - for(int i=0;i<positions.size();++i){ + for(unsigned i=0;i<positions.size();++i){ positions[i]=matmul(positions[i],IB); forces[i]=matmul(B,forces[i]); } @@ -246,7 +246,7 @@ void EffectiveEnergyDrift::update(){ pForces.resize(nLocalAtoms); //compute backmap - for(int j=0;j<indexR.size();j++) backmap[indexR[j]]=j; + for(unsigned j=0;j<indexR.size();j++) backmap[indexR[j]]=j; //fill the vectors pGatindex, pPositions and pForces for(int i=0; i<nLocalAtoms; i++){ @@ -286,7 +286,7 @@ void EffectiveEnergyDrift::update(){ //we cannot just use plumed.getBias() because it will be ==0.0 if PRINT_STRIDE //is not a multiple of the bias actions stride - for(int i=0;i<biases.size();i++) bias+=biases[i]->getOutputQuantity("bias"); + for(unsigned i=0;i<biases.size();i++) bias+=biases[i]->getOutputQuantity("bias"); plumed.comm.Sum(&eedSum,1); output.printField("time",getTime()); -- GitLab