yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04640
[Branch ~yade-dev/yade/trunk] Rev 2259: - Fix Wm3 build in Dem3DofGeom_FacetSphere.cpp, the Real*Vector had not
------------------------------------------------------------
revno: 2259
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Fri 2010-05-28 11:35:32 +0200
message:
- Fix Wm3 build in Dem3DofGeom_FacetSphere.cpp, the Real*Vector had not
been reverted in that file.
- Workaround https://bugs.launchpad.net/bugs/585898.
modified:
pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.cpp
pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp
pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_WallSphere.cpp
pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp
--
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/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.cpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.cpp 2010-05-24 15:42:48 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.cpp 2010-05-28 09:35:32 +0000
@@ -43,7 +43,7 @@
Vector3r p1=contPtInTgPlane1(), p2=contPtInTgPlane2();
Vector3r diff=.5*(multiplier-1)*(p2-p1);
setTgPlanePts(p1-diff,p2+diff);
- return 2*diff;
+ return diff*2.0;
}
=== modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp 2010-05-26 08:18:36 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.cpp 2010-05-28 09:35:32 +0000
@@ -86,7 +86,7 @@
Vector3r p1=contPtInTgPlane1(), p2=contPtInTgPlane2();
Vector3r diff=.5*(multiplier-1)*(p2-p1);
setTgPlanePts(p1-diff,p2+diff);
- return diff*2;
+ return diff*2.0;
}
=== modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_WallSphere.cpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_WallSphere.cpp 2010-05-26 08:18:36 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_WallSphere.cpp 2010-05-28 09:35:32 +0000
@@ -43,7 +43,7 @@
Vector3r p1=contPtInTgPlane1(), p2=contPtInTgPlane2();
Vector3r diff=.5*(multiplier-1)*(p2-p1);
setTgPlanePts(p1-diff,p2+diff);
- return diff*2;
+ return diff*2.0;
}
CREATE_LOGGER(Ig2_Wall_Sphere_Dem3DofGeom);
=== modified file 'pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp 2010-05-27 22:07:26 +0000
+++ pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp 2010-05-28 09:35:32 +0000
@@ -124,12 +124,15 @@
phys->normalForce=phys->kn*displN*geom->normal;
Real maxFsSq=phys->normalForce.squaredNorm()*pow(phys->tangensOfFrictionAngle,2);
Vector3r trialFs=phys->ks*geom->displacementT();
- Real trialFsSq = trialFs.squaredNorm();
- if(trialFsSq>maxFsSq){
- Real multiplier=sqrt(maxFsSq/trialFsSq);
- //geom->scaleDisplacementT(multiplier);
- trialFs*=multiplier;
- }
+
+// FIXME : This is generating bug https://bugs.launchpad.net/bugs/585898
+// Real trialFsSq = trialFs.squaredNorm();
+// if(trialFsSq>maxFsSq){
+// Real multiplier=sqrt(maxFsSq/trialFsSq);
+// geom->scaleDisplacementT(multiplier); trialFs*=multiplier;}
+ //Workaround start
+ if(trialFs.squaredNorm()>maxFsSq){ geom->slipToDisplacementTMax(sqrt(maxFsSq)/phys->ks); trialFs*=sqrt(maxFsSq/(trialFs.squaredNorm()));}
+ //Workaround end
phys->shearForce=trialFs;
applyForceAtContactPoint(phys->normalForce+trialFs,geom->contactPoint,contact->getId1(),geom->se31.position,contact->getId2(),geom->se32.position,scene);
}