Author: eudoxos
Date: 2009-07-04 02:50:21 +0200 (Sat, 04 Jul 2009)
New Revision: 1839
Modified:
trunk/pkg/common/Engine/MetaEngine/InteractionDispatchers.cpp
trunk/pkg/common/Engine/MetaEngine/InteractionPhysicsMetaEngine.cpp
trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
Log:
1. Fix STUPID (my fault, sorry!!) mistake in setting Interaction::iterMadeReal,
which cause ElasticContactLaw to function wrong. It concerns a few other
contact laws calling isFresh, which would return true as well. Sorry again.
Modified: trunk/pkg/common/Engine/MetaEngine/InteractionDispatchers.cpp
===================================================================
--- trunk/pkg/common/Engine/MetaEngine/InteractionDispatchers.cpp
2009-07-03 08:41:08 UTC (rev 1838)
+++ trunk/pkg/common/Engine/MetaEngine/InteractionDispatchers.cpp
2009-07-04 00:50:21 UTC (rev 1839)
@@ -71,9 +71,10 @@
assert(I->functorCache.phys);
I->functorCache.phys->go(b1->physicalParameters,b2->physicalParameters,I);
assert(I->interactionPhysics);
- I->iterMadeReal=rootBody->currentIteration; // mark the
interaction as created right now
+ if(!wasReal)
I->iterMadeReal=rootBody->currentIteration; // mark the interaction as created
right now
+
// ConstitutiveLawDispatcher
// populating constLaw cache must be done after geom
and physics dispatchers have been called, since otherwise the interaction
// would not have interactionGeometry and
interactionPhysics yet.
Modified: trunk/pkg/common/Engine/MetaEngine/InteractionPhysicsMetaEngine.cpp
===================================================================
--- trunk/pkg/common/Engine/MetaEngine/InteractionPhysicsMetaEngine.cpp
2009-07-03 08:41:08 UTC (rev 1838)
+++ trunk/pkg/common/Engine/MetaEngine/InteractionPhysicsMetaEngine.cpp
2009-07-04 00:50:21 UTC (rev 1839)
@@ -35,9 +35,10 @@
if(interaction->interactionGeometry){
shared_ptr<Body>& b1 =
(*bodies)[interaction->getId1()];
shared_ptr<Body>& b2 =
(*bodies)[interaction->getId2()];
+ bool hadPhys=interaction->interactionPhysics;
operator()(b1->physicalParameters,
b2->physicalParameters, interaction);
assert(interaction->interactionPhysics);
- interaction->iterMadeReal=ncb->currentIteration;
+ if(!hadPhys)
interaction->iterMadeReal=ncb->currentIteration;
}
}
}
Modified: trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
===================================================================
--- trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp 2009-07-03
08:41:08 UTC (rev 1838)
+++ trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp 2009-07-04
00:50:21 UTC (rev 1839)
@@ -77,7 +77,8 @@
Vector3r& shearForce =
currentContactPhysics->shearForce;
- if (contact->isFresh(ncb)) shearForce=Vector3r(0,0,0);
+ // no need for this, initialized to Vector3r::ZERO in
NormalShearInteraction ctor
+ // if (contact->isFresh(ncb))
shearForce=Vector3r(0,0,0);
Real un=currentContactGeometry->penetrationDepth;
TRVAR3(currentContactGeometry->penetrationDepth,de1->se3.position,de2->se3.position);
@@ -93,6 +94,7 @@
#ifdef SCG_SHEAR
}
#endif
+
// PFC3d SlipModel, is using friction angle.
CoulombCriterion
Real maxFs =
currentContactPhysics->normalForce.SquaredLength() *
std::pow(currentContactPhysics->tangensOfFrictionAngle,2);
@@ -105,7 +107,6 @@
if(useShear)
currentContactGeometry->shear*=ratio;
#endif
}
- ////////// PFC3d SlipModel
applyForceAtContactPoint(-currentContactPhysics->normalForce-shearForce ,
currentContactGeometry->contactPoint , id1 , de1->se3.position , id2 ,
de2->se3.position , ncb);
currentContactPhysics->prevNormal =
currentContactGeometry->normal;
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp