yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #05648
Re: Problem with 2399 commit
Hi, Vaclav!
It definitely solved the problem. I do not know, why Mathr did not work
there:
There are 2 conditions, which were in shop.cpp:
> if (Mathr::FAbs(b->cn) <= Mathr::ZERO_TOLERANCE ) b->cn=0;
> if (Mathr::FAbs(b->cs) <= Mathr::ZERO_TOLERANCE ) b->cs=0;
>
The comic thing is, that the FAbs(b->c*n*) worked normally, but FAbs(b->c*s*)
did not!!!
I can't find the explanation of this issue.
You think it is a good idea to get rid off "Mathr" everywhere, where
possible?
Anton
On Wed, Sep 8, 2010 at 11:09 AM, Vaclav Smilauer <eudoxos@xxxxxxxx> wrote:
> > I do not understand, why Mathr::FAbs(b->cs) gave me always 0.
> Are you sure it was always?
> > abs(b->cs) solves the problem. Is it Eigen problem, or what do you
> > think?
> Mathr is not related to eigen at all, it is defined for compatibility
> with older parts of code in lib/base/Math.hpp and should essentially
> return the same thing as abs. New code should use Mathr::* things as
> little as possible, for the most part it is all in the standard library.
>
> I am glad that you found the problem.
>
> Cheers, v.
>
>
>
> _______________________________________________
> 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