Mercurial > dive4elements > river
changeset 6411:a21f7a3e4be5
Revert to rev 6404 for issue1235
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 25 Jun 2013 07:59:44 +0200 |
parents | 19066b1220b5 |
children | c74261e05a62 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Mon Jun 24 15:02:26 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Tue Jun 25 07:59:44 2013 +0200 @@ -300,20 +300,20 @@ /** Returns true if all fraction values except SuspSediment are unset. */ private boolean hasOnlySuspValues(SedimentLoadFraction fraction) { return (fraction.getSuspSediment() != 0d && - fraction.getSuspSand() != 0d && fraction.getCoarse() == 0d && fraction.getFineMiddle() == 0d && - fraction.getSand() == 0d); + fraction.getSand() == 0d && + fraction.getSuspSand() == 0d); } /** Returns true if all fraction values except SuspSediment are set. */ private boolean hasButSuspValues(SedimentLoadFraction fraction) { return (fraction.getSuspSediment() == 0d && - fraction.getSuspSand() == 0d && fraction.getCoarse() != 0d && fraction.getFineMiddle() != 0d && - fraction.getSand() != 0d); + fraction.getSand() != 0d && + fraction.getSuspSand() != 0d); } @@ -369,7 +369,7 @@ // Adjust and remember schwebstoffs range and value. lastSuspRange = (Range) fraction.getSuspSedimentRange().clone(); lastSuspRange.setStart(fraction.getCoarseRange().getEnd()); - lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); + lastSuspValue = fraction.getSuspSediment(); lastOtherRange = null; fairLoad.setTotal(km, total, fraction.getCoarseRange()); } @@ -401,7 +401,7 @@ if (suspSedimentRange.getEnd() > lastOtherRange.getEnd()) { lastSuspRange = (Range) suspSedimentRange.clone(); lastSuspRange.setStart(lastOtherRange.getEnd()); - lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); + lastSuspValue = fraction.getSuspSediment(); lastOtherRange = null; } else { @@ -417,7 +417,7 @@ } else { lastSuspRange = suspSedimentRange; - lastSuspValue = fraction.getSuspSediment() + fraction.getSuspSand(); + lastSuspValue = fraction.getSuspSediment(); lastOtherRange = null; } } @@ -426,6 +426,7 @@ double total = fraction.getCoarse() + fraction.getFineMiddle() + fraction.getSand() + + fraction.getSuspSand() + lastSuspValue; double maxStart = Math.max(fraction.getCoarseRange().getStart(), lastSuspRange.getStart());