Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r4562 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4562) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 4669) @@ -534,6 +534,7 @@ soil.RRatio = inputSoil.RRatioSpecified ? inputSoil.RRatio : double.NaN; soil.StrengthIncreaseExponent = inputSoil.StrengthIncreaseExponentSpecified ? inputSoil.StrengthIncreaseExponent : double.NaN; soil.RatioCuPc = inputSoil.RatioCuPcSpecified ? inputSoil.RatioCuPc : double.NaN; + soil.PoP = inputSoil.PopSpecified ? inputSoil.Pop : double.NaN; if (inputSoil.SigmaTauCurve != null) { soil.SigmaTauCurve = new SigmaTauCurve(); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs =================================================================== diff -u -r4627 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4627) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/MacroStabilityIoTests.cs (.../MacroStabilityIoTests.cs) (revision 4669) @@ -42,15 +42,14 @@ [TestFixture] public class MacroStabilityIoTests { - private static readonly List SoilParametersToIgnore = new List - { - "StrengthIncreaseExponent", + private static readonly List soilParametersToIgnore = + [ "RRatio", "RheologicalCoefficient", "BondStressCurve", "UseSoilType", "UseDefaultShearStrengthModel" - }; + ]; [Test] public void GivenDamEngineDataModelWhenGoingToAndFromCSharpWrapperForInputThenDataIsEqual() @@ -90,7 +89,7 @@ // reverse that input to the engine data var fillEngineFromMacroStabilityWrapperInput = new FillEngineFromMacroStabilityWrapperInput(); fillEngineFromMacroStabilityWrapperInput.FillDamProjectDataFromKernelModel(expectedMacrostabilityInput); - + // Then the data models are equal CompareStabilityModel(expectedParametersMStab, fillEngineFromMacroStabilityWrapperInput.FailureMechanismParametersMStab); CompareSoilModel(expectedSoilList, fillEngineFromMacroStabilityWrapperInput.SoilList); @@ -343,7 +342,7 @@ MaxDifferences = 100 } }; - compare.Config.MembersToIgnore = SoilParametersToIgnore; + compare.Config.MembersToIgnore = soilParametersToIgnore; compare.Config.MembersToIgnore.Add("Name"); ComparisonResult result = compare.Compare(expectedSoilProfile, actualSoilProfile); Assert.That(result.Differences.Count, Is.EqualTo(0), "Differences found read/write kernel SoilProfile2D"); @@ -363,7 +362,7 @@ MaxDifferences = 100 } }; - compare.Config.MembersToIgnore = SoilParametersToIgnore; + compare.Config.MembersToIgnore = soilParametersToIgnore; ComparisonResult result = compare.Compare(expectedSoil, actualSoil); Assert.That(result.Differences.Count, Is.EqualTo(0), "Differences found read/write kernel SoilModel"); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs =================================================================== diff -u -r4540 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs (.../FillMacroStabilityWrapperInputFromEngine.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillMacroStabilityWrapperInputFromEngine.cs (.../FillMacroStabilityWrapperInputFromEngine.cs) (revision 4669) @@ -82,12 +82,12 @@ PreprocessingInput = new PreprocessingInput() }; macroStabilityInput.StabilityModel.UpliftVanCalculationGrid = new KernelUpliftVanCalculationGrid(); - - TransferStabilityModelProperties(mStabParameters, macroStabilityInput.StabilityModel); - TransferSoils(damKernelInput.Location.SoilList, macroStabilityInput.StabilityModel.Soils); - macroStabilityInput.StabilityModel.ConstructionStages.Add(new ConstructionStage()); ConstructionStage lastStage = macroStabilityInput.StabilityModel.ConstructionStages.Last(); + + TransferStabilityModelProperties(mStabParameters, macroStabilityInput.StabilityModel); + TransferSoils(damKernelInput.Location.SoilList, macroStabilityInput.StabilityModel.Soils, lastStage.FixedSoilStresses); + lastStage.SoilProfile = new SoilProfile(); lastStage.PreconsolidationStresses = new List(); lastStage.WaterDefinition = WaterDefinition.WaterNet; @@ -162,7 +162,7 @@ }; } - private void TransferSoils(SoilList damSoilList, ICollection kernelSoils) + private void TransferSoils(SoilList damSoilList, ICollection kernelSoils, ICollection kernelFixedSoilStresses) { // Transfer all soils if (damSoilList != null) @@ -172,6 +172,7 @@ Soil kernelSoil = ConversionHelper.ConvertToMacroStabilitySoil(damSoil); kernelSoils.Add(kernelSoil); soilsDictionary.Add(damSoil.Name, kernelSoil); + kernelFixedSoilStresses.Add(new FixedSoilStress{POP = damSoil.PoP, Soil = kernelSoil}); } } } Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForDamProjectData.cs =================================================================== diff -u -r4562 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForDamProjectData.cs (.../FactoryForDamProjectData.cs) (revision 4562) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/Factories/FactoryForDamProjectData.cs (.../FactoryForDamProjectData.cs) (revision 4669) @@ -290,12 +290,8 @@ soil.RRatio = 16 + 0.1 * i; soil.StrengthIncreaseExponent = 17 + 0.1 * i; soil.RatioCuPc = 18 + 0.1 * i; + soil.PoP = 11 + 0.1 * i; - // soil.CuBottom = 11 + 0.1 * i; - // soil.CuTop = 12 + 0.1 * i; - // soil.PoP = 15 + 0.1 * i; - // soil.UsePop = true; - soil.BeddingAngle = 19 + 0.1 * i; soil.DiameterD70 = 20 + 0.1 * i; soil.DiameterD90 = 21 + 0.1 * i; Index: DamEngine/trunk/xsd/DamSoil.xsd =================================================================== diff -u -r4560 -r4669 --- DamEngine/trunk/xsd/DamSoil.xsd (.../DamSoil.xsd) (revision 4560) +++ DamEngine/trunk/xsd/DamSoil.xsd (.../DamSoil.xsd) (revision 4669) @@ -41,5 +41,6 @@ + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs =================================================================== diff -u -r4562 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 4562) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 4669) @@ -493,6 +493,8 @@ inputSoil.StrengthIncreaseExponent = soil.StrengthIncreaseExponent; inputSoil.RatioCuPcSpecified = !double.IsNaN(soil.RatioCuPc); inputSoil.RatioCuPc = soil.RatioCuPc; + inputSoil.PopSpecified = !double.IsNaN(soil.PoP); + inputSoil.Pop = soil.PoP; if (soil.SigmaTauCurve != null) { inputSoil.SigmaTauCurve = new SigmaTauCurveSigmaTauPoint[soil.SigmaTauCurve.Points.Count]; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs =================================================================== diff -u -r4540 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs (.../FillEngineFromMacroStabilityWrapperInput.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/FillEngineFromMacroStabilityWrapperInput.cs (.../FillEngineFromMacroStabilityWrapperInput.cs) (revision 4669) @@ -92,8 +92,8 @@ soilDictionary.Clear(); Location = null; TransferStabilityModel(macroStabilityInput.StabilityModel); - TransferSoils(macroStabilityInput.StabilityModel.Soils); ConstructionStage lastStage = macroStabilityInput.StabilityModel.ConstructionStages.Last(); + TransferSoils(macroStabilityInput.StabilityModel.Soils, lastStage.FixedSoilStresses); TransferSoilProfile2D(lastStage.SoilProfile, lastStage.PreconsolidationStresses); PreConstructionStage lastPreConStage = macroStabilityInput.PreprocessingInput.PreConstructionStages.Last(); TransferSurfaceLine(lastPreConStage.SurfaceLine); @@ -234,7 +234,7 @@ } } - private void TransferSoils(ICollection stabilityModelSoils) + private void TransferSoils(ICollection stabilityModelSoils, ICollection stabilityModelFixedSoilStresses) { SoilList = new SoilList(); foreach (MacroStability.CSharpWrapper.Input.Soil kernelSoil in stabilityModelSoils) @@ -243,6 +243,7 @@ // fill the dictionary to reset the soils for the surfaces in the SoilProfile2D soilDictionary.Add(kernelSoil.Name, damSoil); SoilList.Add(damSoil); + damSoil.PoP = stabilityModelFixedSoilStresses.First(s => s.Soil.Name.Equals(damSoil.Name))!.POP; } } Index: DamEngine/trunk/src/Deltares.DamEngine.Io/DamInput.cs =================================================================== diff -u -r4562 -r4669 --- DamEngine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 4562) +++ DamEngine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 4669) @@ -2303,6 +2303,10 @@ private bool ratioCuPcFieldSpecified; + private double popField; + + private bool popFieldSpecified; + /// [System.Xml.Serialization.XmlArrayItemAttribute("SigmaTauPoint", IsNullable=false)] public SigmaTauCurveSigmaTauPoint[] SigmaTauCurve { @@ -2720,6 +2724,28 @@ this.ratioCuPcFieldSpecified = value; } } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double Pop { + get { + return this.popField; + } + set { + this.popField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PopSpecified { + get { + return this.popFieldSpecified; + } + set { + this.popFieldSpecified = value; + } + } } ///