yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #11165
[Branch ~yade-pkg/yade/git-trunk] Rev 4131: use Shop::growParticles in TriaxialStressController (fix https://bugs.launchpad.net/yade/+bug/135...
------------------------------------------------------------
revno: 4131
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Fri 2014-08-01 19:27:01 +0200
message:
use Shop::growParticles in TriaxialStressController (fix https://bugs.launchpad.net/yade/+bug/1351275)
modified:
pkg/dem/TriaxialStressController.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/TriaxialStressController.cpp'
--- pkg/dem/TriaxialStressController.cpp 2014-08-01 15:37:51 +0000
+++ pkg/dem/TriaxialStressController.cpp 2014-08-01 17:27:01 +0000
@@ -232,34 +232,10 @@
meanStress/=6.;
}
-void TriaxialStressController::controlInternalStress ( Real multiplier ) {
+void TriaxialStressController::controlInternalStress ( Real multiplier )
+{
particlesVolume *= pow ( multiplier,3 );
- BodyContainer::iterator bi = scene->bodies->begin();
- BodyContainer::iterator biEnd = scene->bodies->end();
- for ( ; bi!=biEnd ; ++bi )
- {
- if ( ( *bi )->isDynamic() )
- {
- ( static_cast<Sphere*> ( ( *bi )->shape.get() ) )->radius *= multiplier;
- (*bi)->state->mass*=pow(multiplier,3);
- (*bi)->state->inertia*=pow(multiplier,5);
-
- }
- }
- InteractionContainer::iterator ii = scene->interactions->begin();
- InteractionContainer::iterator iiEnd = scene->interactions->end();
- for (; ii!=iiEnd ; ++ii)
- {
- if ((*ii)->isReal()) {
- ScGeom* contact = static_cast<ScGeom*>((*ii)->geom.get());
- if ((*(scene->bodies))[(*ii)->getId1()]->isDynamic())
- contact->radius1 = static_cast<Sphere*>((* (scene->bodies))[(*ii)->getId1()]->shape.get())->radius;
- if ((* (scene->bodies))[(*ii)->getId2()]->isDynamic())
- contact->radius2 = static_cast<Sphere*>((* (scene->bodies))[(*ii)->getId2()]->shape.get())->radius;
- const shared_ptr<FrictPhys>& contactPhysics = YADE_PTR_CAST<FrictPhys>((*ii)->phys);
- contactPhysics->kn*=multiplier; contactPhysics->ks*=multiplier;
- }
- }
+ Shop::growParticles(multiplier,true,true);
}
/*!