Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r3523 -r3615 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3523) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 3615) @@ -37,7 +37,6 @@ using Deltares.DamEngine.Data.Standard.Calculation; using Deltares.MacroStability.CSharpWrapper; using Deltares.MacroStability.CSharpWrapper.Output; -using Deltares.Geo.Common.Standard; using Deltares.StixFileWriter; using CharacteristicPointType = Deltares.DamEngine.Data.Geotechnics.CharacteristicPointType; using GeometryPoint = Deltares.DamEngine.Data.Geometry.GeometryPoint; @@ -55,10 +54,10 @@ private int lastIterationIndex; /// - /// Gets or sets the failure mechanisme paramaters for mstab. + /// Gets or sets the failure mechanism parameters for MStab. /// /// - /// The failure mechanisme paramaters mstab. + /// The failure mechanism parameters MStab. /// public FailureMechanismParametersMStab FailureMechanismParametersMStab { get; set; } @@ -136,13 +135,13 @@ { TrafficLoad = trafficLoad, UpliftVanCalculationGrid = upliftVanCalculationGrid - }; macroStabilityInput.Input = fillMacroStabilityWrapperFromEngine.CreateMacroStabilityInput(damKernelInput, FailureMechanismParametersMStab, waterNet); fileNameForCalculation = GetStabilityInputFileName(damKernelInput, iterationIndex, FailureMechanismParametersMStab.MStabParameters.Model); return PrepareKernel(macroStabilityInput.Input); } + return PrepareResult.NotRelevant; } catch @@ -220,7 +219,7 @@ messages = new List(); try { - var result = new MacroStability.CSharpWrapper.Validator(macroStabilityKernelDataInput.Input).Validate(); + var result = new Validator(macroStabilityKernelDataInput.Input).Validate(); if (result.IsValid) { return 0; @@ -323,10 +322,12 @@ macroStabilityOutputItem.CalculationPath = Path.GetDirectoryName(fileNameForCalculation); macroStabilityOutputItem.ProjectName = Path.GetFileName(fileNameForCalculation); var fileNameForCalculationAsStix = Path.ChangeExtension(fileNameForCalculation, ".stix"); - StixWriter.FillInfo("DAM Engine", macroStabilityOutputItem.CalculationPath, macroStabilityOutputItem.ProjectName, true); + StixWriter.FillInfo("DAM Engine", macroStabilityOutputItem.CalculationPath, + macroStabilityOutputItem.ProjectName, true); StixWriter.FillCalculatedDualCircle(macroStabilityOutputItem.ActiveCenterPoint.X, macroStabilityOutputItem.ActiveCenterPoint.Z, - macroStabilityOutputItem.ActiveCenterPointRadius, macroStabilityOutputItem.PassiveCenterPoint.X, + macroStabilityOutputItem.ActiveCenterPointRadius, + macroStabilityOutputItem.PassiveCenterPoint.X, macroStabilityOutputItem.PassiveCenterPoint.Z); if (File.Exists(fileNameForCalculationAsStix)) { @@ -431,7 +432,7 @@ /// /// The dam macro stability output. /// - public static void ThrowWhenMacroStabilityKernelOutputNull(MacroStabilityOutput macroStabilityOutput) + private static void ThrowWhenMacroStabilityKernelOutputNull(MacroStabilityOutput macroStabilityOutput) { if (macroStabilityOutput == null) { @@ -444,7 +445,7 @@ /// /// The dam kernel input. /// - public static void ThrowWhenMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) + private static void ThrowWhenMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) { if (damKernelInput == null) { @@ -478,7 +479,7 @@ /// The design advise. /// The evaluation message. /// - /// if the design was succesful + /// if the design was successful /// /// public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, @@ -496,7 +497,7 @@ double fosAchieved = macroStabilityOutput.StabilityOutputItems[0].SafetyFactor; double exitPointXCoordinate = macroStabilityOutput.StabilityOutputItems[0].CircleSurfacePointRightXCoordinate; GeometryPoint limitPointForShoulderDesign = damKernelInput.Location.SurfaceLine.GetLimitPointForShoulderDesign(); - evaluationMessage = String.Format(Resources.FactorAchievedVsFactorRequired, fosAchieved, fosRequired); + evaluationMessage = string.Format(Resources.FactorAchievedVsFactorRequired, fosAchieved, fosRequired); if (exitPointXCoordinate > limitPointForShoulderDesign.X) { designAdvise = DesignAdvise.ShoulderInwards; @@ -533,11 +534,7 @@ lastIterationIndex = iterationIndex; var location = damKernelInput.Location; - //ToDo MWDAM-1356: Not clear yet what parts are required for input. subSoilScenario, riverLevel and others might be necessary for CreateXmlInput - //MStabModelType model = MStabModelType.UpliftVan; - //var subSoilScenario = damKernelInput.SubSoilScenario; - //double riverLevel = damKernelInput.RiverLevelHigh; - + if (iterationIndex < 1) { // This is the first (initial) call to prepareDesign. @@ -546,7 +543,6 @@ { EmbankmentMaterialname = location.DikeEmbankmentMaterial, }; - //ToDo MWDAM-? Use FailureMechanismParametersMStab or create new one? FailureMechanismParametersMStab.EmbankmentDesignParameters = embankmentDesignParameters; } else @@ -564,12 +560,8 @@ // In the following prepareDesign calls just return the stored embankmentDesignParameters embankmentDesignParameters = FailureMechanismParametersMStab.EmbankmentDesignParameters; } - // var xmlInput = CreateXmlInput(macroStabilityKernelDataInput, embankmentDesignParametersForKernelInput); - // var prepareResult = PrepareKernel(xmlInput); - // if (prepareResult != PrepareResult.Successful) - { - throw new MacroStabilityException(Resources.MacroStabilityKernelWrapper_PrepareForMacroStabilityDidNotSucceed); - } + + throw new MacroStabilityException(Resources.MacroStabilityKernelWrapper_PrepareForMacroStabilityDidNotSucceed); } /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r3612 -r3615 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3612) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 3615) @@ -86,7 +86,7 @@ Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); } - [Test, ] + [Test] public void TestValidate() { var kernelWrapper = new MacroStabilityInwardsKernelWrapper();