Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 6895) @@ -280,7 +280,7 @@ } } } - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, calculationMessages); + KernelWrapperHelper.AddKernelOutputMessageToLogMessages(location.Name, soiProfileProbability, designScenario.LocationScenarioID, kernelDataOutput, calculationMessages); } catch (Exception e) { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs =================================================================== diff -u -r6874 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 6874) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 6895) @@ -569,7 +569,7 @@ { if (plLine.Points.Last().Z <= WaterLevelPolder) { - // the PL line is already at WaterLevelPolder, so countinue it horizontally + // the PL line is already at WaterLevelPolder, so continue it horizontally plLine.Points.Add(new PlLinePoint(SurfaceLine.Geometry.Points.Last().X, WaterLevelPolder)); } else Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapperTests.cs =================================================================== diff -u -r6856 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapperTests.cs (.../WtiPipingSellmeijerRevisedKernelWrapperTests.cs) (revision 6856) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapperTests.cs (.../WtiPipingSellmeijerRevisedKernelWrapperTests.cs) (revision 6895) @@ -352,25 +352,6 @@ }); } - [Test] - public void TestAddMessageToCalculationMessages() - { - var kernelDataOutput = new WtiPipingSellmeijerRevisedOutput(); - var message = new LogMessage - { - Message = "Warning during calculation", - MessageType = LogMessageType.Warning - }; - kernelDataOutput.Message = message; - var logMessages = new List(); - var kernelWrapper = new WtiPipingSellmeijerRevisedKernelWrapper(); - - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, logMessages); - - Assert.That(logMessages, Has.Count.EqualTo(1)); - Assert.That(logMessages[0], Is.EqualTo(message)); - } - [TestCase(0, 49.5, 1860.9050036726026, 1302.9335025708217, 1302.6335025708217, 0.037999943884683543)] [TestCase(10, 59.5, 2196.3999536424808, 1537.7799675497363, 1537.4799675497363, 0.038699691219277771)] [TestCase(-10, 39.5, 1519.6869237263827, 1064.0808466084677, 1063.7808466084678, 0.037131708214086942)] Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 6895) @@ -233,7 +233,7 @@ Debug.WriteLine("End calculation Location '{0}', soilprofile '{1}'", task.Location, task.SoiProfileProbability); } - private void CalculateOneScenario(Location originalLocation, SoilGeometryProbability soiProfileProbability, + private void CalculateOneScenario(Location originalLocation, SoilGeometryProbability soilProfileProbability, DesignScenario designScenario, string projectPath, string calculationMap, DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculationSpecification, List designResults, List calculationMessages) @@ -246,7 +246,7 @@ damKernelInput.ProjectDir = projectPath; damKernelInput.CalculationDir = Path.Combine(projectPath, calculationMap); damKernelInput.Location = location; - damKernelInput.SubSoilScenario = soiProfileProbability.Copy(); + damKernelInput.SubSoilScenario = soilProfileProbability.Copy(); damKernelInput.DamFailureMechanismeCalculationSpecification = damFailureMechanismeCalculationSpecification; damKernelInput.RiverLevelHigh = designScenario.RiverLevel; damKernelInput.RiverLevelLow = designScenario.RiverLevelLow; @@ -285,20 +285,20 @@ { case PrepareResult.Successful: PerformCalculation(designResults, calculationMessages, analysisType, kernelWrapper, kernelDataInput, kernelDataOutput, damKernelInput); - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, calculationMessages); + KernelWrapperHelper.AddKernelOutputMessageToLogMessages(originalLocation.Name, soilProfileProbability, designScenario.LocationScenarioID, kernelDataOutput, calculationMessages); break; case PrepareResult.NotRelevant: calculationMessages.Add(new LogMessage(LogMessageType.Info, null, string.Format(Resources.DesignCalculatorPrepareNotRelevant, location.Name, - soiProfileProbability, + soilProfileProbability, designScenario.LocationScenarioID))); break; case PrepareResult.NoUplift: calculationMessages.Add(new LogMessage(LogMessageType.Info, null, string.Format(Resources.DesignCalculatorPrepareNoUplift, location.Name, - soiProfileProbability, + soilProfileProbability, designScenario.LocationScenarioID))); kernelWrapper.PostProcess(damKernelInput, kernelDataOutput, designScenario, "", out List results); designResults.AddRange(results); @@ -307,9 +307,9 @@ calculationMessages.Add(new LogMessage(LogMessageType.Error, null, string.Format(Resources.DesignCalculatorPrepareError, location.Name, - soiProfileProbability, + soilProfileProbability, designScenario.LocationScenarioID))); - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, calculationMessages); + KernelWrapperHelper.AddKernelOutputMessageToLogMessages(originalLocation.Name, soilProfileProbability, designScenario.LocationScenarioID, kernelDataOutput, calculationMessages); break; } } @@ -327,7 +327,7 @@ calculationMessages.Add(new LogMessage(LogMessageType.Error, null, string.Format(Resources.DesignCalculatorGeneralException, originalLocation.Name, - soiProfileProbability, + soilProfileProbability, designScenario.LocationScenarioID, e.Message))); } Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapperTests.cs =================================================================== diff -u -r6856 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapperTests.cs (.../WtiPipingBlighKernelWrapperTests.cs) (revision 6856) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapperTests.cs (.../WtiPipingBlighKernelWrapperTests.cs) (revision 6895) @@ -259,27 +259,8 @@ Assert.That(result.PipingDesignResults.RedesignedSurfaceLine, Is.EqualTo(input.Location.SurfaceLine)); } } - + [Test] - public void TestAddMessageToCalculationMessages() - { - var kernelDataOutput = new WtiPipingBlighOutput(); - var message = new LogMessage - { - Message = "Warning during calculation", - MessageType = LogMessageType.Warning - }; - kernelDataOutput.Message = message; - var logMessages = new List(); - var kernelWrapper = new WtiPipingBlighKernelWrapper(); - - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, logMessages); - - Assert.That(logMessages, Has.Count.EqualTo(1)); - Assert.That(logMessages[0], Is.EqualTo(message)); - } - - [Test] [SetUICulture("nl-NL")] public void TestLanguageNLThrowsExceptionInExecuteWhenInputIsNull() { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapper.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapper.cs (.../WtiPipingBlighKernelWrapper.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingBligh/WtiPipingBlighKernelWrapper.cs (.../WtiPipingBlighKernelWrapper.cs) (revision 6895) @@ -69,12 +69,11 @@ FoSp = defaultMaxReturnValue }; kernelDataOutput = wtiPipingBlighOutput; - if (damKernelInput.SubSoilScenario.SegmentFailureMechanismType != null && + if (damKernelInput.SubSoilScenario.SegmentFailureMechanismType != null && damKernelInput.SubSoilScenario.SegmentFailureMechanismType.Value.In(SegmentFailureMechanismType.Piping, SegmentFailureMechanismType.All)) { try { - var wtiPipingBlighInput = new WtiPipingBlighInput(); SoilProfile1D soilProfile1D = damKernelInput.SubSoilScenario.SoilProfile1D; @@ -428,14 +427,4 @@ throw new NoNullAllowedException(Resources.WtiPipingBlighKernelWrapper_NoDamInputObjectDefinedForBligh); } } - - public void AddMessageToCalculationMessages(IKernelDataOutput kernelDataOutput, List logMessages) - { - var dataOutput = (WtiPipingBlighOutput) kernelDataOutput; - LogMessage message = dataOutput.Message; - if (message != null) - { - logMessages.Add(message); - } - } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/KernelWrapperHelperTests.cs =================================================================== diff -u --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/KernelWrapperHelperTests.cs (revision 0) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/Common/KernelWrapperHelperTests.cs (revision 6895) @@ -0,0 +1,122 @@ +// Copyright (C) Stichting Deltares 2025. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Deltares.DamEngine.Calculators.KernelWrappers.Common; +using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; +using Deltares.DamEngine.Calculators.KernelWrappers.WtiPipingBligh; +using Deltares.DamEngine.Calculators.KernelWrappers.WtiPipingSellmeijerRevised; +using Deltares.DamEngine.Data.General; +using Deltares.DamEngine.Data.Standard.Logging; +using NUnit.Framework; + +namespace Deltares.DamEngine.Calculators.Tests.KernelWrappers.Common; + +[TestFixture] +public class KernelWrapperHelperTests +{ + [Test] + [SetUICulture("nl-NL")] + public void TestAddKernelOutputMessageToLogMessages_Macrostability() + { + var soilGeometryProbability = new SoilGeometryProbability + { + SoilProfileType = SoilProfileType.ProfileType2D, + SoilProfile2DName = "BBB" + }; + var kernelDataOutput = new MacroStabilityOutput(); + var message = new LogMessage + { + Message = "Warning during calculation", + MessageType = LogMessageType.Warning + }; + kernelDataOutput.Message = message; + var logMessages = new List(); + + KernelWrapperHelper.AddKernelOutputMessageToLogMessages("AAA", soilGeometryProbability, "CCC", kernelDataOutput, logMessages); + + Assert.That(logMessages, Has.Count.EqualTo(1)); + Assert.Multiple(() => + { + Assert.That(logMessages[0].MessageType, Is.EqualTo(LogMessageType.Warning)); + Assert.That(logMessages[0].Message, Is.EqualTo("Locatie 'AAA', ondergrond scenario 'BBB', " + + "ontwerp scenario 'CCC': Warning during calculation")); + }); + } + + [Test] + [SetUICulture("nl-NL")] + public void TestAddKernelOutputMessageToLogMessages_PipingBligh() + { + var soilGeometryProbability = new SoilGeometryProbability + { + SoilProfileType = SoilProfileType.ProfileType2D, + SoilProfile2DName = "BBB" + }; + var kernelDataOutput = new WtiPipingBlighOutput(); + var message = new LogMessage + { + Message = "Warning during calculation", + MessageType = LogMessageType.Warning + }; + kernelDataOutput.Message = message; + var logMessages = new List(); + + KernelWrapperHelper.AddKernelOutputMessageToLogMessages("AAA", soilGeometryProbability, "CCC", kernelDataOutput, logMessages); + + Assert.That(logMessages, Has.Count.EqualTo(1)); + Assert.Multiple(() => + { + Assert.That(logMessages[0].MessageType, Is.EqualTo(LogMessageType.Warning)); + Assert.That(logMessages[0].Message, Is.EqualTo("Locatie 'AAA', ondergrond scenario 'BBB', " + + "ontwerp scenario 'CCC': Warning during calculation")); + }); + } + + [Test] + [SetUICulture("en-EN")] + public void TestAddKernelOutputMessageToLogMessages_PipingSellmeijer() + { + var soilGeometryProbability = new SoilGeometryProbability + { + SoilProfileType = SoilProfileType.ProfileType1D, + SoilProfile1DName = "BBB" + }; + var kernelDataOutput = new WtiPipingSellmeijerRevisedOutput(); + var message = new LogMessage + { + Message = "Warning during calculation", + MessageType = LogMessageType.Warning + }; + kernelDataOutput.Message = message; + var logMessages = new List(); + + KernelWrapperHelper.AddKernelOutputMessageToLogMessages("AAA", soilGeometryProbability, "CCC", kernelDataOutput, logMessages); + + Assert.That(logMessages, Has.Count.EqualTo(1)); + Assert.Multiple(() => + { + Assert.That(logMessages[0].MessageType, Is.EqualTo(LogMessageType.Warning)); + Assert.That(logMessages[0].Message, Is.EqualTo("Location 'AAA', subsoil scenario 'BBB', " + + "design scenario 'CCC': Warning during calculation")); + }); + } +} \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs =================================================================== diff -u -r6856 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs (.../MacroStabilityOutwardsKernelWrapper.cs) (revision 6856) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityOutwards/MacroStabilityOutwardsKernelWrapper.cs (.../MacroStabilityOutwardsKernelWrapper.cs) (revision 6895) @@ -253,14 +253,4 @@ { return DesignStrategy.NoDesignPossible; } - - public void AddMessageToCalculationMessages(IKernelDataOutput kernelDataOutput, List logMessages) - { - var dataOutput = (MacroStabilityOutput) kernelDataOutput; - LogMessage message = dataOutput.Message; - if (message != null) - { - logMessages.Add(message); - } - } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs (.../WtiPipingSellmeijerRevisedKernelWrapper.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs (.../WtiPipingSellmeijerRevisedKernelWrapper.cs) (revision 6895) @@ -813,14 +813,4 @@ throw new NoNullAllowedException(Resources.WtiPipingSellmeijerRevisedKernelWrapper_NoInputObjectDefined); } } - - public void AddMessageToCalculationMessages(IKernelDataOutput kernelDataOutput, List logMessages) - { - var dataOutput = (WtiPipingSellmeijerRevisedOutput) kernelDataOutput; - LogMessage message = dataOutput.Message; - if (message != null) - { - logMessages.Add(message); - } - } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6895) @@ -372,6 +372,12 @@ } } + internal static string LocationSubSoilScenarioInformation { + get { + return ResourceManager.GetString("LocationSubSoilScenarioInformation", resourceCulture); + } + } + /// /// Looks up a localized string similar to No pl-lines object defined. /// Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 6895) @@ -172,11 +172,4 @@ /// /// DesignStrategy GetDesignStrategy(DamKernelInput damKernelInput); - - /// - /// Add the message from the to the . - /// - /// The kernel data output - /// The log messages. - void AddMessageToCalculationMessages(IKernelDataOutput kernelDataOutput, List logMessages); } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r6856 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 6856) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapperTests.cs (.../MacroStabilityInwardsKernelWrapperTests.cs) (revision 6895) @@ -590,25 +590,6 @@ } [Test] - public void TestAddMessageToCalculationMessages() - { - var kernelDataOutput = new MacroStabilityOutput(); - var message = new LogMessage - { - Message = "Warning during calculation", - MessageType = LogMessageType.Warning - }; - kernelDataOutput.Message = message; - var logMessages = new List(); - var kernelWrapper = new MacroStabilityInwardsKernelWrapper(); - - kernelWrapper.AddMessageToCalculationMessages(kernelDataOutput, logMessages); - - Assert.That(logMessages, Has.Count.EqualTo(1)); - Assert.That(logMessages[0], Is.EqualTo(message)); - } - - [Test] [SetUICulture("nl-NL")] public void TestLanguageNLThrowsExceptionWhenInputIsNull() { Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r6856 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 6856) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityInwards/MacroStabilityInwardsKernelWrapper.cs (.../MacroStabilityInwardsKernelWrapper.cs) (revision 6895) @@ -128,7 +128,7 @@ Waternet waterNet = MacroStabilityCommonHelper.CreateWaternet(damKernelInput, plLines); - if (FailureMechanismParametersMStab.MStabParameters.Model == StabilityModelType.UpliftVan + if (FailureMechanismParametersMStab.MStabParameters.Model == StabilityModelType.UpliftVan && !upliftSituation.IsUplift && FailureMechanismParametersMStab.MStabParameters.IsUpliftVanRunOnlyWhenUpliftOccurs) { return PrepareResult.NoUplift; @@ -148,7 +148,7 @@ PrepareResult firstPrepareResult = MacroStabilityCommonHelper.PrepareKernel(stabilityCalculator, fileNameForCalculation); - if (isBishopUpliftVan && (upliftSituation.IsUplift || !FailureMechanismParametersMStab.MStabParameters.IsUpliftVanRunOnlyWhenUpliftOccurs) + if (isBishopUpliftVan && (upliftSituation.IsUplift || !FailureMechanismParametersMStab.MStabParameters.IsUpliftVanRunOnlyWhenUpliftOccurs) && firstPrepareResult == PrepareResult.Successful) { model = StabilityModelType.UpliftVan; @@ -271,7 +271,7 @@ { AddDesignResultNoRun(damKernelInput, designScenario, designResults, macroStabilityOutput); } - + bool isBishopUpliftVan = FailureMechanismParametersMStab.MStabParameters.Model == StabilityModelType.BishopUpliftVan; if (isBishopUpliftVan) { @@ -309,7 +309,7 @@ } else { - index = 0; + index = 0; } } else if (designResults[1].CalculationResult == CalculationResult.NoRun) @@ -392,7 +392,7 @@ double fosRequired = damKernelInput.Location.CurrentScenario.RequiredSafetyFactorStabilityInnerSlope; if (macroStabilityOutput != null) { - MacroStabilityOutputItem leadingStabilityOutputItem = DetemineLeadingOutputItem(macroStabilityOutput.StabilityOutputItems); + MacroStabilityOutputItem leadingStabilityOutputItem = DetermineLeadingOutputItem(macroStabilityOutput.StabilityOutputItems); // Abort if calculation failed if ((leadingStabilityOutputItem == null) || (leadingStabilityOutputItem.CalculationResult != CalculationResult.Succeeded)) { @@ -512,6 +512,7 @@ { designResultUpliftNoRun.StabilityDesignResults.ResultMessage = Resources.MacroStabilityInwardsKernelWrapper_AddDesignResultNoRun_No_uplift; } + if (designResults.Count > 0 && designResults[0].CalculationSubDir != null) { designResultUpliftNoRun.CalculationSubDir = designResults.Count == 1 ? designResults[0].CalculationSubDir.Replace(StabilityModelType.Bishop.ToString(), StabilityModelType.UpliftVan.ToString()) : ""; @@ -538,7 +539,7 @@ } } - private static MacroStabilityOutputItem DetemineLeadingOutputItem(List stabilityOutputItems) + private static MacroStabilityOutputItem DetermineLeadingOutputItem(List stabilityOutputItems) { if (stabilityOutputItems.Count == 1) { @@ -566,14 +567,4 @@ return macroStabilityOutputItem; } - - public void AddMessageToCalculationMessages(IKernelDataOutput kernelDataOutput, List logMessages) - { - var dataOutput = (MacroStabilityOutput) kernelDataOutput; - LogMessage message = dataOutput.Message; - if (message != null) - { - logMessages.Add(message); - } - } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r6851 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6851) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6895) @@ -312,5 +312,8 @@ No uplift - + + + Location '{0}', subsoil scenario '{1}', design scenario '{2}': + \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs =================================================================== diff -u -r6404 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 6404) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 6895) @@ -20,13 +20,16 @@ // All rights reserved. using System; +using System.Collections.Generic; using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces; using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityInwards; using Deltares.DamEngine.Calculators.KernelWrappers.MacroStabilityOutwards; using Deltares.DamEngine.Calculators.KernelWrappers.WtiPipingBligh; using Deltares.DamEngine.Calculators.KernelWrappers.WtiPipingSellmeijerRevised; +using Deltares.DamEngine.Calculators.Properties; using Deltares.DamEngine.Data.General; using Deltares.DamEngine.Data.Standard; +using Deltares.DamEngine.Data.Standard.Logging; namespace Deltares.DamEngine.Calculators.KernelWrappers.Common; @@ -90,4 +93,31 @@ return kernelWrapper; } + + public static void AddKernelOutputMessageToLogMessages(string location, SoilGeometryProbability soilProfile, + string scenario, IKernelDataOutput kernelDataOutput, List logMessages) + { + LogMessage message = null; + if (kernelDataOutput is MacroStabilityOutput macroStabilityOutput) + { + message = macroStabilityOutput.Message; + } + + if (kernelDataOutput is WtiPipingBlighOutput wtiPipingBlighOutput) + { + message = wtiPipingBlighOutput.Message; + } + + if (kernelDataOutput is WtiPipingSellmeijerRevisedOutput wtiPipingSellmeijerRevisedOutput) + { + message = wtiPipingSellmeijerRevisedOutput.Message; + } + + if (message != null) + { + string textBeforeMessage = string.Format(Resources.LocationSubSoilScenarioInformation, location, soilProfile, scenario); + message.Message = textBeforeMessage + message.Message; + logMessages.Add(message); + } + } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r6877 -r6895 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6877) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6895) @@ -302,11 +302,14 @@ Locatie {0} Profiel {1} Scenario {2} is niet relevant (ander berekeningstype of geen uplift bij gebruik van piping). - + Locatie {0} Profiel {1} Scenario {2} is niet berekend omdat er geen uplift is bij gebruik van UpliftVan. - + Geen opdrijven - + + + Locatie '{0}', ondergrond scenario '{1}', ontwerp scenario '{2}': + \ No newline at end of file