All I would need is the relativeVelocity to compute incidentVn and
incidentVs, having the normal. If I inherit from ScGeom,
relativeVelocity is not a member of it. So how would you access it?
class ScGeomWithVel: public ScGeom: {
...
YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(ScGeomWithVel,ScGeom,....
((Vector3r,incidentV,"incident velocity. |ycomp|"))
}
Vector3r ScGeomWithVel:::rotateAndGetShear(){//I'd have to make it
virtual in ScGeom too, not a problem
...
Vector3r relativeVelocity = (rbp2->vel+rbp2->angVel.cross(c2x)) -
(rbp1->vel+rbp1->angVel.cross(c1x));
relativeVelocity+=shiftVel;
incidentV = relativeVelocity;
<------------------------------------------ updating your variable here
//keep the shear part only
relativeVelocity = relativeVelocity-normal.dot(relativeVelocity)*normal;
...
}
Later in the constitutive law, you just access ig->incidentV.
Other suggestions?
Bruno
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp