Author: richefeu
Date: 2009-07-15 10:57:09 +0200 (Wed, 15 Jul 2009)
New Revision: 1867
Modified:
trunk/pkg/common/DataClass/VelocityBins.cpp
Log:
Cast size_t to int in pow(double,int) function to avoid ambiguity for gcc
(compilation failled on one of my computer)
Modified: trunk/pkg/common/DataClass/VelocityBins.cpp
===================================================================
--- trunk/pkg/common/DataClass/VelocityBins.cpp 2009-07-14 23:42:58 UTC (rev
1866)
+++ trunk/pkg/common/DataClass/VelocityBins.cpp 2009-07-15 08:57:09 UTC (rev
1867)
@@ -46,11 +46,11 @@
for(size_t i=0; i<nBins; i++){
Bin& bin=bins[i];
// 0th bin (fastest) has maximum the current maximum;
slowest bin has minimum 0.
- bin.binMaxVelSq=(i==0 ? currMaxVelSq :
refMaxVelSq/pow(binCoeff*binCoeff,i));
- bin.binMinVelSq=(i==nBins-1 ? 0. :
refMaxVelSq/pow(binCoeff*binCoeff,i+1));
+ bin.binMaxVelSq=(i==0 ? currMaxVelSq :
refMaxVelSq/pow(binCoeff*binCoeff,(int)i));
+ bin.binMinVelSq=(i==nBins-1 ? 0. :
refMaxVelSq/pow(binCoeff*binCoeff,(int)(i+1)));
bin.maxDist=(i==0 ?
(refMaxVelSq==0 ? 0:
sqrt(currMaxVelSq/refMaxVelSq)*abs(refSweepLength)) :
- abs(refSweepLength)/pow(binCoeff,i)
+ abs(refSweepLength)/pow(binCoeff,(int)i)
);
bin.currDistSq=0; bin.currMaxVelSq=0; bin.nBodies=0;
}
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp