Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInput.cs =================================================================== diff -u -r1965 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInput.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInput.cs) (revision 1965) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInput.cs (.../MacroStabilityInwards/MacroStabilityInput.cs) (revision 1983) @@ -21,9 +21,9 @@ using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; -namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards { - public class WtiMacroStabilityInput : IKernelDataInput + public class MacroStabilityInput : 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.resx =================================================================== diff -u -r1961 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1961) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 1983) @@ -282,19 +282,19 @@ Location '{0}', subsoil scenario '{1}', timestep '{2}', timestamp '{3}': The validation for this calculation failed. - - No input object defined for WTI Macro Stability + + No input object defined for Macro Stability - - No output object defined for WTI Macro Stability + + No output object defined for Macro Stability - - No Dam input object defined for WTI Macro Stability + + No Dam input object defined for Macro Stability - - No calculator object defined for WTI Macro Stability + + No calculator object defined for Macro Stability - - Prepare of calculator for WTI Macro Stability did not succeed + + Prepare of calculator for Macro Stability did not succeed \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r1961 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1961) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1983) @@ -290,6 +290,51 @@ } /// + /// Looks up a localized string similar to No Dam input object defined for Macro Stability. + /// + internal static string MacroStabilityKernelWrapper_NoDamInputObjectDefinedForMacroStability { + get { + return ResourceManager.GetString("MacroStabilityKernelWrapper_NoDamInputObjectDefinedForMacroStability", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No calculator object defined for Macro Stability. + /// + internal static string MacroStabilityKernelWrapper_NoDamKernelObjectDefinedForMacroStability { + get { + return ResourceManager.GetString("MacroStabilityKernelWrapper_NoDamKernelObjectDefinedForMacroStability", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No input object defined for Macro Stability. + /// + internal static string MacroStabilityKernelWrapper_NoMacroStabilityInputObjectDefined { + get { + return ResourceManager.GetString("MacroStabilityKernelWrapper_NoMacroStabilityInputObjectDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No output object defined for Macro Stability. + /// + internal static string MacroStabilityKernelWrapper_NoMacroStabilityOutputObjectDefined { + get { + return ResourceManager.GetString("MacroStabilityKernelWrapper_NoMacroStabilityOutputObjectDefined", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare of calculator for Macro Stability did not succeed. + /// + internal static string MacroStabilityKernelWrapper_PrepareForMacroStabilityDidNotSucceed { + get { + return ResourceManager.GetString("MacroStabilityKernelWrapper_PrepareForMacroStabilityDidNotSucceed", resourceCulture); + } + } + + /// /// Looks up a localized string similar to River level ({0}) is below surface level at river side ({1}).. /// internal static string MStabXmlDoc_CreateMStabXmlDoc_RiverLevelHighIsBelowSurfaceLevelOutside { @@ -543,51 +588,6 @@ } /// - /// 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); - } - } - - /// /// Looks up a localized string similar to No input object defined for WTI Sellmeijer Revised. /// internal static string WtiPipingSellmeijerRevisedKernelWrapper_NoInputObjectDefined { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutputItem.cs =================================================================== diff -u -r1965 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutputItem.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityOutputItem.cs) (revision 1965) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutputItem.cs (.../MacroStabilityInwards/MacroStabilityOutputItem.cs) (revision 1983) @@ -22,9 +22,9 @@ using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard.Calculation; -namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards { - public class WtiMacroStabilityOutputItem + public class MacroStabilityOutputItem { /// /// Gets or sets the calculation result. Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r1961 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1961) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 1983) @@ -279,19 +279,19 @@ Geen uitvoer object gedefinieerd voor WTI Sellmeijer Revised - - Geen Dam invoer object gedefinieerd voor WTI Macrostabiliteit + + Geen Dam invoer object gedefinieerd voor Macrostabiliteit - - Geen reken object gedefinieerd voor WTI Macrostabiliteit + + Geen reken object gedefinieerd voor Macrostabiliteit - - Geen invoer object gedefinieerd voor WTI Macrostabiliteit + + Geen invoer object gedefinieerd voor Macrostabiliteit - - Geen uitvoer object gedefinieerd voor WTI Macrostabiliteit + + Geen uitvoer object gedefinieerd voor Macrostabiliteit - - Voorbereiding van het rekenhart voor WTI Macrostabiliteit is niet geslaagd. + + Voorbereiding van het rekenhart voor Macrostabiliteit is niet geslaagd. \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutput.cs =================================================================== diff -u -r1965 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutput.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityOutput.cs) (revision 1965) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityOutput.cs (.../MacroStabilityInwards/MacroStabilityOutput.cs) (revision 1983) @@ -24,9 +24,9 @@ using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard.Calculation; -namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards { - public class WtiMacroStabilityOutput : IKernelDataOutput + public class MacroStabilityOutput : IKernelDataOutput { /// /// Gets or sets the calculation result. @@ -42,7 +42,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.Tests/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r1977 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs) (revision 1977) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs) (revision 1983) @@ -25,7 +25,7 @@ using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; -using Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards; +using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; using Deltares.DamEngine.Calculators.Tests.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; @@ -35,18 +35,18 @@ using Deltares.DamEngine.TestHelpers.Factories; using NUnit.Framework; -namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.WtiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.MacroStabilityInwards { [TestFixture] - public class WtiMacroStabilityInwardsKernelWrapperTests + public class MacroStabilityInwardsKernelWrapperTests { - private const string TestFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\KernelWrappers\WtiMacroStabilityInwards\TestFiles"; + private const string TestFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\KernelWrappers\MacroStabilityInwards\TestFiles"; [Test] public void TestPrepare() { - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWtiStabilityCalculator(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateStabilityCalculator(); kernelWrapper.FailureMechanismParametersMStab = new FailureMechanismParametersMStab(); IKernelDataInput kernelDataInput; @@ -57,7 +57,7 @@ kernelInput.Location.ModelFactors.UpliftCriterionStability = 0.8; var prepareResult = kernelWrapper.Prepare(kernelInput, 0, out kernelDataInput, out kernelDataOutput); Assert.AreEqual(PrepareResult.NotRelevant, prepareResult); - WtiMacroStabilityOutput damMacroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; + MacroStabilityOutput damMacroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(false, damMacroStabilityOutput.UpliftSituation.IsUplift); @@ -67,7 +67,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 = (WtiMacroStabilityOutput)kernelDataOutput; + damMacroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(true, damMacroStabilityOutput.UpliftSituation.IsUplift); @@ -77,29 +77,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 = (WtiMacroStabilityOutput)kernelDataOutput; + damMacroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; Assert.AreEqual(CalculationResult.NoRun, damMacroStabilityOutput.CalculationResult); Assert.AreEqual(true, damMacroStabilityOutput.UpliftSituation.IsUplift); } [Test] public void TestValidate() { - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWtiStabilityCalculator(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateStabilityCalculator(); // Validate without setting values. Expected error messages. - var macroStabilityInput1 = new WtiMacroStabilityInput(); - var macroStabilityOutput1 = new WtiMacroStabilityOutput(); + var macroStabilityInput1 = new MacroStabilityInput(); + var macroStabilityOutput1 = new MacroStabilityOutput(); 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 WtiMacroStabilityInput(); - var macroStabilityOutput2 = new WtiMacroStabilityOutput(); + var macroStabilityInput2 = new MacroStabilityInput(); + var macroStabilityOutput2 = new MacroStabilityOutput(); 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. @@ -115,7 +115,7 @@ public void TestParseValidationResultOk() { List messages; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); var xmlFileName = Path.Combine(TestFolder, "ValidateOk.xml"); string xmlValidationResult = File.ReadAllText(xmlFileName); // start of temporary test code @@ -131,7 +131,7 @@ public void TestParseValidationResultError() { List messages; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); var xmlFileName = Path.Combine(TestFolder, "ValidateError.xml"); string xmlValidationResult = File.ReadAllText(xmlFileName); // start of temporary test code @@ -149,8 +149,8 @@ { const double diff = 0.001; List messages; - WtiMacroStabilityOutputItem macroStabilityOutputItem = new WtiMacroStabilityOutputItem(); - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + MacroStabilityOutputItem macroStabilityOutputItem = new MacroStabilityOutputItem(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); // Result 1 succeeded, has a SafetyFactor of ca. 4.47, no messages var xmlFileName = Path.Combine(TestFolder, "Result1True.xml"); @@ -191,20 +191,20 @@ public void TestPostProcess() { const double diff = 0.0001; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); var kernelInput = CreateDamKernelInputForTest(); - WtiMacroStabilityOutput macroStabilityOutput = new WtiMacroStabilityOutput(); + MacroStabilityOutput macroStabilityOutput = new MacroStabilityOutput(); DesignScenario designScenario = new DesignScenario { Location = kernelInput.Location }; List results; macroStabilityOutput.CalculationResult = CalculationResult.Succeeded; - var macroStabilityOutputItem = new WtiMacroStabilityOutputItem(); + var macroStabilityOutputItem = new MacroStabilityOutputItem(); 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); @@ -222,18 +222,18 @@ [Test] public void TestFullCalculationFails() { - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWtiStabilityCalculator(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateStabilityCalculator(); - IKernelDataInput kernelDataInput = new WtiMacroStabilityInput(); - IKernelDataOutput kernelDataOutput = new WtiMacroStabilityOutput(); + IKernelDataInput kernelDataInput = new MacroStabilityInput(); + IKernelDataOutput kernelDataOutput = new MacroStabilityOutput(); // Run the dll List messages; - WtiMacroStabilityInput macroStabilityInput = (WtiMacroStabilityInput)kernelDataInput; + MacroStabilityInput macroStabilityInput = (MacroStabilityInput)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 - WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; + MacroStabilityOutput macroStabilityOutput = (MacroStabilityOutput)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); @@ -244,8 +244,8 @@ { const double diff = 0.0001; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); - kernelWrapper.CreateWtiStabilityCalculator(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); + kernelWrapper.CreateStabilityCalculator(); kernelWrapper.FailureMechanismParametersMStab = new FailureMechanismParametersMStab(); // Prepare the wrapper. Result is input for the calculation dll @@ -267,7 +267,7 @@ // Run the dll kernelWrapper.tmpPresumeRunSucceeds = true; //ToDo replace by input that makes Execute succeed kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out messages); - WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; + MacroStabilityOutput macroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; // ToDo MWDAM-1356: Input must be set first in Prepare // ToDo MWDAM-1357 Parse the xml output from the kernel must be done @@ -295,52 +295,52 @@ } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen invoer object gedefinieerd voor WTI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen invoer object gedefinieerd voor Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestLanguageNLThrowsExceptionWhenInputIsNull() { List messages; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); kernelWrapper.Execute(null, null, out messages); ; } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "No input object defined for WTI Macro Stability")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "No input object defined for Macro Stability")] [SetUICulture("en-US")] - public void TestLanguageENThrowsExceptionWhenWtiStabilityInputIsNull() + public void TestLanguageENThrowsExceptionWhenStabilityInputIsNull() { List messages; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); kernelWrapper.Execute(null, null, out messages); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen uitvoer object gedefinieerd voor WTI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen uitvoer object gedefinieerd voor Macrostabiliteit")] [SetUICulture("nl-NL")] - public void TestThrowsExceptionWhenWtiStabilityOutputIsNull() + public void TestThrowsExceptionWhenStabilityOutputIsNull() { - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); List results; kernelWrapper.PostProcess(new DamKernelInput(), null, null, "", out results); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen Dam invoer object gedefinieerd voor WTI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen Dam invoer object gedefinieerd voor Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestThrowsExceptionWhenDamKernelInputIsNull() { - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); List results; kernelWrapper.PostProcess(null, null, null, "", out results); } [Test] - [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen reken object gedefinieerd voor WTI Macrostabiliteit")] + [ExpectedException(typeof(NoNullAllowedException), ExpectedMessage = "Geen reken object gedefinieerd voor Macrostabiliteit")] [SetUICulture("nl-NL")] public void TestThrowsExceptionWhenDamKernelIsNull() { List messages; - var kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); + var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); IKernelDataInput kernelDataInput = new DamMacroStabilityInput(); IKernelDataOutput kernelDataOutput = new DamMacroStabilityOutput(); kernelWrapper.Validate(kernelDataInput, kernelDataOutput, out messages); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs =================================================================== diff -u -r1977 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 1977) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 1983) @@ -27,7 +27,7 @@ using Deltares.DamEngine.Calculators.KernelWrappers.DamPipingSellmeijer4Forces; using Deltares.DamEngine.Calculators.KernelWrappers.DamPipingSellmeijerVnk; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; -using Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards; +using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; using Deltares.DamEngine.Calculators.KernelWrappers.WtiPipingSellmeijerRevised; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard; @@ -65,8 +65,8 @@ damMacroStabilityKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy(); break; case FailureMechanismSystemType.WtiStabilityInside: - kernelWrapper = new WtiMacroStabilityInwardsKernelWrapper(); - var wtiMacroStabilityInwardsKernelWrapper = (WtiMacroStabilityInwardsKernelWrapper)kernelWrapper; + kernelWrapper = new MacroStabilityInwardsKernelWrapper(); + var wtiMacroStabilityInwardsKernelWrapper = (MacroStabilityInwardsKernelWrapper)kernelWrapper; wtiMacroStabilityInwardsKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy(); break; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj =================================================================== diff -u -r1972 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1972) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Deltares.DamEngine.Calculators.csproj (.../Deltares.DamEngine.Calculators.csproj) (revision 1983) @@ -105,10 +105,10 @@ - - - - + + + + Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj =================================================================== diff -u -r1972 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1972) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Deltares.DamEngine.Calculators.Tests.csproj (.../Deltares.DamEngine.Calculators.Tests.csproj) (revision 1983) @@ -59,7 +59,7 @@ - + @@ -162,19 +162,19 @@ PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r1977 -r1983 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs (.../WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs) (revision 1977) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs) (revision 1983) @@ -37,11 +37,11 @@ using Deltares.DamEngine.Data.Standard.Logging; using Deltares.WTIStability.Calculation.Wrapper; -namespace Deltares.DamEngine.Calculators.KernelWrappers.WtiMacroStabilityInwards +namespace Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards { - public class WtiMacroStabilityInwardsKernelWrapper : IKernelWrapper + public class MacroStabilityInwardsKernelWrapper : IKernelWrapper { - private WTIStabilityCalculation wtiMacroStabilityCalculator = null; + private WTIStabilityCalculation stabilityCalculator = null; private int lastIterationIndex = 0; /// @@ -50,7 +50,7 @@ /// /// The failure mechanisme paramaters mstab. /// - public FailureMechanismParametersMStab FailureMechanismParametersMStab { get; set; } //ToDo MWDAM-? Use same as for DGeoStability or create new one for WTI? + public FailureMechanismParametersMStab FailureMechanismParametersMStab { get; set; } //ToDo MWDAM-? Use same as for DGeoStability or create new one? public bool tmpPresumePrepareSucceeds; //ToDo MWDAM-1356 public bool tmpPresumeInputValid; //ToDo MWDAM-1367 @@ -68,9 +68,9 @@ /// public PrepareResult Prepare(DamKernelInput damKernelInput, int iterationIndex, out IKernelDataInput kernelDataInput, out IKernelDataOutput kernelDataOutput) { - var macroStabilityInput = new WtiMacroStabilityInput(); + var macroStabilityInput = new MacroStabilityInput(); kernelDataInput = macroStabilityInput; - var macroStabilityOutput = new WtiMacroStabilityOutput + var macroStabilityOutput = new MacroStabilityOutput { CalculationResult = CalculationResult.NoRun }; @@ -102,11 +102,11 @@ private PrepareResult PrepareKernel(string xmlInput) { - ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); + ThrowWhenMacroStabilityCalculatorNull(stabilityCalculator); try { // ToDo MWDAM-1356: Not clear yet what parts are required for input. Temporary test code added. - //wtiMacroStabilityCalculator.InitializeForDeterministic(xmlInput); //ToDo: uncomment when input is set + //macroStabilityCalculator.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 { @@ -124,7 +124,7 @@ } } - private string CreateXmlInput(WtiMacroStabilityInput macroStabilityInput, EmbankmentDesignParameters embankmentDesignParameters) + private string CreateXmlInput(MacroStabilityInput macroStabilityInput, EmbankmentDesignParameters embankmentDesignParameters) { string xmlInput = ""; //ToDo in MWDAM-1356 @@ -142,7 +142,7 @@ /// public int Validate(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages) { - ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); + ThrowWhenMacroStabilityCalculatorNull(stabilityCalculator); if (tmpPresumeInputValid) { messages = new List(); @@ -153,9 +153,9 @@ messages = new List(); messages.Add(new LogMessage(LogMessageType.Error, null, "Not implemented yet")); // Todo MWDAM-1356 : make valid XML, only then following lines can be enabled - // string kernelMessage = wtiMacroStabilityCalculator.Validate(); + // string kernelMessage = macroStabilityCalculator.Validate(); // ParseValidationResult(kernelMessage, out messages); - WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; + MacroStabilityOutput macroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; var numberOfErrors = messages.Count(mt => mt.MessageType == LogMessageType.Error); if (numberOfErrors > 0) { @@ -200,26 +200,26 @@ /// The return messages. public void Execute(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out List messages) { - WtiMacroStabilityInput macroStabilityInput = (WtiMacroStabilityInput)kernelDataInput; - WtiMacroStabilityOutput macroStabilityOutput = (WtiMacroStabilityOutput)kernelDataOutput; - ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); - ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); + MacroStabilityInput macroStabilityInput = (MacroStabilityInput)kernelDataInput; + MacroStabilityOutput macroStabilityOutput = (MacroStabilityOutput)kernelDataOutput; + ThrowWhenMacroStabilityKernelInputNull(macroStabilityInput); + ThrowWhenMacroStabilityKernelOutputNull(macroStabilityOutput); messages = new List(); - PerformWtiStabilityCalculation(out messages, macroStabilityOutput, macroStabilityInput); + PerformStabilityCalculation(out messages, macroStabilityOutput, macroStabilityInput); } - private void PerformWtiStabilityCalculation(out List messages, WtiMacroStabilityOutput macroStabilityOutput, - WtiMacroStabilityInput macroStabilityInput) + private void PerformStabilityCalculation(out List messages, MacroStabilityOutput macroStabilityOutput, + MacroStabilityInput macroStabilityInput) { - ThrowWhenWtiMacroStabilityCalculatorNull(wtiMacroStabilityCalculator); + ThrowWhenMacroStabilityCalculatorNull(stabilityCalculator); macroStabilityOutput.CalculationResult = CalculationResult.NoRun; - macroStabilityOutput.StabilityOutputItems = new List(); + macroStabilityOutput.StabilityOutputItems = new List(); //this must be code when prepare is done // try // { -// string kernelMessage = wtiMacroStabilityCalculator.Run(); +// string kernelMessage = macroStabilityCalculator.Run(); // ParseRunResult(kernelMessage, macroStabilityOutput, messages); // macroStabilityOutput.CalculationResult = CalculationResult.Succeeded; // } @@ -234,7 +234,7 @@ if (tmpPresumeRunSucceeds) { //presume run succeeded - WtiMacroStabilityOutputItem macroStabilityOutputItem; + MacroStabilityOutputItem macroStabilityOutputItem; ParseRunResult("", out macroStabilityOutputItem, out messages); macroStabilityOutput.CalculationResult = macroStabilityOutputItem.CalculationResult; macroStabilityOutput.StabilityOutputItems.Add(macroStabilityOutputItem); @@ -251,11 +251,11 @@ } - internal void ParseRunResult(string xmlRunResult, out WtiMacroStabilityOutputItem macroStabilityOutputItem, out List messages) + internal void ParseRunResult(string xmlRunResult, out MacroStabilityOutputItem macroStabilityOutputItem, out List messages) { messages = new List(); // ToDo MWDAM-1357: Parse the xml from the kernel, fill results and add message with type Error, Info or Warning - macroStabilityOutputItem = new WtiMacroStabilityOutputItem(); + macroStabilityOutputItem = new MacroStabilityOutputItem(); // start of temporary test code if (tmpPresumeRunSucceeds) { @@ -280,11 +280,11 @@ } /// - /// Creates the calculator for WTI stability based on kernel input. + /// Creates the calculator for stability based on kernel input. /// - public void CreateWtiStabilityCalculator() + public void CreateStabilityCalculator() { - wtiMacroStabilityCalculator = new WTIStabilityCalculation(); + stabilityCalculator = new WTIStabilityCalculation(); } /// @@ -299,9 +299,9 @@ public void PostProcess(DamKernelInput damKernelInput, IKernelDataOutput kernelDataOutput, DesignScenario designScenario, string resultMessage, out List designResults) { - ThrowWhenWtiMacroStabilityDamKernelInputNull(damKernelInput); - WtiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as WtiMacroStabilityOutput; - ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); + ThrowWhenMacroStabilityDamKernelInputNull(damKernelInput); + MacroStabilityOutput macroStabilityOutput = kernelDataOutput as MacroStabilityOutput; + ThrowWhenMacroStabilityKernelOutputNull(macroStabilityOutput); designResults = new List(); if (macroStabilityOutput.StabilityOutputItems.Count > 0) { @@ -318,7 +318,7 @@ } private DesignResult NewDesignResult(DamKernelInput damKernelInput, DesignScenario designScenario, - WtiMacroStabilityOutputItem macroStabilityOutputItem) + MacroStabilityOutputItem macroStabilityOutputItem) { string soilProfile2DName = damKernelInput.SubSoilScenario.ToString(); var designResult = new DesignResult(damKernelInput.DamFailureMechanismeCalculationSpecification, @@ -335,7 +335,7 @@ return designResult; } - private static void FillDesignResult(WtiMacroStabilityOutputItem macroStabilityOutputItem, DesignResult designResult) + private static void FillDesignResult(MacroStabilityOutputItem macroStabilityOutputItem, DesignResult designResult) { designResult.CalculationResult = macroStabilityOutputItem.CalculationResult; designResult.StabilityDesignResults.StabilityModelType = macroStabilityOutputItem.StabilityModelType; @@ -346,54 +346,54 @@ } /// - /// Throws the when WTI macro stability kernel input is not assigned. + /// Throws the when macro stability kernel input is not assigned. /// - /// The dam WTI macro stability input. + /// The dam macro stability input. /// - public static void ThrowWhenWtiMacroStabilityKernelInputNull(WtiMacroStabilityInput wtiMacroStabilityInput) + public static void ThrowWhenMacroStabilityKernelInputNull(MacroStabilityInput macroStabilityInput) { - if (wtiMacroStabilityInput == null) + if (macroStabilityInput == null) { - throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityInputObjectDefined); + throw new NoNullAllowedException(Resources.MacroStabilityKernelWrapper_NoMacroStabilityInputObjectDefined); } } /// - /// Throws the when WTI macro stability kernel output is not assigned. + /// Throws the when macro stability kernel output is not assigned. /// - /// The dam WTI macro stability output. + /// The dam macro stability output. /// - public static void ThrowWhenWtiMacroStabilityKernelOutputNull(WtiMacroStabilityOutput wtiMacroStabilityOutput) + public static void ThrowWhenMacroStabilityKernelOutputNull(MacroStabilityOutput macroStabilityOutput) { - if (wtiMacroStabilityOutput == null) + if (macroStabilityOutput == null) { - throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoWtiMacroStabilityOutputObjectDefined); + throw new NoNullAllowedException(Resources.MacroStabilityKernelWrapper_NoMacroStabilityOutputObjectDefined); } } /// - /// Throws the when WTI macro stability dam kernel input is not assigned. + /// Throws the when macro stability dam kernel input is not assigned. /// /// The dam kernel input. /// - public static void ThrowWhenWtiMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) + public static void ThrowWhenMacroStabilityDamKernelInputNull(DamKernelInput damKernelInput) { if (damKernelInput == null) { - throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoDamInputObjectDefinedForWtiMacroStability); + throw new NoNullAllowedException(Resources.MacroStabilityKernelWrapper_NoDamInputObjectDefinedForMacroStability); } } /// - /// Throws the when WTI macro stability calculator is not assigned. + /// Throws the when macro stability calculator is not assigned. /// - /// The WTI macro stability calculator. + /// The macro stability calculator. /// - public static void ThrowWhenWtiMacroStabilityCalculatorNull(WTIStabilityCalculation wtiMacroStabilityCalculator) + public static void ThrowWhenMacroStabilityCalculatorNull(WTIStabilityCalculation macroStabilityCalculator) { - if (wtiMacroStabilityCalculator == null) + if (macroStabilityCalculator == null) { - throw new NoNullAllowedException(Resources.WtiMacroStabilityKernelWrapper_NoDamKernelObjectDefinedForWtiMacroStability); + throw new NoNullAllowedException(Resources.MacroStabilityKernelWrapper_NoDamKernelObjectDefinedForMacroStability); } } @@ -429,11 +429,11 @@ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out DesignAdvise designAdvise, out string evaluationMessage) { - WtiMacroStabilityInput macroStabilityInput = kernelDataInput as WtiMacroStabilityInput; - WtiMacroStabilityOutput macroStabilityOutput = kernelDataOutput as WtiMacroStabilityOutput; - ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); - ThrowWhenWtiMacroStabilityKernelOutputNull(macroStabilityOutput); - ThrowWhenWtiMacroStabilityDamKernelInputNull(damKernelInput); + MacroStabilityInput macroStabilityInput = kernelDataInput as MacroStabilityInput; + MacroStabilityOutput macroStabilityOutput = kernelDataOutput as MacroStabilityOutput; + ThrowWhenMacroStabilityKernelInputNull(macroStabilityInput); + ThrowWhenMacroStabilityKernelOutputNull(macroStabilityOutput); + ThrowWhenMacroStabilityDamKernelInputNull(damKernelInput); double fosRequired = damKernelInput.Location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value; double fosAchieved = macroStabilityOutput.StabilityOutputItems[0].SafetyFactor; @@ -469,8 +469,8 @@ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters) { - WtiMacroStabilityInput macroStabilityInput = kernelDataInput as WtiMacroStabilityInput; - ThrowWhenWtiMacroStabilityKernelInputNull(macroStabilityInput); + MacroStabilityInput macroStabilityInput = kernelDataInput as MacroStabilityInput; + ThrowWhenMacroStabilityKernelInputNull(macroStabilityInput); lastIterationIndex = iterationIndex; var location = damKernelInput.Location; @@ -487,7 +487,7 @@ { EmbankmentMaterialname = location.DikeEmbankmentMaterial, }; - //ToDo MWDAM-? Use FailureMechanismParametersMStab or create new one for WTI? + //ToDo MWDAM-? Use FailureMechanismParametersMStab or create new one? FailureMechanismParametersMStab.EmbankmentDesignParameters = embankmentDesignParameters; embankmentDesignParametersForKernelInput = null; } @@ -511,7 +511,7 @@ var prepareResult = PrepareKernel(xmlInput); if (prepareResult != PrepareResult.Successful) { - throw new MacroStabilityException(Resources.WtiMacroStabilityKernelWrapper_PrepareForWtiMacroStabilityDidNotSucceed); + throw new MacroStabilityException(Resources.MacroStabilityKernelWrapper_PrepareForMacroStabilityDidNotSucceed); } } Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapperTests.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/TestFiles/Result3False.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/TestFiles/Result2True.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/TestFiles/Result1True.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/TestFiles/ValidateOk.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiMacroStabilityInwards/TestFiles/ValidateError.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/WtiMacroStabilityInwardsKernelWrapper.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/WtiMacroStabilityOutputItem.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/WtiMacroStabilityOutput.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1983 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiMacroStabilityInwards/WtiMacroStabilityInput.cs'. Fisheye: No comparison available. Pass `N' to diff?