diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-05-01 21:58:57 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-05-02 09:25:32 +0200 |
commit | 90900d18be8a0b77eb736e622195eecaeaf93bbd (patch) | |
tree | 901a9c60d95301fbc45c48a53625271af2ca305d /Examples/EM | |
parent | 3440bea2b6531a259bbc73d070d5bea69280b717 (diff) |
GenericFD: Correct implementation of Sign
Mathematica defines Sign(x) = Which[x>0, 1, x<0, -1, x==0, 0] whereas
the current implementation in terms of copysign gives Sign(0) != 0.
This causes problems when Sign is used to choose the finite
differencing operator in boundary conditions. This commit restores
the old definition in terms of the sgn function which we define now as
static inline in GenericFD.h.
Diffstat (limited to 'Examples/EM')
0 files changed, 0 insertions, 0 deletions