← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2237: - Simplify equations inside plastic condition of Dem3Dof (1 sqrt instead of 3, less norm()), add ...

 

> 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.




Follow ups

References