Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs =================================================================== diff -u -r6b0fe5306b9e221741af32f8a11d0ca5e5f787ae -r7826132aeaba0125f53c3ab823bbf90396084ce9 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision 6b0fe5306b9e221741af32f8a11d0ca5e5f787ae) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision 7826132aeaba0125f53c3ab823bbf90396084ce9) @@ -29,9 +29,8 @@ using Deltares.MacroStability.Preprocessing; using Deltares.MacroStability.Standard; using Deltares.MacroStability.WaternetCreator; +using Deltares.SoilStress.Data; using Deltares.WTIStability.Calculation.Wrapper; -using Riskeer.MacroStabilityInwards.KernelWrapper.Calculators.Input; -using WaternetCreationMode = Deltares.MacroStability.WaternetCreator.WaternetCreationMode; using WtiStabilityWaternet = Deltares.MacroStability.Geometry.Waternet; namespace Riskeer.MacroStabilityInwards.KernelWrapper.Kernels.UpliftVan @@ -58,12 +57,12 @@ ModelOption = ModelOptions.UpliftVan, ConstructionStages = { - new ConstructionStage(), - new ConstructionStage() + AddConstructionStage(), + AddConstructionStage() } } }; - + AddPreProcessingConstructionStages(); AddPreProcessingConstructionStages(); @@ -197,6 +196,21 @@ } } + private static ConstructionStage AddConstructionStage() + { + return new ConstructionStage + { + MultiplicationFactorsCPhiForUpliftList = + { + new MultiplicationFactorOnCPhiForUplift + { + MultiplicationFactor = 0.0, + UpliftFactor = 1.2 + } + } + }; + } + private void AddPreProcessingConstructionStages() { kernelModel.PreprocessingModel.PreProcessingConstructionStages.Add(new PreprocessingConstructionStage Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs =================================================================== diff -u -r51f639249e006f33e6a92f29437b809f9ecc1aba -r7826132aeaba0125f53c3ab823bbf90396084ce9 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision 51f639249e006f33e6a92f29437b809f9ecc1aba) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.Test/Kernels/UpliftVan/UpliftVanKernelWrapperTest.cs (.../UpliftVanKernelWrapperTest.cs) (revision 7826132aeaba0125f53c3ab823bbf90396084ce9) @@ -72,6 +72,10 @@ { new FixedSoilStress() }; + var preConsolidationStresses = new[] + { + new PreConsolidationStress() + }; // Call var kernel = new UpliftVanKernelWrapper(); @@ -84,6 +88,7 @@ kernel.SetWaternetDaily(waternetDaily); kernel.SetWaternetExtreme(waternetExtreme); kernel.SetFixedSoilStresses(fixedSoilStresses); + kernel.SetPreConsolidationStresses(preConsolidationStresses); // Assert var kernelModel = TypeUtils.GetField(kernel, "kernelModel"); @@ -105,10 +110,7 @@ Assert.AreSame(waternetDaily, stabilityModel.ConstructionStages.First().GeotechnicsData.CurrentWaternet); Assert.AreSame(waternetExtreme, stabilityModel.ConstructionStages.Last().GeotechnicsData.CurrentWaternet); - foreach (ConstructionStage constructionStage in stabilityModel.ConstructionStages) - { - CollectionAssert.AreEqual(fixedSoilStresses, constructionStage.SoilStresses); - } + AssertConstructionStages(stabilityModel.ConstructionStages, fixedSoilStresses, preConsolidationStresses); Assert.AreEqual(2, kernelModel.PreprocessingModel.PreProcessingConstructionStages.Count); kernelModel.PreprocessingModel.PreProcessingConstructionStages.ForEachElementDo( @@ -230,6 +232,18 @@ Assert.AreEqual(12, validationMessages.Count()); } + private static void AssertConstructionStages(IList constructionStages, FixedSoilStress[] fixedSoilStresses, PreConsolidationStress[] preConsolidationStresses) + { + foreach (ConstructionStage constructionStage in constructionStages) + { + Assert.AreEqual(1, constructionStage.MultiplicationFactorsCPhiForUpliftList.Count); + Assert.AreEqual(1.2, constructionStage.MultiplicationFactorsCPhiForUpliftList[0].UpliftFactor); + Assert.AreEqual(0.0, constructionStage.MultiplicationFactorsCPhiForUpliftList[0].MultiplicationFactor); + CollectionAssert.AreEqual(fixedSoilStresses, constructionStage.SoilStresses); + CollectionAssert.AreEqual(preConsolidationStresses, constructionStage.PreconsolidationStresses); + } + } + private static UpliftVanKernelWrapper CreateValidKernel(Soil soil) { var point1 = new Point2D(-50, -50);