> It's ok. Unless I made a mistake it doesn't change anything in you code since > I didn't modify the original function. The new function has the only puprpose > to be faster, it is consistent to remove this "norm()". Ah, get it, it is a new method! I overlooked that. Sorry.
You should call it something clearer, like scaleDisplacementT() (why Max?). Since you added it as virtual function to the Dem3DofGeom base class, you MUST also implement in Dem3DofGeom_FacetSphere and Dem3DofGeom_WallSphere (not just Dem3DofGeom_SphereSphere). Make it return void, not zero. It is more confusing to return meaningless zero all the time, rather than nothing. I don't really see why you don't add it as non-virtual method to Dem3DofGeom which will call internally slipToDisplacementTMax (which is virtual). This way you have to implement it at 3 times. I don't think computing norm() takes that much time (it could return squaredNorm anyways, and compute the sqrt only where it is really used). Cheers, v. _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

