yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07816
[Branch ~yade-dev/yade/trunk] Rev 2898: Simplify PSD-input data for SpheresFactory
------------------------------------------------------------
revno: 2898
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Thu 2011-07-21 12:00:24 +0200
message:
Simplify PSD-input data for SpheresFactory
modified:
pkg/dem/SpheresFactory.cpp
pkg/dem/SpheresFactory.hpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/SpheresFactory.cpp'
--- pkg/dem/SpheresFactory.cpp 2011-07-20 15:30:57 +0000
+++ pkg/dem/SpheresFactory.cpp 2011-07-21 10:00:24 +0000
@@ -125,9 +125,8 @@
if (PSDuse) { //Add newly created "material" into the bin
Real summMaterial = 0.0;
- if (PSDcalculate=="mass") { PSDCurMean[maxdiffID]=PSDCurMean[maxdiffID]+state->mass; summMaterial = totalMass;}
- else if (PSDcalculate=="volume") { PSDCurMean[maxdiffID]=PSDCurMean[maxdiffID]+vol; summMaterial = totalVolume;}
- else if (PSDcalculate=="number") { PSDCurMean[maxdiffID]=PSDCurMean[maxdiffID]+1; summMaterial = numParticles;}
+ if (PSDcalculateMass) { PSDCurMean[maxdiffID]=PSDCurMean[maxdiffID]+state->mass; summMaterial = totalMass;}
+ else { PSDCurMean[maxdiffID]=PSDCurMean[maxdiffID]+1; summMaterial = numParticles;}
for (unsigned int k=0; k<PSDcum.size(); k++) { //Update relationships in bins
PSDCurProc[k] = PSDCurMean[k]/summMaterial;
=== modified file 'pkg/dem/SpheresFactory.hpp'
--- pkg/dem/SpheresFactory.hpp 2011-07-21 09:34:36 +0000
+++ pkg/dem/SpheresFactory.hpp 2011-07-21 10:00:24 +0000
@@ -37,7 +37,7 @@
((std::string,blockedDOFs,"" ,,"Blocked degress of freedom"))
((vector<Real>,PSDsizes,,,"PSD-dispersion, sizes of cells, Diameter [m]"))
((vector<Real>,PSDcum,,,"PSD-dispersion, cumulative procent meanings [-]"))
- ((std::string,PSDcalculate,"mass",,"How the PSD will be calculated: mass, number or volume of particles")),
+ ((bool,PSDcalculateMass,true,,"PSD-Input is in mass (true), otherwise the number of particles will be considered.")),
PSDuse=false;
);
};