[PATCH] Sediment load: Added more 'sums' to be calculated

Wald Commits scm-commit at wald.intevation.org
Thu Jul 17 18:22:30 CEST 2014


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1405614136 -7200
# Node ID 9e79e384aa8b1871ce829ad5f73e1c559f711846
# Parent  d49846f05108de898cf9188a5a7d3925118178fb
Sediment load: Added more 'sums' to be calculated.

diff -r d49846f05108 -r 9e79e384aa8b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jul 17 16:51:18 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jul 17 18:22:16 2014 +0200
@@ -38,7 +38,10 @@
         /* GF_SAND           */ Station.BED_LOAD,
         /* GF_SUSP_SAND      */ Station.BED_LOAD,
         /* GF_SUSP_SAND_BED  */ Station.BED_LOAD,
-        /* GF_SUSP_SEDIMENT  */ Station.SUSPENDED
+        /* GF_SUSP_SEDIMENT  */ Station.SUSPENDED,
+        /* GF_TOTAL          */ Station.BED_LOAD|Station.SUSPENDED,
+        /* GF_BED_LOAD       */ Station.BED_LOAD,
+        /* GF_SUSPENDED_LOAD */ Station.BED_LOAD
     };
 
     public static final int measurementStationType(int grainFraction) {
@@ -173,7 +176,7 @@
         }
 
         public boolean isType(int type) {
-            return (this.type & type) == type;
+            return (this.type & type) != 0;
         }
 
         public void setNext(Station next) {
diff -r d49846f05108 -r 9e79e384aa8b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Thu Jul 17 16:51:18 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Thu Jul 17 18:22:16 2014 +0200
@@ -44,6 +44,42 @@
         SedimentLoadData.GF_SUSP_SAND
     };
 
+    public static final int [] TOTAL_LOAD_BFG = {
+        SedimentLoadData.GF_TOTAL
+    };
+
+    public static final int [] BED_LOAD_BFG = {
+        SedimentLoadData.GF_BED_LOAD
+    };
+
+    public static final int [] SUSPENDED_LOAD_BFG = {
+        SedimentLoadData.GF_SUSPENDED_LOAD
+    };
+
+    public static final int [] COARSE_FLYS = {
+        SedimentLoadData.GF_COARSE
+    };
+
+    public static final int [] FINE_MIDDLE_FLYS = {
+        SedimentLoadData.GF_FINE_MIDDLE
+    };
+
+    public static final int [] SAND_FLYS = {
+        SedimentLoadData.GF_SAND
+    };
+
+    public static final int [] SUSP_SAND_FLYS = {
+        SedimentLoadData.GF_SUSP_SAND
+    };
+
+    public static final int [] SUSP_SAND_BED_FLYS = {
+        SedimentLoadData.GF_SUSP_SAND_BED
+    };
+
+    public static final int [] SUSP_SEDIMENT_FLYS = {
+        SedimentLoadData.GF_SUSP_SEDIMENT
+    };
+
     public static final class Sum implements Value.Visitor {
 
         private int n;


More information about the Dive4Elements-commits mailing list