← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2072: 1. penetrationDepth() is added to DemXDofGeom

 

Thanks for comments, r2073.

I'm still learning ;)


2010/3/10 Václav Šmilauer <eudoxos@xxxxxxxx>

>
> > virtual Real penetrationDepth(){throw;};
>
> Why do you throw on penetrationDepth for Dem3DofGeom?
>
> Just return (refR1+refR2)-refLength-displacementN() in the base class.
> There is no reason to have this function reimplemented in
> Dem3DofGeom_SphereSphere etc since everything is defined in the parent
> class. (Make sure you understand how virtual functions work;
> displacementN() will call function of the derived class, even if called
> from Dem3DofGeom::penerationDepth().) Please fix that.
>
> Cheers, Vaclav
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References