Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1952 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapper.cs (.../DamWbiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapper.cs) (revision 1952) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapper.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs) (revision 1955) @@ -11,16 +11,16 @@ using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.Results; using Deltares.DamEngine.Data.Geometry; +using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Data.Standard.Calculation; using Deltares.DamEngine.Data.Standard.Logging; -using Deltares.DamEngine.Data.Geotechnics; using Deltares.WTIStability.Calculation.Wrapper; -namespace Deltares.DamEngine.Calculators.KernelWrappers.DamWbiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards { - public class DamWbiMacroStabilityInwardsKernelWrapper : IKernelWrapper + public class WtiMacroStabilityInwardsKernelWrapper : IKernelWrapper { - private WTIStabilityCalculation wbiMacroStabilityCalculator = null; + private WTIStabilityCalculation wtiMacroStabilityCalculator = null; private int lastIterationIndex = 0; /// @@ -29,7 +29,7 @@ /// /// The failure mechanisme paramaters mstab. /// - public FailureMechanismParametersMStab FailureMechanismParametersMStab { get; set; } //ToDo MWDAM-? Use same as for DGeoStability or create new one for WBI? + public FailureMechanismParametersMStab FailureMechanismParametersMStab { get; set; } //ToDo MWDAM-? Use same as for DGeoStability or create new one for WTI? public bool tmpPresumePrepareSucceeds; //ToDo MWDAM-1356 public bool tmpPresumeInputValid; //ToDo MWDAM-1367 @@ -47,9 +47,9 @@ /// public PrepareResult Prepare(DamKernelInput damKernelInput, int iterationIndex, out IKernelDataInput kernelDataInput, out IKernelDataOutput kernelDataOutput) { - var macroStabilityInput = new DamWbiMacroStabilityInput(); + var macroStabilityInput = new WtiMacroStabilityInput(); kernelDataInput = macroStabilityInput; - var macroStabilityOutput = new DamWbiMacroStabilityOutput + var macroStabilityOutput = new WtiMacroStabilityOutput { CalculationResult = CalculationResult.NoRun }; @@ -80,11 +80,11 @@ private PrepareResult PrepareKernel(string xmlInput) { - ThrowWhenWbiMacroStabilityCalculatorNull(wbiMacroStabilityCalculator); + ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); try { // ToDo MWDAM-1356: Not clear yet what parts are required for input. Temporary test code added. - //wbiMacroStabilityCalculator.InitializeForDeterministic(xmlInput); //ToDo: uncomment when input is set + //wtiMacroStabilityCalculator.InitializeForDeterministic(xmlInput); //ToDo: uncomment when input is set //return PrepareResult.Successful; //ToDo: uncomment when input is set if (tmpPresumePrepareSucceeds) //ToDo: remove the temporary test code when input is set { @@ -102,7 +102,7 @@ } } - private string CreateXmlInput(DamWbiMacroStabilityInput macroStabilityInput, EmbankmentDesignParameters embankmentDesignParameters) + private string CreateXmlInput(WtiMacroStabilityInput macroStabilityInput, EmbankmentDesignParameters embankmentDesignParameters) { string xmlInput = ""; //ToDo in MWDAM-1356 @@ -120,10 +120,10 @@ /// public int Validate(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages) { - ThrowWhenWbiMacroStabilityCalculatorNull(wbiMacroStabilityCalculator); - string kernelMessage = wbiMacroStabilityCalculator.Validate(); + ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); + string kernelMessage = wtiMacroStabilityCalculator.Validate(); ParseValidationResult(kernelMessage, out messages); - DamWbiMacroStabilityOutput macroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; var numberOfErrors = messages.Count(mt => mt.MessageType == LogMessageType.Error); if (numberOfErrors > 0) { @@ -166,27 +166,27 @@ /// The return messages. public void Execute(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages) { - DamWbiMacroStabilityInput macroStabilityInput = (DamWbiMacroStabilityInput)kernelDataInput; - DamWbiMacroStabilityOutput macroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; - ThrowWhenWbiMacroStabilityKernelInputNull(macroStabilityInput); - ThrowWhenWbiMacroStabilityKernelOutputNull(macroStabilityOutput); + WtiMacroStabilityInput macroStabilityInput = (WtiMacroStabilityInput)kernelDataInput; + WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; + ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); + ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); messages = new List(); - PerformWbiStabilityCalculation(out messages, macroStabilityOutput, macroStabilityInput); + PerformWtiStabilityCalculation(out messages, macroStabilityOutput, macroStabilityInput); } - private void PerformWbiStabilityCalculation(out List messages, DamWbiMacroStabilityOutput macroStabilityOutput, - DamWbiMacroStabilityInput macroStabilityInput) + private void PerformWtiStabilityCalculation(out List messages, WtiMacroStabilityOutput macroStabilityOutput, + WtiMacroStabilityInput macroStabilityInput) { - ThrowWhenWbiMacroStabilityCalculatorNull(wbiMacroStabilityCalculator); + ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); macroStabilityOutput.CalculationResult = CalculationResult.NoRun; messages = new List(); - macroStabilityOutput.StabilityOutputItems = new List(); + macroStabilityOutput.StabilityOutputItems = new List(); //this must be code when prepare is done // try // { -// string kernelMessage = wbiMacroStabilityCalculator.Run(); +// string kernelMessage = wtiMacroStabilityCalculator.Run(); // ParseRunResult(kernelMessage, macroStabilityOutput, messages); // macroStabilityOutput.CalculationResult = CalculationResult.Succeeded; // } @@ -215,22 +215,22 @@ } - private void ParseRunResult(string xmlRunResult, DamWbiMacroStabilityOutput macroStabilityOutput, List messages) + private void ParseRunResult(string xmlRunResult, WtiMacroStabilityOutput macroStabilityOutput, List messages) { // ToDo MWDAM-1357: Parse the xml from the kernel, fill results and add message with type Error, Info or Warning - var macroStabilityOutputItem = new DamWbiMacroStabilityOutputItem(); + var macroStabilityOutputItem = new WtiMacroStabilityOutputItem(); // start of temporary test code macroStabilityOutputItem.SafetyFactor = 1.357; // end of temporary test code macroStabilityOutput.StabilityOutputItems.Add(macroStabilityOutputItem); } /// - /// Creates the calculator for Wbi stability based on kernel input. + /// Creates the calculator for WTI stability based on kernel input. /// - public void CreateWbiStabilityCalculator() + public void CreateWtiStabilityCalculator() { - wbiMacroStabilityCalculator = new WTIStabilityCalculation(); + wtiMacroStabilityCalculator = new WTIStabilityCalculation(); } /// @@ -245,9 +245,9 @@ public void PostProcess(DamKernelInput damKernelInput, IKernelDataOutput kernelDataOutput, DesignScenario designScenario, string resultMessage, out List designResults) { - ThrowWhenWbiMacroStabilityDamKernelInputNull(damKernelInput); - DamWbiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as DamWbiMacroStabilityOutput; - ThrowWhenWbiMacroStabilityKernelOutputNull(macroStabilityOutput); + ThrowWhenWtiMacroStabilityDamKernelInputNull(damKernelInput); + WtiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as WtiMacroStabilityOutput; + ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); designResults = new List(); if (macroStabilityOutput.StabilityOutputItems.Count > 0) { @@ -264,7 +264,7 @@ } private DesignResult NewDesignResult(DamKernelInput damKernelInput, DesignScenario designScenario, - DamWbiMacroStabilityOutputItem macroStabilityOutputItem) + WtiMacroStabilityOutputItem macroStabilityOutputItem) { string soilProfile2DName = damKernelInput.SubSoilScenario.ToString(); var designResult = new DesignResult(damKernelInput.DamFailureMechanismeCalculationSpecification, @@ -281,7 +281,7 @@ return designResult; } - private static void FillDesignResult(DamWbiMacroStabilityOutputItem macroStabilityOutputItem, DesignResult designResult) + private static void FillDesignResult(WtiMacroStabilityOutputItem macroStabilityOutputItem, DesignResult designResult) { designResult.CalculationResult = macroStabilityOutputItem.CalculationResult; designResult.StabilityDesignResults.StabilityModelType = macroStabilityOutputItem.StabilityModelType; @@ -292,49 +292,54 @@ } /// - /// Throws the when wbi macro stability kernel input is not assigned. + /// Throws the when WTI macro stability kernel input is not assigned. /// - /// The dam wbi macro stability input. + /// The dam WTI macro stability input. /// - public static void ThrowWhenWbiMacroStabilityKernelInputNull(DamWbiMacroStabilityInput damWbiMacroStabilityInput) + public static void ThrowWhenWtiMacroStabilityKernelInputNull(WtiMacroStabilityInput wtiMacroStabilityInput) { - if (damWbiMacroStabilityInput == null) + if (wtiMacroStabilityInput == null) { - throw new NoNullAllowedException(Resources.DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityInputObjectDefined); + throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityInputObjectDefined); } } /// - /// Throws the when wbi macro stability kernel output is not assigned. + /// Throws the when WTI macro stability kernel output is not assigned. /// - /// The dam wbi macro stability output. + /// The dam WTI macro stability output. /// - public static void ThrowWhenWbiMacroStabilityKernelOutputNull(DamWbiMacroStabilityOutput damWbiMacroStabilityOutput) + public static void ThrowWhenWtiMacroStabilityKernelOutputNull(WtiMacroStabilityOutput wtiMacroStabilityOutput) { - if (damWbiMacroStabilityOutput == null) + if (wtiMacroStabilityOutput == null) { - throw new NoNullAllowedException(Resources.DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityOutputObjectDefined); + throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityOutputObjectDefined); } } /// - /// Throws the when wbi macro stability dam kernel input is not assigned. + /// Throws the when WTI macro stability dam kernel input is not assigned. /// /// The dam kernel input. /// - public static void ThrowWhenWbiMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) + public static void ThrowWhenWtiMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) { if (damKernelInput == null) { - throw new NoNullAllowedException(Resources.DamWbiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWbiMacroStability); + throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWtiMacroStability); } } - public static void ThrowWhenWbiMacroStabilityCalculatorNull(WTIStabilityCalculation wbiMacroStabilityCalculator) + /// + /// Throws the when WTI macro stability calculator is not assigned. + /// + /// The WTI macro stability calculator. + /// + public static void ThrowWhenWtiMacroStabilityCalculatorNull(WTIStabilityCalculation wtiMacroStabilityCalculator) { - if (wbiMacroStabilityCalculator == null) + if (wtiMacroStabilityCalculator == null) { - throw new NoNullAllowedException(Resources.DamWbiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWbiMacroStability); + throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWtiMacroStability); } } @@ -370,11 +375,11 @@ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out DesignAdvise designAdvise, out string evaluationMessage) { - DamWbiMacroStabilityInput macroStabilityInput = kernelDataInput as DamWbiMacroStabilityInput; - DamWbiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as DamWbiMacroStabilityOutput; - ThrowWhenWbiMacroStabilityKernelInputNull(macroStabilityInput); - ThrowWhenWbiMacroStabilityKernelOutputNull(macroStabilityOutput); - ThrowWhenWbiMacroStabilityDamKernelInputNull(damKernelInput); + WtiMacroStabilityInput macroStabilityInput = kernelDataInput as WtiMacroStabilityInput; + WtiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as WtiMacroStabilityOutput; + ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); + ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); + ThrowWhenWtiMacroStabilityDamKernelInputNull(damKernelInput); double fosRequired = damKernelInput.Location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value; double fosAchieved = macroStabilityOutput.StabilityOutputItems[0].SafetyFactor; @@ -410,8 +415,8 @@ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters) { - DamWbiMacroStabilityInput macroStabilityInput = kernelDataInput as DamWbiMacroStabilityInput; - ThrowWhenWbiMacroStabilityKernelInputNull(macroStabilityInput); + WtiMacroStabilityInput macroStabilityInput = kernelDataInput as WtiMacroStabilityInput; + ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); lastIterationIndex = iterationIndex; var location = damKernelInput.Location; @@ -428,7 +433,7 @@ { EmbankmentMaterialname = location.DikeEmbankmentMaterial, }; - //ToDo MWDAM-? Use FailureMechanismParametersMStab or create new one for WBI? + //ToDo MWDAM-? Use FailureMechanismParametersMStab or create new one for WTI? FailureMechanismParametersMStab.EmbankmentDesignParameters = embankmentDesignParameters; embankmentDesignParametersForKernelInput = null; } @@ -452,7 +457,7 @@ var prepareResult = PrepareKernel(xmlInput); if (prepareResult != PrepareResult.Successful) { - throw new MacroStabilityException(Resources.DamWbiMacroStabilityKernelWrapper_PrepareForWbiMacroStabilityDidNotSucceed); + throw new MacroStabilityException(Resources.WtiMacroStabilityKernelWrapper_PrepareForWtiMacroStabilityDidNotSucceed); } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r1901 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1901) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1955) @@ -75,10 +75,10 @@ - - - - + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutputItem.cs =================================================================== diff -u -r1914 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutputItem.cs (.../DamWbiMacroStabilityInwards/DamWbiMacroStabilityOutputItem.cs) (revision 1914) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutputItem.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityOutputItem.cs) (revision 1955) @@ -1,9 +1,9 @@ using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard.Calculation; -namespace Deltares.DamEngine.Calculators.KernelWrappers.DamWbiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards { - public class DamWbiMacroStabilityOutputItem + public class WtiMacroStabilityOutputItem { /// /// Gets or sets the calculation result. Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r1949 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapperTests.cs (.../DamWbiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapperTests.cs) (revision 1949) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapperTests.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs) (revision 1955) @@ -3,31 +3,29 @@ using System.IO; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; -using Deltares.DamEngine.Calculators.KernelWrappers.DamWbiMacroStabilityInwards; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; +using Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards; using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.General.Results; -using Deltares.DamEngine.Data.Geometry; -using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Data.Standard.Calculation; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.DamEngine.TestHelpers.Factories; using NUnit.Framework; -namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamWbiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.WtiMacroStabilityInwards { [TestFixture] - public class DamWbiMacroStabilityInwardsKernelWrapperTests + public class WtiMacroStabilityInwardsKernelWrapperTests { - private const string TestFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\KernelWrappers\DamWbiMacroStabilityInwards\TestFiles"; + private const string TestFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\KernelWrappers\WtiMacroStabilityInwards\TestFiles"; [Test] public void TestPrepare() { - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWbiStabilityCalculator(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateWtiStabilityCalculator(); kernelWrapper.FailureMechanismParametersMStab = new FailureMechanismParametersMStab(); IKernelDataInput kernelDataInput; @@ -38,7 +36,7 @@ kernelInput.Location.ModelFactors.UpliftCriterionStability = 0.8; var prepareResult = kernelWrapper.Prepare(kernelInput, 0, out kernelDataInput, out kernelDataOutput); Assert.AreEqual(PrepareResult.NotRelevant, prepareResult); - DamWbiMacroStabilityOutput damMacroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + WtiMacroStabilityOutput damMacroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(false, damMacroStabilityOutput.UpliftSituation.IsUplift); @@ -48,7 +46,7 @@ kernelWrapper.tmpPresumePrepareSucceeds = true; //ToDo replace by input that makes prepare succeed prepareResult = kernelWrapper.Prepare(kernelInput, 0, out kernelDataInput, out kernelDataOutput); Assert.AreEqual(PrepareResult.Successful, prepareResult); - damMacroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + damMacroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(true, damMacroStabilityOutput.UpliftSituation.IsUplift); @@ -58,29 +56,29 @@ kernelWrapper.tmpPresumePrepareSucceeds = false; //ToDo replace by input that makes prepare fail prepareResult = kernelWrapper.Prepare(kernelInput, 0, out kernelDataInput, out kernelDataOutput); Assert.AreEqual(PrepareResult.Failed, prepareResult); - damMacroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + damMacroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(true, damMacroStabilityOutput.UpliftSituation.IsUplift); } [Test] public void TestValidate() { - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWbiStabilityCalculator(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateWtiStabilityCalculator(); // Validate without setting values. Expected error messages. - var macroStabilityInput1 = new DamWbiMacroStabilityInput(); - var macroStabilityOutput1 = new DamWbiMacroStabilityOutput(); + var macroStabilityInput1 = new WtiMacroStabilityInput(); + var macroStabilityOutput1 = new WtiMacroStabilityOutput(); macroStabilityOutput1.CalculationResult = CalculationResult.NoRun; List messages; var errorCount = kernelWrapper.Validate(macroStabilityInput1, macroStabilityOutput1, out messages); Assert.IsTrue(errorCount > 0); Assert.AreEqual(CalculationResult.InvalidInputData, macroStabilityOutput1.CalculationResult); // Validate the input when valid input is provided. Expected no messages. - var macroStabilityInput2 = new DamWbiMacroStabilityInput(); - var macroStabilityOutput2 = new DamWbiMacroStabilityOutput(); + var macroStabilityInput2 = new WtiMacroStabilityInput(); + var macroStabilityOutput2 = new WtiMacroStabilityOutput(); macroStabilityOutput2.CalculationResult = CalculationResult.NoRun; messages.Clear(); // ToDo MWDAM-1367: Not clear yet what input must be provided to make Validate succeed. Temporary test code added. @@ -96,7 +94,7 @@ public void ParseValidationResultOk() { List messages; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); var xmlFileName = Path.Combine(TestFolder, "ValidateOk.xml"); string xmlValidationResult = File.ReadAllText(xmlFileName); // start of temporary test code @@ -112,7 +110,7 @@ public void ParseValidationResultError() { List messages; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); var xmlFileName = Path.Combine(TestFolder, "ValidateError.xml"); string xmlValidationResult = File.ReadAllText(xmlFileName); // start of temporary test code @@ -129,20 +127,20 @@ public void TestPostProcess() { const double diff = 0.0001; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); var kernelInput = CreateDamKernelInputForTest(); - DamWbiMacroStabilityOutput macroStabilityOutput = new DamWbiMacroStabilityOutput(); + WtiMacroStabilityOutput macroStabilityOutput = new WtiMacroStabilityOutput(); DesignScenario designScenario = new DesignScenario { Location = kernelInput.Location }; List results; macroStabilityOutput.CalculationResult = CalculationResult.Succeeded; - var macroStabilityOutputItem = new DamWbiMacroStabilityOutputItem(); + var macroStabilityOutputItem = new WtiMacroStabilityOutputItem(); macroStabilityOutputItem.CalculationResult = CalculationResult.Succeeded; macroStabilityOutput.UpliftSituation = new UpliftSituation { IsUplift = true }; macroStabilityOutputItem.SafetyFactor = 2.34; - macroStabilityOutput.StabilityOutputItems = new List(); + macroStabilityOutput.StabilityOutputItems = new List(); macroStabilityOutput.StabilityOutputItems.Add(macroStabilityOutputItem); kernelWrapper.PostProcess(kernelInput, macroStabilityOutput, designScenario, "", out results); Assert.IsTrue(results.Count > 0); @@ -160,18 +158,18 @@ [Test] public void TestFullCalculationFails() { - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWbiStabilityCalculator(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateWtiStabilityCalculator(); - IKernelDataInput kernelDataInput = new DamWbiMacroStabilityInput(); - IKernelDataOutput kernelDataOutput = new DamWbiMacroStabilityOutput(); + IKernelDataInput kernelDataInput = new WtiMacroStabilityInput(); + IKernelDataOutput kernelDataOutput = new WtiMacroStabilityOutput(); // Run the dll List messages; - DamWbiMacroStabilityInput macroStabilityInput = (DamWbiMacroStabilityInput)kernelDataInput; + WtiMacroStabilityInput macroStabilityInput = (WtiMacroStabilityInput)kernelDataInput; kernelWrapper.tmpPresumeRunSucceeds = false; //ToDo replace by input that makes Execute fail kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out messages); // ToDo MWDAM-1357: Parse the xml output from the kernel must be done - DamWbiMacroStabilityOutput macroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; Assert.IsTrue(messages.Count > 0); // ToDo MWDAM-1357: the kernel has no input data, therefore it will fail. Test is better when it has input data but fails for another reason Assert.AreEqual(CalculationResult.UnexpectedError, macroStabilityOutput.CalculationResult); @@ -182,8 +180,8 @@ { const double diff = 0.0001; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWbiStabilityCalculator(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateWtiStabilityCalculator(); kernelWrapper.FailureMechanismParametersMStab = new FailureMechanismParametersMStab(); // Prepare the wrapper. Result is input for the calculation dll @@ -203,7 +201,7 @@ // Run the dll kernelWrapper.tmpPresumeRunSucceeds = true; //ToDo replace by input that makes Execute succeed kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out messages); - DamWbiMacroStabilityOutput macroStabilityOutput = (DamWbiMacroStabilityOutput)kernelDataOutput; + WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; // ToDo MWDAM-1356: Input must be set first in Prepare // ToDo MWDAM-1357 Parse the xml output from the kernel must be done @@ -231,52 +229,52 @@ } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen invoer object gedefinieerd voor WBI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen invoer object gedefinieerd voor WTI Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestLanguageNLThrowsExceptionWhenInputIsNull() { List messages; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); kernelWrapper.Execute(null, null, out messages); ; } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "No input object defined for WBI Macro Stability")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "No input object defined for WTI Macro Stability")] [SetUICulture("en-US")] - public void TestLanguageENThrowsExceptionWhenWbiStabilityInputIsNull() + public void TestLanguageENThrowsExceptionWhenWtiStabilityInputIsNull() { List messages; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); kernelWrapper.Execute(null, null, out messages); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen uitvoer object gedefinieerd voor WBI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen uitvoer object gedefinieerd voor WTI Macrostabiliteit")] [SetUICulture("nl-NL")] - public void TestThrowsExceptionWhenWbiStabilityOutputIsNull() + public void TestThrowsExceptionWhenWtiStabilityOutputIsNull() { - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); List results; kernelWrapper.PostProcess(new DamKernelInput(), null, null, "", out results); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen Dam invoer object gedefinieerd voor WBI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen Dam invoer object gedefinieerd voor WTI Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestThrowsExceptionWhenDamKernelInputIsNull() { - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); List results; kernelWrapper.PostProcess(null, null, null, "", out results); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen reken object gedefinieerd voor WBI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen reken object gedefinieerd voor WTI Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestThrowsExceptionWhenDamKernelIsNull() { List messages; - var kernelWrapper = new DamWbiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); IKernelDataInput kernelDataInput = new DamMacroStabilityInput(); IKernelDataOutput kernelDataOutput = new DamMacroStabilityOutput(); kernelWrapper.Validate(kernelDataInput, kernelDataOutput, out messages); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r1927 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1927) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1955) @@ -168,21 +168,6 @@ Geen uitvoer object gedefinieerd voor Sellmeijer VNK - - Geen Dam invoer object gedefinieerd voor WBI Macrostabiliteit - - - Geen reken object gedefinieerd voor WBI Macrostabiliteit - - - Geen invoer object gedefinieerd voor WBI Macrostabiliteit - - - Geen uitvoer object gedefinieerd voor WBI Macrostabiliteit - - - Voorbereiding van het rekenhart voor WBI Macrostabiliteit is niet geslaagd. - Locatie '{0}', ondergrond scenario '{1}', ontwerp scenario '{2}': De berekening is mislukt met de volgende foutmelding '{3}'. @@ -294,4 +279,19 @@ Geen uitvoer object gedefinieerd voor WBI Sellmeijer Revised + + Geen Dam invoer object gedefinieerd voor WTI Macrostabiliteit + + + Geen reken object gedefinieerd voor WTI Macrostabiliteit + + + Geen invoer object gedefinieerd voor WTI Macrostabiliteit + + + Geen uitvoer object gedefinieerd voor WTI Macrostabiliteit + + + Voorbereiding van het rekenhart voor WTI Macrostabiliteit is niet geslaagd. + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r1927 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1927) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1955) @@ -282,19 +282,19 @@ Location '{0}', subsoil scenario '{1}', timestep '{2}', timestamp '{3}': The validation for this calculation failed. - - No input object defined for WBI Macro Stability + + No input object defined for WTI Macro Stability - - No output object defined for WBI Macro Stability + + No output object defined for WTI Macro Stability - - No Dam input object defined for WBI Macro Stability + + No Dam input object defined for WTI Macro Stability - - No calculator object defined for WBI Macro Stability + + No calculator object defined for WTI Macro Stability - - Prepare of calculator for WBI Macro Stability did not succeed + + Prepare of calculator for WTI Macro Stability did not succeed \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutput.cs =================================================================== diff -u -r1922 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutput.cs (.../DamWbiMacroStabilityInwards/DamWbiMacroStabilityOutput.cs) (revision 1922) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityOutput.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityOutput.cs) (revision 1955) @@ -3,9 +3,9 @@ using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard.Calculation; -namespace Deltares.DamEngine.Calculators.KernelWrappers.DamWbiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards { - public class DamWbiMacroStabilityOutput : IKernelDataOutput + public class WtiMacroStabilityOutput : IKernelDataOutput { /// /// Gets or sets the calculation result. @@ -21,7 +21,7 @@ /// /// The stability output items. /// - public List StabilityOutputItems { get; set; } + public List StabilityOutputItems { get; set; } /// /// Gets or sets the uplift situation. Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInput.cs =================================================================== diff -u -r1922 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInput.cs (.../DamWbiMacroStabilityInwards/DamWbiMacroStabilityInput.cs) (revision 1922) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/DamWbiMacroStabilityInput.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInput.cs) (revision 1955) @@ -1,8 +1,8 @@ using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; -namespace Deltares.DamEngine.Calculators.KernelWrappers.DamWbiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards { - public class DamWbiMacroStabilityInput : IKernelDataInput + public class WtiMacroStabilityInput : IKernelDataInput { //ToDo MWDAM-1356: Not clear yet what input must be provided //probably something like FailureMechanismParametersMStab Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r1927 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1927) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1955) @@ -218,51 +218,6 @@ } /// - /// Looks up a localized string similar to No Dam input object defined for WBI Macro Stability. - /// - internal static string DamWbiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWbiMacroStability { - get { - return ResourceManager.GetString("DamWbiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWbiMacroStability", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No calculator object defined for WBI Macro Stability. - /// - internal static string DamWbiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWbiMacroStability { - get { - return ResourceManager.GetString("DamWbiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWbiMacroStability", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No input object defined for WBI Macro Stability. - /// - internal static string DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityInputObjectDefined { - get { - return ResourceManager.GetString("DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityInputObjectDefined", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No output object defined for WBI Macro Stability. - /// - internal static string DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityOutputObjectDefined { - get { - return ResourceManager.GetString("DamWbiMacroStabilityKernelWrapper_NoWbiMacroStabilityOutputObjectDefined", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Prepare of calculator for WBI Macro Stability did not succeed. - /// - internal static string DamWbiMacroStabilityKernelWrapper_PrepareForWbiMacroStabilityDidNotSucceed { - get { - return ResourceManager.GetString("DamWbiMacroStabilityKernelWrapper_PrepareForWbiMacroStabilityDidNotSucceed", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Location '{0}', subsoil scenario '{1}', design scenario '{2}': The calculation failed with error message '{3}'. /// internal static string DesignCalculatorGeneralException { @@ -604,5 +559,50 @@ return ResourceManager.GetString("WbiPipingSellmeijerRevisedKernelWrapper_NoOutputObjectDefined", resourceCulture); } } + + /// + /// Looks up a localized string similar to No Dam input object defined for WTI Macro Stability. + /// + internal static string WtiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWtiMacroStability { + get { + return ResourceManager.GetString("WtiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWtiMacroStability", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No calculator object defined for WTI Macro Stability. + /// + internal static string WtiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWtiMacroStability { + get { + return ResourceManager.GetString("WtiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWtiMacroStability", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No input object defined for WTI Macro Stability. + /// + internal static string WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityInputObjectDefined { + get { + return ResourceManager.GetString("WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityInputObjectDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No output object defined for WTI Macro Stability. + /// + internal static string WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityOutputObjectDefined { + get { + return ResourceManager.GetString("WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityOutputObjectDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare of calculator for WTI Macro Stability did not succeed. + /// + internal static string WtiMacroStabilityKernelWrapper_PrepareForWtiMacroStabilityDidNotSucceed { + get { + return ResourceManager.GetString("WtiMacroStabilityKernelWrapper_PrepareForWtiMacroStabilityDidNotSucceed", resourceCulture); + } + } } } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj =================================================================== diff -u -r1948 -r1955 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1948) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1955) @@ -54,7 +54,7 @@ - + @@ -151,10 +151,10 @@ PreserveNewest - + PreserveNewest - + PreserveNewest Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamWbiMacroStabilityInwards/DamWbiMacroStabilityOutput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamWbiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapper.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamWbiMacroStabilityInwards/DamWbiMacroStabilityInput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamWbiMacroStabilityInwards/DamWbiMacroStabilityOutputItem.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamWbiMacroStabilityInwards/DamWbiMacroStabilityInwardsKernelWrapperTests.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamWbiMacroStabilityInwards/TestFiles/ValidateOk.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1955 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamWbiMacroStabilityInwards/TestFiles/ValidateError.xml'. Fisheye: No comparison available. Pass `N' to diff?