Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/ConversionHelperTests.cs =================================================================== diff -u -r2963 -r2966 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 2963) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/MacroStabilityCommon/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 2966) @@ -152,7 +152,6 @@ #region Soil [Test] - [Category(Categories.WorkInProgress)] public void GivenMacroStabilitySoilWhenConvertingToDamSoilAndBackThenResultEqualsOriginal() { // Given MacroStability Soil @@ -166,11 +165,11 @@ Dilatancy = -1.04, // -Phi (FrictionAngle) RRatio = 1.05, RatioCuPc = 1.06, - RheologicalCoefficient = 1.07, + //RheologicalCoefficient = 1.07, Not yet to be used ShearStrengthModel = MacroStability.CSharpWrapper.Input.ShearStrengthModel.CPhiOrCuCalculated, StrengthIncreaseExponent = 1.08, - UseSoilClassification = true, - BondStressCurve = null + UseSoilClassification = false, // must be false + BondStressCurve = null // must be null }; // When Converting to DamSoil and back @@ -180,9 +179,6 @@ // Then result equals original var compare = new CompareLogic { Config = { MaxDifferences = 100 } }; var result = compare.Compare(macroStabilitySoil, actualMacroStabilitySoil); - // For now, 3 errors are expected (RRatio, RheologicalCoefficient and StrengthIncreaseExponent). - Assert.AreEqual(3, result.Differences.Count, "Unexpected differences found converting/reconverting Soil"); - // But in future, this must succeed. then remove lines above and adapt text below Assert.AreEqual(0, result.Differences.Count, "Differences found converting/reconverting Soil but this ok now if diff = 3"); } #endregion Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs =================================================================== diff -u -r2963 -r2966 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2963) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2966) @@ -190,13 +190,13 @@ BelowPhreaticLevel = soil.BelowPhreaticLevel, Cohesion = soil.Cohesion, FrictionAngle = soil.FrictionAngle, - RRatio = 0.0, // TODO find the correct parameter + RRatio = soil.RRatio, RatioCuPc = soil.RatioCuPc, - ShearStrengthModel = ShearStrengthModelKernel.CPhi, // Set Cphi as default - RheologicalCoefficient = 0.0, // TODO find the correct parameter - StrengthIncreaseExponent = 0.0, // TODO find the correct parameter - UseSoilClassification = true,// TODO find the correct parameter - BondStressCurve = null // TODO find the correct parameter + ShearStrengthModel = ConversionHelper.ConvertToMacroStabilityShearStrengthModel(soil.ShearStrengthModel.Value), + //RheologicalCoefficient = 0.0, // is purely needed for Nails which are NOT yet to be implemented + StrengthIncreaseExponent = soil.StrengthIncreaseExponent, + UseSoilClassification = false, // Soil type is not given so make sure it is not used. + BondStressCurve = null // these are not supported in DAM so set to null. }; if (soil.ShearStrengthModel != null) { @@ -234,12 +234,10 @@ FrictionAngle = soil.FrictionAngle, RRatio = soil.RRatio, RatioCuPc = soil.RatioCuPc, - // RheologicalCoefficient = 1.07, + // RheologicalCoefficient = 1.07, // is purely needed for Nails which are NOT yet to be implemented ShearStrengthModel = ConvertToDamShearStrengthModel(soil.ShearStrengthModel), StrengthIncreaseExponent = soil.StrengthIncreaseExponent, - // UseSoilType = true, - - // Following parameters are not available in MacroStability soil and will not be translated + // Following parameters are not available in MacroStability soil and will not be translated (they are for Piping). //CuBottom = 0.00, //DiameterD70 = 0.00, //CuTop = 0.00,