yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10832
[Branch ~yade-pkg/yade/git-trunk] Rev 3958: modification of utils.calm function (bug 1318513)
------------------------------------------------------------
revno: 3958
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Fri 2014-05-16 14:22:07 +0200
message:
modification of utils.calm function (bug 1318513)
modified:
pkg/dem/Shop_02.cpp
py/_utils.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/Shop_02.cpp'
--- pkg/dem/Shop_02.cpp 2014-04-02 15:34:57 +0000
+++ pkg/dem/Shop_02.cpp 2014-05-16 12:22:07 +0000
@@ -427,12 +427,9 @@
FOREACH(shared_ptr<Body> b, *scene->bodies){
if (!b || !b->isDynamic()) continue;
if(((mask>0) and ((b->groupMask & mask)==0))) continue;
- Sphere* s=dynamic_cast<Sphere*>(b->shape.get());
- if ( (s) or ( (!s) && (b->isClump()) ) ){
- b->state->vel=Vector3r::Zero();
- b->state->angVel=Vector3r::Zero();
- b->state->angMom=Vector3r::Zero();
- }
+ b->state->vel=Vector3r::Zero();
+ b->state->angVel=Vector3r::Zero();
+ b->state->angMom=Vector3r::Zero();
}
}
=== modified file 'py/_utils.cpp'
--- py/_utils.cpp 2014-04-15 16:49:07 +0000
+++ py/_utils.cpp 2014-05-16 12:22:07 +0000
@@ -542,7 +542,7 @@
py::def("getBodyIdsContacts",Shop__getBodyIdsContacts,(py::args("bodyID")=0),"Get a list of body-ids, which contacts the given body.");
py::def("maxOverlapRatio",maxOverlapRatio,"Return maximum overlap ration in interactions (with :yref:`ScGeom`) of two :yref:`spheres<Sphere>`. The ratio is computed as $\\frac{u_N}{2(r_1 r_2)/r_1+r_2}$, where $u_N$ is the current overlap distance and $r_1$, $r_2$ are radii of the two spheres in contact.");
py::def("shiftBodies",shiftBodies,(py::arg("ids"),py::arg("shift")),"Shifts bodies listed in ids without updating their velocities.");
- py::def("calm",Shop__calm,(py::arg("mask")=-1),"Set translational and rotational velocities of all bodies to zero.");
+ py::def("calm",Shop__calm,(py::arg("mask")=-1),"Set translational and rotational velocities of bodies to zero. Applied to all bodies by default. To calm only some bodies, use mask parameter, it will calm only bodies with groupMask compatible to given value");
py::def("setNewVerticesOfFacet",setNewVerticesOfFacet,(py::arg("b"),py::arg("v1"),py::arg("v2"),py::arg("v3")),"Sets new vertices (in global coordinates) to given facet.");
py::def("setContactFriction",Shop::setContactFriction,py::arg("angleRad"),"Modify the friction angle (in radians) inside the material classes and existing contacts. The friction for non-dynamic bodies is not modified.");
py::def("growParticles",Shop::growParticles,(py::args("multiplier"), py::args("updateMass")=true, py::args("dynamicOnly")=true, py::args("discretization")=0), "Change the size of spheres and sphere clumps by the multiplier. If updateMass=True, then the mass is updated. dynamicOnly=True is mandatory in many cases since in current implementation the function would crash on the non-spherical and non-dynamic bodies (e.g. facets, boxes, etc.). For clumps the masses and inertias are adapted automatically when discretization>0 (for details of inertia tensor integration scheme see :yref:`clump()<BodyContainer.clump>`).");