[PATCH 4 of 4] issue1462/3: When changing units (t/a -> m^3/a), also change total load

Wald Commits scm-commit at wald.intevation.org
Fri Aug 30 12:23:42 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1377858830 -7200
# Node ID 733c35239fe7d8e31724e91ebbb8382c937df9e1
# Parent  e6a8255d076446aea6971013c7caf7a6cf0f6bcc
issue1462/3: When changing units (t/a -> m^3/a), also change total load.

diff -r e6a8255d0764 -r 733c35239fe7 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Fri Aug 30 12:32:29 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Fri Aug 30 12:33:50 2013 +0200
@@ -552,6 +552,7 @@
             double bedSand = fraction.getSuspSandBed();
             double sediment = fraction.getSuspSediment();
             double total = fraction.getTotal();
+            double loadTotal = fraction.getLoadTotal();
             load.setCoarse(km, (coarse * dens), fraction.getCoarseRange());
             load.setFineMiddle(km, (fineMiddle * dens), fraction.getFineMiddleRange());
             load.setSand(km, (sand * dens), fraction.getSandRange());
@@ -559,6 +560,7 @@
             load.setSuspSandBed(km, (bedSand * dens), fraction.getSuspSandBedRange());
             load.setSuspSediment(km, (sediment * dens), fraction.getSuspSedimentRange());
             load.setTotal(km, (total * dens), fraction.getTotalRange());
+            load.setLoadTotal(km, (loadTotal * dens), fraction.getLoadTotalRange());
         }
         return load;
     }


More information about the Dive4elements-commits mailing list