Index: dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs =================================================================== diff -u -r523 -r530 --- dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 523) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 530) @@ -262,12 +262,12 @@ /// /// The input waterpressure interpolation model. /// - public static WaterpressureInterpolationModel ConvertToWaterpressureInterpolationModel(SoilProfile1DLayerWaterpressureInterpolationModel inputWaterpressureInterpolationModel) + public static WaterpressureInterpolationModel ConvertToWaterpressureInterpolationModel(int inputWaterpressureInterpolationModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary() { - {SoilProfile1DLayerWaterpressureInterpolationModel.Automatic,WaterpressureInterpolationModel.Automatic}, - {SoilProfile1DLayerWaterpressureInterpolationModel.Hydrostatic, WaterpressureInterpolationModel.Hydrostatic} + {0, WaterpressureInterpolationModel.Automatic}, + {1, WaterpressureInterpolationModel.Hydrostatic} }; return translationTable[inputWaterpressureInterpolationModel]; } @@ -277,12 +277,12 @@ /// /// The waterpressure interpolation model. /// - public static SoilProfile1DLayerWaterpressureInterpolationModel ConvertToInputWaterpressureInterpolationModel(WaterpressureInterpolationModel waterpressureInterpolationModel) + public static int ConvertToInputWaterpressureInterpolationModel(WaterpressureInterpolationModel waterpressureInterpolationModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary() { - {WaterpressureInterpolationModel.Automatic,SoilProfile1DLayerWaterpressureInterpolationModel.Automatic}, - {WaterpressureInterpolationModel.Hydrostatic, SoilProfile1DLayerWaterpressureInterpolationModel.Hydrostatic} + {WaterpressureInterpolationModel.Automatic, 0}, + {WaterpressureInterpolationModel.Hydrostatic, 1} }; return translationTable[waterpressureInterpolationModel]; } Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs =================================================================== diff -u -r523 -r530 --- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 523) +++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 530) @@ -175,17 +175,17 @@ } [Test] - [TestCase(SoilProfile1DLayerWaterpressureInterpolationModel.Automatic, WaterpressureInterpolationModel.Automatic)] - [TestCase(SoilProfile1DLayerWaterpressureInterpolationModel.Automatic, WaterpressureInterpolationModel.Automatic)] - public void CanConvertToWaterpressureInterpolationModel(SoilProfile1DLayerWaterpressureInterpolationModel inputInterpolationModel, WaterpressureInterpolationModel interpolationModel) + [TestCase(0, WaterpressureInterpolationModel.Automatic)] + [TestCase(1, WaterpressureInterpolationModel.Hydrostatic)] + public void CanConvertToWaterpressureInterpolationModel(int inputInterpolationModel, WaterpressureInterpolationModel interpolationModel) { Assert.AreEqual(interpolationModel, ConversionHelper.ConvertToWaterpressureInterpolationModel(inputInterpolationModel)); } [Test] - [TestCase(WaterpressureInterpolationModel.Automatic, SoilProfile1DLayerWaterpressureInterpolationModel.Automatic)] - [TestCase(WaterpressureInterpolationModel.Automatic, SoilProfile1DLayerWaterpressureInterpolationModel.Automatic)] - public void CanConvertToInputWaterpressureInterpolationModel(WaterpressureInterpolationModel inputInterpolationModel, SoilProfile1DLayerWaterpressureInterpolationModel interpolationModel) + [TestCase(WaterpressureInterpolationModel.Automatic, 0)] + [TestCase(WaterpressureInterpolationModel.Hydrostatic, 1)] + public void CanConvertToInputWaterpressureInterpolationModel(WaterpressureInterpolationModel inputInterpolationModel, int interpolationModel) { Assert.AreEqual(interpolationModel, ConversionHelper.ConvertToInputWaterpressureInterpolationModel(inputInterpolationModel)); } Index: dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs =================================================================== diff -u -r522 -r530 --- dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 522) +++ dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 530) @@ -33,6 +33,8 @@ private SoilProfile1D[] soilProfiles1DField; + private SoilProfile2D[] soilProfiles2DField; + private InputDamProjectType damProjectTypeField; /// @@ -91,6 +93,17 @@ } /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)] + public SoilProfile2D[] SoilProfiles2D { + get { + return this.soilProfiles2DField; + } + set { + this.soilProfiles2DField = value; + } + } + + /// [System.Xml.Serialization.XmlAttributeAttribute()] public InputDamProjectType DamProjectType { get { @@ -353,6 +366,279 @@ [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SoilProfile2D { + + private SoilProfile2DLayer[] layersField; + + private SoilProfile2DPreconsolidationStress[] preconsolidationStressesField; + + private string nameField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Layer", IsNullable=false)] + public SoilProfile2DLayer[] Layers { + get { + return this.layersField; + } + set { + this.layersField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("PreconsolidationStress", IsNullable=false)] + public SoilProfile2DPreconsolidationStress[] PreconsolidationStresses { + get { + return this.preconsolidationStressesField; + } + set { + this.preconsolidationStressesField = 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 SoilProfile2DLayer { + + private SoilProfile2DLayerSurface surfaceField; + + private string soilNameField; + + private bool isAquiferField; + + private int waterpressureInterpolationModelField; + + /// + public SoilProfile2DLayerSurface Surface { + get { + return this.surfaceField; + } + set { + this.surfaceField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SoilName { + get { + return this.soilNameField; + } + set { + this.soilNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool IsAquifer { + get { + return this.isAquiferField; + } + set { + this.isAquiferField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int WaterpressureInterpolationModel { + get { + return this.waterpressureInterpolationModelField; + } + set { + this.waterpressureInterpolationModelField = 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 SoilProfile2DLayerSurface { + + private SoilProfile2DLayerSurfacePoints[] outerLoopField; + + private SoilProfile2DLayerSurfaceInnerloopPoints[][] innerloopField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Points", IsNullable=false)] + public SoilProfile2DLayerSurfacePoints[] OuterLoop { + get { + return this.outerLoopField; + } + set { + this.outerLoopField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Points", typeof(SoilProfile2DLayerSurfaceInnerloopPoints), IsNullable=false)] + public SoilProfile2DLayerSurfaceInnerloopPoints[][] Innerloop { + get { + return this.innerloopField; + } + set { + this.innerloopField = 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 SoilProfile2DLayerSurfacePoints { + + private double xField; + + private double zField; + + /// + [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.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 SoilProfile2DLayerSurfaceInnerloopPoints { + + private double xField; + + private double zField; + + /// + [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.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 SoilProfile2DPreconsolidationStress { + + private double stressValueField; + + private string nameField; + + private double xField; + + private double zField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double StressValue { + get { + return this.stressValueField; + } + set { + this.stressValueField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [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.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SoilProfile1D { private SoilProfile1DLayer[] layersField; @@ -424,7 +710,7 @@ private bool isAquiferField; - private SoilProfile1DLayerWaterpressureInterpolationModel waterpressureInterpolationModelField; + private int waterpressureInterpolationModelField; /// [System.Xml.Serialization.XmlAttributeAttribute()] @@ -472,7 +758,7 @@ /// [System.Xml.Serialization.XmlAttributeAttribute()] - public SoilProfile1DLayerWaterpressureInterpolationModel WaterpressureInterpolationModel { + public int WaterpressureInterpolationModel { get { return this.waterpressureInterpolationModelField; } @@ -485,19 +771,6 @@ /// [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] - public enum SoilProfile1DLayerWaterpressureInterpolationModel { - - /// - Automatic, - - /// - Hydrostatic, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] - [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]