Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs =================================================================== diff -u -r3205f0f75b990a6816739526352cb793e334e67b -rc40864eb1a9d292ad2b9058fb28e63811be38498 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision 3205f0f75b990a6816739526352cb793e334e67b) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Calculators/UpliftVan/UpliftVanCalculator.cs (.../UpliftVanCalculator.cs) (revision c40864eb1a9d292ad2b9058fb28e63811be38498) @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Deltares.WTIStability.Data.Geo; using Riskeer.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Input; using Riskeer.MacroStabilityInwards.KernelWrapper.Calculators.UpliftVan.Output; using Riskeer.MacroStabilityInwards.KernelWrapper.Creators.Input; @@ -115,16 +114,16 @@ IUpliftVanKernel upliftVanKernel = factory.CreateUpliftVanKernel(); - upliftVanKernel.MoveGrid = input.MoveGrid; - upliftVanKernel.MaximumSliceWidth = input.MaximumSliceWidth; + upliftVanKernel.SetMoveGrid(input.MoveGrid); + upliftVanKernel.SetMaximumSliceWidth(input.MaximumSliceWidth); upliftVanKernel.SetSoilModel(SoilModelCreator.Create(layersWithSoil.Select(lws => lws.Soil).ToArray())); upliftVanKernel.SetSoilProfile(SoilProfileCreator.Create(input.SoilProfile.PreconsolidationStresses, layersWithSoil)); upliftVanKernel.SetLocationExtreme(UpliftVanStabilityLocationCreator.CreateExtreme(input)); - upliftVanKernel.LocationDaily = UpliftVanStabilityLocationCreator.CreateDaily(input); - upliftVanKernel.SurfaceLine = SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection); - upliftVanKernel.SlipPlaneUpliftVan = SlipPlaneUpliftVanCreator.Create(input.SlipPlane); - upliftVanKernel.SlipPlaneConstraints = SlipPlaneConstraintsCreator.Create(input.SlipPlaneConstraints); - upliftVanKernel.GridAutomaticDetermined = input.SlipPlane.GridAutomaticDetermined; + upliftVanKernel.SetLocationDaily(UpliftVanStabilityLocationCreator.CreateDaily(input)); + upliftVanKernel.SetSurfaceLine(SurfaceLineCreator.Create(input.SurfaceLine, input.LandwardDirection)); + upliftVanKernel.SetSlipPlaneUpliftVan(SlipPlaneUpliftVanCreator.Create(input.SlipPlane)); + upliftVanKernel.SetSlipPlaneConstraints(SlipPlaneConstraintsCreator.Create(input.SlipPlaneConstraints)); + upliftVanKernel.SetGridAutomaticDetermined(input.SlipPlane.GridAutomaticDetermined); return upliftVanKernel; } Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/IUpliftVanKernel.cs =================================================================== diff -u -r3205f0f75b990a6816739526352cb793e334e67b -rc40864eb1a9d292ad2b9058fb28e63811be38498 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/IUpliftVanKernel.cs (.../IUpliftVanKernel.cs) (revision 3205f0f75b990a6816739526352cb793e334e67b) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/IUpliftVanKernel.cs (.../IUpliftVanKernel.cs) (revision c40864eb1a9d292ad2b9058fb28e63811be38498) @@ -40,91 +40,91 @@ public interface IUpliftVanKernel { /// - /// Sets the soil model. + /// Gets the factor of stability. /// - void SetSoilModel(SoilModel soilModel); + double FactorOfStability { get; } /// - /// Sets the soil profile. + /// Gets the z value. /// - void SetSoilProfile(SoilProfile2D soilProfile); + double ZValue { get; } /// - /// Sets the location under extreme conditions. + /// Gets the forbidden zones x entry min. /// - void SetLocationExtreme(StabilityLocation stabilityLocation); + double ForbiddenZonesXEntryMin { get; } /// - /// Sets the location under daily circumstances. + /// Gets the forbidden zones x entry max. /// - StabilityLocation LocationDaily { set; } + double ForbiddenZonesXEntryMax { get; } /// - /// Sets the surface line. + /// Gets the sliding curve result. /// - SurfaceLine2 SurfaceLine { set; } + SlidingDualCircle SlidingCurveResult { get; } /// - /// Sets the move grid property. + /// Gets the slip plane result. /// - bool MoveGrid { set; } + SlipPlaneUpliftVan SlipPlaneResult { get; } /// - /// Sets the maximum slice width. - /// [m] + /// Gets the messages returned by the kernel during + /// the calculation. /// - double MaximumSliceWidth { set; } + IEnumerable CalculationMessages { get; } /// - /// Sets the slip plane Uplift Van. + /// Sets the soil model. /// - SlipPlaneUpliftVan SlipPlaneUpliftVan { set; } + void SetSoilModel(SoilModel soilModel); /// - /// Sets the slip plane constraints. + /// Sets the soil profile. /// - SlipPlaneConstraints SlipPlaneConstraints { set; } + void SetSoilProfile(SoilProfile2D soilProfile); /// - /// Sets whether the grid is automatically determined or not. + /// Sets the location under extreme conditions. /// - bool GridAutomaticDetermined { set; } + void SetLocationExtreme(StabilityLocation stabilityLocation); /// - /// Gets the factor of stability. + /// Sets the location under daily circumstances. /// - double FactorOfStability { get; } + void SetLocationDaily(StabilityLocation stabilityLocation); /// - /// Gets the z value. + /// Sets the surface line 2. /// - double ZValue { get; } + void SetSurfaceLine(SurfaceLine2 surfaceLine2); /// - /// Gets the forbidden zones x entry min. + /// Sets the move grid property. /// - double ForbiddenZonesXEntryMin { get; } + void SetMoveGrid(bool moveGrid); /// - /// Gets the forbidden zones x entry max. + /// Sets the maximum slice width. + /// [m] /// - double ForbiddenZonesXEntryMax { get; } + void SetMaximumSliceWidth(double maximumSliceWidth); /// - /// Gets the sliding curve result. + /// Sets the slip plane Uplift Van. /// - SlidingDualCircle SlidingCurveResult { get; } + void SetSlipPlaneUpliftVan(SlipPlaneUpliftVan slipPlaneUpliftVan); /// - /// Gets the slip plane result. + /// Sets the slip plane constraints. /// - SlipPlaneUpliftVan SlipPlaneResult { get; } + void SetSlipPlaneConstraints(SlipPlaneConstraints slipPlaneConstraints); /// - /// Gets the messages returned by the kernel during - /// the calculation. + /// Sets whether the grid is automatically determined or not. /// - IEnumerable CalculationMessages { get; } + void SetGridAutomaticDetermined(bool gridAutomaticDetermined); /// /// Performs the Uplift Van calculation. Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs =================================================================== diff -u -r3205f0f75b990a6816739526352cb793e334e67b -rc40864eb1a9d292ad2b9058fb28e63811be38498 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision 3205f0f75b990a6816739526352cb793e334e67b) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.KernelWrapper/Kernels/UpliftVan/UpliftVanKernelWrapper.cs (.../UpliftVanKernelWrapper.cs) (revision c40864eb1a9d292ad2b9058fb28e63811be38498) @@ -147,6 +147,41 @@ stabilityModel.Location = stabilityLocation; } + public void SetLocationDaily(StabilityLocation stabilityLocation) + { + LocationDaily = stabilityLocation; + } + + public void SetSurfaceLine(SurfaceLine2 surfaceLine2) + { + SurfaceLine = surfaceLine2; + } + + public void SetMoveGrid(bool moveGrid) + { + MoveGrid = moveGrid; + } + + public void SetMaximumSliceWidth(double maximumSliceWidth) + { + MaximumSliceWidth = maximumSliceWidth; + } + + public void SetSlipPlaneUpliftVan(SlipPlaneUpliftVan slipPlaneUpliftVan) + { + SlipPlaneUpliftVan = slipPlaneUpliftVan; + } + + public void SetSlipPlaneConstraints(SlipPlaneConstraints slipPlaneConstraints) + { + SlipPlaneConstraints = slipPlaneConstraints; + } + + public void SetGridAutomaticDetermined(bool gridAutomaticDetermined) + { + GridAutomaticDetermined = gridAutomaticDetermined; + } + public void SetSoilModel(SoilModel soilModel) { stabilityModel.SoilModel = soilModel; Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/UpliftVanKernelStub.cs =================================================================== diff -u -r3205f0f75b990a6816739526352cb793e334e67b -rc40864eb1a9d292ad2b9058fb28e63811be38498 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/UpliftVanKernelStub.cs (.../UpliftVanKernelStub.cs) (revision 3205f0f75b990a6816739526352cb793e334e67b) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.KernelWrapper.TestUtil/Kernels/UpliftVan/UpliftVanKernelStub.cs (.../UpliftVanKernelStub.cs) (revision c40864eb1a9d292ad2b9058fb28e63811be38498) @@ -65,39 +65,24 @@ public SoilModel SoilModel { get; private set; } - public void SetSoilModel(SoilModel soilModel) - { - SoilModel = soilModel; - } - public SoilProfile2D SoilProfile { get; private set; } - public void SetSoilProfile(SoilProfile2D soilProfile) - { - SoilProfile = soilProfile; - } - public StabilityLocation LocationExtreme { get; private set; } - public void SetLocationExtreme(StabilityLocation stabilityLocation) - { - LocationExtreme = stabilityLocation; - } + public StabilityLocation LocationDaily { get; private set; } - public StabilityLocation LocationDaily { get; set; } + public bool MoveGrid { get; private set; } - public bool MoveGrid { get; set; } + public double MaximumSliceWidth { get; private set; } - public double MaximumSliceWidth { get; set; } + public SurfaceLine2 SurfaceLine { get; private set; } - public SurfaceLine2 SurfaceLine { get; set; } + public SlipPlaneUpliftVan SlipPlaneUpliftVan { get; private set; } - public SlipPlaneUpliftVan SlipPlaneUpliftVan { get; set; } + public SlipPlaneConstraints SlipPlaneConstraints { get; private set; } - public SlipPlaneConstraints SlipPlaneConstraints { get; set; } + public bool GridAutomaticDetermined { get; private set; } - public bool GridAutomaticDetermined { get; set; } - public double FactorOfStability { get; set; } public double ZValue { get; set; } @@ -112,6 +97,56 @@ public IEnumerable CalculationMessages { get; set; } + public void SetSoilModel(SoilModel soilModel) + { + SoilModel = soilModel; + } + + public void SetSoilProfile(SoilProfile2D soilProfile) + { + SoilProfile = soilProfile; + } + + public void SetLocationExtreme(StabilityLocation stabilityLocation) + { + LocationExtreme = stabilityLocation; + } + + public void SetLocationDaily(StabilityLocation stabilityLocation) + { + LocationDaily = stabilityLocation; + } + + public void SetSurfaceLine(SurfaceLine2 surfaceLine2) + { + SurfaceLine = surfaceLine2; + } + + public void SetMoveGrid(bool moveGrid) + { + MoveGrid = moveGrid; + } + + public void SetMaximumSliceWidth(double maximumSliceWidth) + { + MaximumSliceWidth = maximumSliceWidth; + } + + public void SetSlipPlaneUpliftVan(SlipPlaneUpliftVan slipPlaneUpliftVan) + { + SlipPlaneUpliftVan = slipPlaneUpliftVan; + } + + public void SetSlipPlaneConstraints(SlipPlaneConstraints slipPlaneConstraints) + { + SlipPlaneConstraints = slipPlaneConstraints; + } + + public void SetGridAutomaticDetermined(bool gridAutomaticDetermined) + { + GridAutomaticDetermined = gridAutomaticDetermined; + } + public void Calculate() { if (ThrowExceptionOnCalculate)