Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/FillDamFromXmlInputTests.cs
===================================================================
diff -u -r488 -r496
--- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/FillDamFromXmlInputTests.cs (.../FillDamFromXmlInputTests.cs) (revision 488)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/FillDamFromXmlInputTests.cs (.../FillDamFromXmlInputTests.cs) (revision 496)
@@ -74,9 +74,9 @@
damProjectData.DamProjectType = DamProjectType.Design;
damProjectData.Dike = new Dike();
Dike dike = damProjectData.Dike;
- FillLocations(dike);
FillSurfaceLines(dike);
FillSoils(dike);
+ FillLocations(dike);
return damProjectData;
}
@@ -118,10 +118,11 @@
private void FillSurfaceLines(Dike dike)
{
- const int surfaceLineCount = 2;
+ const int surfaceLineCount = 3;
for (int i = 0; i < surfaceLineCount; i++)
{
var surfaceLine = new SurfaceLine2();
+ surfaceLine.Name = String.Format("SurfaceLine {0}", i);
surfaceLine.CharacteristicPoints.Geometry = surfaceLine.Geometry;
AddPointsToSurfaceLines(surfaceLine);
dike.SurfaceLines2.Add(surfaceLine);
@@ -166,6 +167,7 @@
location.HeadPl2 = 1.0 * i + 0.24;
location.HeadPl3 = 1.0 * i + 0.25;
location.HeadPl4 = 1.0 * i + 0.21;
+ location.SurfaceLine2 = dike.SurfaceLines2[i];
dike.Locations.Add(location);
}
}
Index: dam engine/trunk/Xsds Liquid/DamInput.xsd
===================================================================
diff -u -r488 -r496
--- dam engine/trunk/Xsds Liquid/DamInput.xsd (.../DamInput.xsd) (revision 488)
+++ dam engine/trunk/Xsds Liquid/DamInput.xsd (.../DamInput.xsd) (revision 496)
@@ -40,5 +40,5 @@
-
+
\ No newline at end of file
Index: dam engine/trunk/src/Deltares.DamEngine.Io/DamOutput.cs
===================================================================
diff -u -r474 -r496
--- dam engine/trunk/src/Deltares.DamEngine.Io/DamOutput.cs (.../DamOutput.cs) (revision 474)
+++ dam engine/trunk/src/Deltares.DamEngine.Io/DamOutput.cs (.../DamOutput.cs) (revision 496)
@@ -1,25 +1,4 @@
-// Copyright (C) Stichting Deltares 2017. All rights reserved.
-//
-// This file is part of the Dam Engine.
-//
-// The Dam Engine is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see .
-//
-// All names, logos, and references to "Deltares" are registered trademarks of
-// Stichting Deltares and remain full property of Stichting Deltares at all times.
-// All rights reserved.
-
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
@@ -2335,6 +2314,8 @@
private SurfaceLinePoint[] pointsField;
+ private string nameField;
+
///
[System.Xml.Serialization.XmlArrayItemAttribute("Point", IsNullable=false)]
public SurfaceLinePoint[] Points {
@@ -2345,6 +2326,17 @@
this.pointsField = value;
}
}
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
}
///
Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs
===================================================================
diff -u -r494 -r496
--- dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 494)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 496)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using System.Linq;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.Geometry;
using Deltares.DamEngine.Data.Geotechnics;
@@ -47,13 +48,25 @@
};
Dike dike = damProjectData.Dike;
- TransferLocations(input, dike);
TransferSurfaceLines(input, dike);
TransferSoils(input, dike);
+ TransferLocations(input, dike);
+ // PostProcess(input, dike);
return damProjectData;
}
+ ///
+ /// Postprocess: connect all objects
+ ///
+ /// The input.
+ /// The dike.
+ ///
+ private static void PostProcess(Input input, Dike dike)
+ {
+ throw new NotImplementedException();
+ }
+
private static void TransferSoils(Input input, Dike dike)
{
dike.SoilList = new SoilList();
@@ -78,6 +91,7 @@
{
var surfaceLine = new SurfaceLine2();
var inputSurfaceLine = input.SurfaceLines[i];
+ surfaceLine.Name = inputSurfaceLine.Name;
surfaceLine.CharacteristicPoints.Geometry = surfaceLine.Geometry;
AddPointsToSurfaceLine(inputSurfaceLine, surfaceLine);
dike.SurfaceLines2.Add(surfaceLine);
@@ -127,6 +141,8 @@
location.PlLineOffsetBelowDikeTopAtPolder = waternetOptions.Pl1BelowCrestPolderside;
location.PlLineOffsetBelowShoulderBaseInside = waternetOptions.Pl1BelowShoulderCrestPolderside;
location.PlLineOffsetBelowDikeToeAtPolder = waternetOptions.Pl1BelowToeDikePolderside;
+ SurfaceLine2 surfaceLine = dike.SurfaceLines2.First(n => n.Name.Equals(inputLocation.SurfaceLineName));
+ location.SurfaceLine2 = surfaceLine;
dike.Locations.Add(location);
}
}
Index: dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs
===================================================================
diff -u -r488 -r496
--- dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 488)
+++ dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 496)
@@ -20,6 +20,7 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
public partial class Input {
private Location[] locationsField;
@@ -98,6 +99,8 @@
private LocationPipingProbabilisticParameters pipingProbabilisticParametersField;
+ private string surfaceLineNameField;
+
///
public LocationAssesmentRegionalOptions AssesmentRegionalOptions {
get {
@@ -177,6 +180,17 @@
this.pipingProbabilisticParametersField = value;
}
}
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string SurfaceLineName {
+ get {
+ return this.surfaceLineNameField;
+ }
+ set {
+ this.surfaceLineNameField = value;
+ }
+ }
}
///
@@ -300,7 +314,240 @@
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class Soil {
+
+ private string nameField;
+
+ private double beddingAngleField;
+
+ private bool beddingAngleFieldSpecified;
+
+ private double diameterD70Field;
+
+ private bool diameterD70FieldSpecified;
+
+ private double permeabKxField;
+
+ private bool permeabKxFieldSpecified;
+
+ private double whitesConstantField;
+
+ private bool whitesConstantFieldSpecified;
+
+ private double diameterD90Field;
+
+ private bool diameterD90FieldSpecified;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double BeddingAngle {
+ get {
+ return this.beddingAngleField;
+ }
+ set {
+ this.beddingAngleField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool BeddingAngleSpecified {
+ get {
+ return this.beddingAngleFieldSpecified;
+ }
+ set {
+ this.beddingAngleFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double DiameterD70 {
+ get {
+ return this.diameterD70Field;
+ }
+ set {
+ this.diameterD70Field = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool DiameterD70Specified {
+ get {
+ return this.diameterD70FieldSpecified;
+ }
+ set {
+ this.diameterD70FieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double PermeabKx {
+ get {
+ return this.permeabKxField;
+ }
+ set {
+ this.permeabKxField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool PermeabKxSpecified {
+ get {
+ return this.permeabKxFieldSpecified;
+ }
+ set {
+ this.permeabKxFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double WhitesConstant {
+ get {
+ return this.whitesConstantField;
+ }
+ set {
+ this.whitesConstantField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool WhitesConstantSpecified {
+ get {
+ return this.whitesConstantFieldSpecified;
+ }
+ set {
+ this.whitesConstantFieldSpecified = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double DiameterD90 {
+ get {
+ return this.diameterD90Field;
+ }
+ set {
+ this.diameterD90Field = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool DiameterD90Specified {
+ get {
+ return this.diameterD90FieldSpecified;
+ }
+ set {
+ this.diameterD90FieldSpecified = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class SurfaceLine {
+
+ private SurfaceLinePoint[] pointsField;
+
+ private string nameField;
+
+ ///
+ [System.Xml.Serialization.XmlArrayItemAttribute("Point", IsNullable=false)]
+ public SurfaceLinePoint[] Points {
+ get {
+ return this.pointsField;
+ }
+ set {
+ this.pointsField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public string Name {
+ get {
+ return this.nameField;
+ }
+ set {
+ this.nameField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
+ public partial class SurfaceLinePoint {
+
+ private double xField;
+
+ private double zField;
+
+ private int pointTypeField;
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double X {
+ get {
+ return this.xField;
+ }
+ set {
+ this.xField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public double Z {
+ get {
+ return this.zField;
+ }
+ set {
+ this.zField = value;
+ }
+ }
+
+ ///
+ [System.Xml.Serialization.XmlAttributeAttribute()]
+ public int PointType {
+ get {
+ return this.pointTypeField;
+ }
+ set {
+ this.pointTypeField = value;
+ }
+ }
+ }
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
+ [System.SerializableAttribute()]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class LocationWaternetOptions {
private LocationWaternetOptionsPhreaticLineCreationMethod phreaticLineCreationMethodField;
@@ -969,227 +1216,7 @@
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
[System.SerializableAttribute()]
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class SurfaceLine {
-
- private SurfaceLinePoint[] pointsField;
-
- ///
- [System.Xml.Serialization.XmlArrayItemAttribute("Point", IsNullable=false)]
- public SurfaceLinePoint[] Points {
- get {
- return this.pointsField;
- }
- set {
- this.pointsField = value;
- }
- }
- }
-
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
- [System.SerializableAttribute()]
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class SurfaceLinePoint {
-
- private double xField;
-
- private double zField;
-
- private int pointTypeField;
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double X {
- get {
- return this.xField;
- }
- set {
- this.xField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double Z {
- get {
- return this.zField;
- }
- set {
- this.zField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public int PointType {
- get {
- return this.pointTypeField;
- }
- set {
- this.pointTypeField = value;
- }
- }
- }
-
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
- [System.SerializableAttribute()]
- [System.Diagnostics.DebuggerStepThroughAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class Soil {
-
- private string nameField;
-
- private double beddingAngleField;
-
- private bool beddingAngleFieldSpecified;
-
- private double diameterD70Field;
-
- private bool diameterD70FieldSpecified;
-
- private double permeabKxField;
-
- private bool permeabKxFieldSpecified;
-
- private double whitesConstantField;
-
- private bool whitesConstantFieldSpecified;
-
- private double diameterD90Field;
-
- private bool diameterD90FieldSpecified;
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double BeddingAngle {
- get {
- return this.beddingAngleField;
- }
- set {
- this.beddingAngleField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool BeddingAngleSpecified {
- get {
- return this.beddingAngleFieldSpecified;
- }
- set {
- this.beddingAngleFieldSpecified = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double DiameterD70 {
- get {
- return this.diameterD70Field;
- }
- set {
- this.diameterD70Field = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool DiameterD70Specified {
- get {
- return this.diameterD70FieldSpecified;
- }
- set {
- this.diameterD70FieldSpecified = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double PermeabKx {
- get {
- return this.permeabKxField;
- }
- set {
- this.permeabKxField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool PermeabKxSpecified {
- get {
- return this.permeabKxFieldSpecified;
- }
- set {
- this.permeabKxFieldSpecified = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double WhitesConstant {
- get {
- return this.whitesConstantField;
- }
- set {
- this.whitesConstantField = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool WhitesConstantSpecified {
- get {
- return this.whitesConstantFieldSpecified;
- }
- set {
- this.whitesConstantFieldSpecified = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public double DiameterD90 {
- get {
- return this.diameterD90Field;
- }
- set {
- this.diameterD90Field = value;
- }
- }
-
- ///
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool DiameterD90Specified {
- get {
- return this.diameterD90FieldSpecified;
- }
- set {
- this.diameterD90FieldSpecified = value;
- }
- }
- }
-
- ///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
- [System.SerializableAttribute()]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public enum InputDamProjectType {
///
Index: dam engine/trunk/Xsds Liquid/DamLocation.xsd
===================================================================
diff -u -r448 -r496
--- dam engine/trunk/Xsds Liquid/DamLocation.xsd (.../DamLocation.xsd) (revision 448)
+++ dam engine/trunk/Xsds Liquid/DamLocation.xsd (.../DamLocation.xsd) (revision 496)
@@ -114,5 +114,6 @@
+
\ No newline at end of file
Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs
===================================================================
diff -u -r494 -r496
--- dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 494)
+++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 496)
@@ -74,6 +74,7 @@
{
var surfaceLine = dike.SurfaceLines2[i];
var inputSurfaceLine = new SurfaceLine();
+ inputSurfaceLine.Name = surfaceLine.Name;
inputSurfaceLine.Points = new SurfaceLinePoint[surfaceLine.CharacteristicPoints.Count];
for (int j = 0; j < surfaceLine.CharacteristicPoints.Count; j++)
{
@@ -97,9 +98,9 @@
for (int i = 0; i < locationCount; i++)
{
var location = dike.Locations[i];
- input.Locations[i] = new Io.XmlInput.Location();
+ var inputLocation = new Io.XmlInput.Location();
var waternetOptions = new LocationWaternetOptions();
-
+ inputLocation.SurfaceLineName = location.SurfaceLine2.Name;
waternetOptions.PhreaticLineCreationMethod = ConversionHelper.ConvertToInputPhreaticLineCreationMethod(location.ModelParametersForPLLines.PLLineCreationMethod);
waternetOptions.IntrusionVerticalWaterPressure = ConversionHelper.ConvertToInputIntrusionVerticalWaterPressure(location.IntrusionVerticalWaterPressure ?? IntrusionVerticalWaterPressureType.Standard);
waternetOptions.PolderLevel = location.PolderLevel;
@@ -125,7 +126,8 @@
waternetOptions.Pl1BelowCrestPolderside = location.PlLineOffsetBelowDikeTopAtPolder;
waternetOptions.Pl1BelowShoulderCrestPolderside = location.PlLineOffsetBelowShoulderBaseInside;
waternetOptions.Pl1BelowToeDikePolderside = location.PlLineOffsetBelowDikeToeAtPolder;
- input.Locations[i].WaternetOptions = waternetOptions;
+ inputLocation.WaternetOptions = waternetOptions;
+ input.Locations[i] = inputLocation;
}
}
}
Index: dam engine/trunk/Xsds Liquid/DamSurfaceLine.xsd
===================================================================
diff -u -r471 -r496
--- dam engine/trunk/Xsds Liquid/DamSurfaceLine.xsd (.../DamSurfaceLine.xsd) (revision 471)
+++ dam engine/trunk/Xsds Liquid/DamSurfaceLine.xsd (.../DamSurfaceLine.xsd) (revision 496)
@@ -40,5 +40,6 @@
+
\ No newline at end of file