yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10658
[Branch ~yade-pkg/yade/git-trunk] Rev 3881: Remove massMultiply paramter
------------------------------------------------------------
revno: 3881
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2014-04-03 11:06:23 +0200
message:
Remove massMultiply paramter
It is not used any more
modified:
pkg/dem/ViscoelasticPM.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/ViscoelasticPM.cpp'
--- pkg/dem/ViscoelasticPM.cpp 2014-04-03 08:13:29 +0000
+++ pkg/dem/ViscoelasticPM.cpp 2014-04-03 09:06:23 +0000
@@ -203,10 +203,10 @@
const int mRtype1 = mat1->mRtype; const int mRtype2 = mat2->mRtype;
- phys->kn = contactParameterCalculation(kn1,kn2, 1);
- phys->ks = contactParameterCalculation(ks1,ks2, 1);
- phys->cn = contactParameterCalculation(cn1,cn2, 1);
- phys->cs = contactParameterCalculation(cs1,cs2, 1);
+ phys->kn = contactParameterCalculation(kn1,kn2);
+ phys->ks = contactParameterCalculation(ks1,ks2);
+ phys->cn = contactParameterCalculation(cn1,cn2);
+ phys->cs = contactParameterCalculation(cs1,cs2);
if ((mR1>0) or (mR2>0)) {
phys->mR = 2.0/( ((mR1>0)?1/mR1:0) + ((mR2>0)?1/mR2:0) );
@@ -225,15 +225,10 @@
}
/* Contact parameter calculation function */
-Real contactParameterCalculation(const Real& l1, const Real& l2, const bool& massMultiply){
- if (massMultiply) {
- // If one of paramaters > 0. we DO NOT return 0
- Real a = (l1?1/l1:0) + (l2?1/l2:0);
- if (a) return 1/a;
- else return 0;
- } else {
- // If one of paramaters > 0, we return 0
- return (l1>0 or l2>0)?l1*l2/(l1+l2):0;
- }
+Real contactParameterCalculation(const Real& l1, const Real& l2){
+ // If one of paramaters > 0. we DO NOT return 0
+ Real a = (l1?1/l1:0) + (l2?1/l2:0);
+ if (a) return 1/a;
+ else return 0;
}