Thread Previous • Date Previous • Date Next • Thread Next |
It would make sense. I don't remember why the updateShearForce code was moved to interaction geometry. Rotating the force in geometry is ok, but computing the shear force increment should be done in ElasticContactLaw. There has been a bit of over-splitting actually, since the incremental ElasticContactLaw can fit in almost 15 lines of code in total (geometry+physics+constitutiveLaw). I don't think it will change anytime soon though.I was actually thinking about implementing contact geometry classes from scratch, both incremental and non-incremental versions, in such way that deformations (normal, shear, twist, bending) would be precomputed in the Ig2_* functor, and then just accessed directly from the constitutive law.
I though I would start from this Dem6Dof next time I have to implement a new law. But you know, it is always the same problem : I know the CohesiveFrictional code and I tested it. Learning new notations will take time, while it needs only few minutes to do what I want with the old code. At least, I'll recommend new users to start with Dem6Dof if they want to derive a new constitutive law (which is not what they seem to do unfortunately).The InteractionGeometry classes themselves would be the same, only the functor would make the distinction of absolute/incremental. There already was 6dof contect implemented (Dem6Dof_Sphere_Sphere), but it is commented out currently; and guess what, it is much cleaner code than the horrible mess (sorry) in CohesiveFrictionalContactLaw.
"Mess" is a relative concept : it took me approximately the same time to understand Galizzi's SortCollider and Smilauer's one. I'm not sure which one is better. Well, I tend to think yours is, but the biggest part is different coding styles from different developpers. I'm not trying to say CohesiveFrictionalContactLaw is well written though. It was not very well structured from the very beginnning, and Janek added tests for snow creep, which doesn't help. I'll clean that eventually, but the code can't be simpler than the algorithm.
Bruno
Thread Previous • Date Previous • Date Next • Thread Next |