diff options
author | goodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-11-02 16:18:03 +0000 |
---|---|---|
committer | goodale <goodale@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2001-11-02 16:18:03 +0000 |
commit | 4017bb013c47a27a265a280690b9144efecf9405 (patch) | |
tree | ed30a85328e9b65395b82608798e52f811868dc6 /src/SetupPGV.c | |
parent | ad3e03f0fc961880469a315dde1b7a42fad72715 (diff) |
It's prefectly legitimate to have an array with 0 points as long as
storage isn't assigned for it, so check that avgpoints > 0 before
dividing by it.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@362 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGV.c')
-rw-r--r-- | src/SetupPGV.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c index fe60968..0699549 100644 --- a/src/SetupPGV.c +++ b/src/SetupPGV.c @@ -924,7 +924,7 @@ int PUGH_SetupPGExtrasSizes(int dim, } avgpoints = avgpoints/total_procs; - this->maxskew = 100*(maxpoints-minpoints)/avgpoints; + this->maxskew = avgpoints > 0 ? 100*(maxpoints-minpoints)/avgpoints : 0; return 0; } |