Index: dam engine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj =================================================================== diff -u -r624 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 624) +++ dam engine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 669) @@ -80,14 +80,12 @@ - - Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStability/MStabXmlDoc.cs =================================================================== diff -u -r578 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStability/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 578) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStability/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 669) @@ -186,13 +186,6 @@ double xCoordinateLastUpliftPoint = isUplift ? upliftLocationAndResult.X : currentSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; - var nonWaterRetaining2 = currentSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint2); - if (nonWaterRetaining2 != - null) - { - xCoordinateLastUpliftPoint = - nonWaterRetaining2.X; - } failureMechanismeParamatersMStab.MStabParameters.SlipCircleDefinition.XCoordinateLastUpliftPoint = xCoordinateLastUpliftPoint; } Index: dam engine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs =================================================================== diff -u -r595 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs (.../Dike.cs) (revision 595) +++ dam engine/trunk/src/Deltares.DamEngine.Data/General/Dike.cs (.../Dike.cs) (revision 669) @@ -25,7 +25,6 @@ using System.Linq; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General.Gauges; -using Deltares.DamEngine.Data.General.NWO; using Deltares.DamEngine.Data.General.PlLines; using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Data.Standard; @@ -76,7 +75,6 @@ private SoilList soilList; private IList gauges = new List(); private IList gaugePLLines = new List(); - private IList nonWaterRetainingObjects; private IList soilProfiles; private IList soilProfiles2D; private string soilDatabaseName = ""; @@ -97,7 +95,6 @@ SurfaceLines2 = new List(); pl1Lines = new List(); soilList = new SoilList(); - nonWaterRetainingObjects = new List(); removeStiFiles = true; } @@ -208,12 +205,6 @@ set { this.gaugePLLines = value; } } - public virtual IList NonWaterRetainingObjects - { - get { return this.nonWaterRetainingObjects; } - set { this.nonWaterRetainingObjects = value; } - } - public bool UsesGauges { get { return this.GaugePLLines != null && this.GaugePLLines.Count > 0 && this.Gauges != null; } } public virtual List Scenarios Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs =================================================================== diff -u -r599 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs (.../DAMFailureMechanismeCalculator.cs) (revision 599) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DAMFailureMechanismeCalculator.cs (.../DAMFailureMechanismeCalculator.cs) (revision 669) @@ -25,14 +25,10 @@ using System.IO; using System.Linq; using System.Reflection; -using System.Text.RegularExpressions; -using System.Xml.Linq; -using System.Xml.Serialization; using Deltares.DamEngine.Calculators.Dikes_Design; using Deltares.DamEngine.Calculators.General; using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; -using Deltares.DamEngine.Data.General.NWO; using Deltares.DamEngine.Data.General.Results; using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Geotechnics; @@ -86,8 +82,6 @@ public string MapForSoilGeometries2D { get; set; } - public NonWaterRetainingObject NonWaterRetainingObject { get; set; } - public List ErrorMessages { get @@ -118,10 +112,7 @@ case AnalysisType.AdaptGeometry: RedesignSurfaceLinesForAllScenarios(scenario); - break; - case AnalysisType.AdaptNWO: - ImplementNWOInSurfaceLinesForAllScenarios(scenario); - break; + break; } } @@ -473,35 +464,10 @@ // { // stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile1D, GetFullSoilGeometry2DName(soilProfileProbability.StiFileName), iter); // MStabResults? mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile1D, soilProfileProbability.StiFileName); -// if ((mStabResults != null) && (AnalysisType.AdaptNWO == analysisType)) -// { -// // Store the NWO results -// stabilityCalculator.NWOPhreaticAdaption = NonWaterRetainingObject.PhreaticAdaption; -// var results = new NonWaterRetainingObjectResults(); -// results.NwoId = NonWaterRetainingObject.NwoId; -// var coordinateSystemConverter = new CoordinateSystemConverter(); -// coordinateSystemConverter.DefineGlobalXYZBasedOnLine(scenario.Location.SurfaceLine2.Geometry); -// results.AdaptedSurfaceLine = scenario.Location.LocalXZSurfaceLine2.FullDeepClone(); -// coordinateSystemConverter.ConvertLocalXZToGlobalXYZ(results.AdaptedSurfaceLine.Geometry); -// results.LocationXrdStart = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint1).X; -// results.LocationYrdStart = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint1).Y; -// results.LocationZrdStart = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint1).Z; -// results.LocationXrdEnd = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint4).X; -// results.LocationYrdEnd = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint4).Y; -// results.LocationZrdEnd = results.AdaptedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint4).Z; -// -// results.MStabResults = mStabResults.Value; -// results.SoilProfileProbability = soilProfileProbability; -// scenario.NwoResults.Add(results); -// } // } -// // assign original surfaceline to redesigned surfaceline (not for NWODesign as that would provide wrong surface line) -// if (analysisType != AnalysisType.AdaptNWO) -// { -// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, +// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile1D, // soilProfileProbability.StiFileName, // scenario.Location.SurfaceLine2); -// } // } // catch (DamFailureMechanismeCalculatorException calculatorException) // { @@ -567,28 +533,6 @@ return !isSkipCalculation; } - /// - /// - /// - /// - private void ImplementNWOInSurfaceLinesForAllScenarios(DesignScenario scenario) - { -// try -// { -// ImplementNWOInSurfaceLine(scenario); -// } -// catch (Exception exception) -// { -// scenario.Errors.Add(exception.Message); -// Exception innerException = exception.InnerException; -// while (innerException != null) -// { -// scenario.Errors.Add(innerException.Message); -// innerException = innerException.InnerException; -// } -// } - } - // private void CalculateScenario(Scenario scenario, int iter) // { // switch (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType) @@ -609,95 +553,6 @@ /// /// /// - /// -// private double? ImplementNWOInSurfaceLine(Scenario scenario) -// { -// double? safetyFactor = null; -// -// if (scenario.Location != null) -// { -// SurfaceLine2 originalLocalXzSurfaceLine = scenario.Location.LocalXZSurfaceLine2.FullDeepClone(); -// try -// { -// // fit the non water retaining object in the current surfaceline. If it does (no longer) fit, surfaceline is returned as null and -// // the calculation is finished. The phreaticline may have to be adapted to the new surfaceline. -// -// var nwoInSurfacleLine = new NonWaterRetainingObjectInSurfaceLine(); -// nwoInSurfacleLine.NonWaterRetainingObject = NonWaterRetainingObject; -// nwoInSurfacleLine.SurfaceLine = scenario.Location.LocalXZSurfaceLine2; -// nwoInSurfacleLine.GridPosition = damFailureMechanismeCalculationSpecification.FailureMechanismeParamatersMStab.MStabParameters.GridPosition; -// nwoInSurfacleLine.StepSizeX = NonWaterRetainingObject.StepSizeX; -// double fitPositionX = nwoInSurfacleLine.DetermineStartLocationForNonWaterRetainingObject(true); -// if (nwoInSurfacleLine.DoesPositionXFitInSurfaceLine(fitPositionX)) -// { -// var iter = 0; -// bool doneFittingNWO = false; -// while (!doneFittingNWO) -// { -// // try to fit NWO in surfaceline. If successfull, calculate it, else this is finished. -// SurfaceLine2 localXzSurfaceLine = nwoInSurfacleLine.FitNonWaterRetainingObjectInSurfaceLine(fitPositionX); -// if (localXzSurfaceLine != null) -// { -// var validationError = localXzSurfaceLine.Validate().FirstOrDefault(vr => vr.MessageType == ValidationResultType.Error); -// if (validationError != null) -// { -// localXzSurfaceLine.Dispose(); -// throw new SurfaceLineException(validationError.Text); -// } -// -// scenario.Location.LocalXZSurfaceLine2.Dispose(); -// scenario.Location.LocalXZSurfaceLine2 = localXzSurfaceLine; -// // calculate with this surfaceline and store the results. -// CalculateScenario(scenario, iter); -// // Get new fitPositionX (based on stepsize X and gridposition) -// fitPositionX = nwoInSurfacleLine.DetermineNewFitPostionX(fitPositionX, true); -// iter++; -// } -// else -// { -// doneFittingNWO = true; -// } -// } -// -// if (iter > 0) -// { -// // restore the original surface line -// // Note: 'originalLocalXzSurfaceLine' is only used if now exception have occurred and -// scenario.Location.LocalXZSurfaceLine2 = originalLocalXzSurfaceLine; -// } -// else -// { -// throw new DamFailureMechanismeCalculatorException( -// "NonWaterRetainingObject does not fit within Surfaceline."); -// } -// } -// else -// { -// throw new DamFailureMechanismeCalculatorException( -// "NonWaterRetainingObject does not fit within Surfaceline."); -// } -// } -// catch (Exception e) -// { -// originalLocalXzSurfaceLine.Dispose(); // Clone has become an orphan, so dispose and discard -// -// // Add scenario if having a failure mechanism calculation exception: -// var calculatorException = e as DamFailureMechanismeCalculatorException; -// if (calculatorException != null) -// { -// calculatorException.Scenario = scenario; -// } -// throw; -// } -// } -// -// return safetyFactor; -// } - - /// - /// - /// - /// private void RedesignSurfaceLinesForAllScenarios(DesignScenario scenario) { // try Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/General/CalculationHelper.cs =================================================================== diff -u -r595 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/General/CalculationHelper.cs (.../CalculationHelper.cs) (revision 595) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/General/CalculationHelper.cs (.../CalculationHelper.cs) (revision 669) @@ -173,16 +173,12 @@ if (parameters.Model == MStabModelType.UpliftVan) { // Determine right side of slip plane grid (right grid) - // This is the location with the lowest uplift factor or, if present, the second NWO point + // This is the location with the lowest uplift factor SurfaceLine2 surfaceLine = location.SurfaceLine; var upliftLocationAndResult = GetLocationWithLowestUpliftFactor(surfaceLine, location.GetMostProbableProfile(FailureMechanismSystemType.StabilityInside), soilGeometry2DName, plLines, location); double upliftCriterion = location.UpliftCriterionStability.Value; bool isUplift = !(upliftLocationAndResult == null) && (upliftLocationAndResult.UpliftFactor < upliftCriterion); double xCoordinateLastUpliftPoint = isUplift ? upliftLocationAndResult.X : surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; - if (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint2) != null) - { - xCoordinateLastUpliftPoint = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint2).X; - } parameters.SlipCircleDefinition.XCoordinateLastUpliftPoint = xCoordinateLastUpliftPoint; } Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DamProjectCalculator.cs =================================================================== diff -u -r599 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DamProjectCalculator.cs (.../DamProjectCalculator.cs) (revision 599) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/General/DamProjectCalculator.cs (.../DamProjectCalculator.cs) (revision 669) @@ -406,11 +406,6 @@ dike.MapForSoilGeometries2D); damFailureMechanismeCalculator.CalculationBaseDirectory = CalculationBaseDirectory; - if (analysisType == AnalysisType.AdaptNWO) - { - damFailureMechanismeCalculator.NonWaterRetainingObject = dike.NonWaterRetainingObjects[0]; - } - if (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityInside || damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityOutside) { @@ -432,85 +427,25 @@ } var recordIndex = 0; - var firstNwoSoilProfileProbability = true; var validSoilProfileProbabilities = DamFailureMechanismeCalculator.SelectProbabilitiesForFailureMechanism( damFailureMechanismeCalculationSpecification.FailureMechanismSystemType, scenario.Location.Segment.SoilProfileProbabilities); foreach (var soilProfileProbability in validSoilProfileProbabilities) { - if (analysisType == AnalysisType.AdaptNWO) - { - if (firstNwoSoilProfileProbability) - { - // for NWO, only add results for every first soilProfileProbability as the others are already part of the nwo results. - foreach (var nwoResult in scenario.NwoResults) - { - var resultMessage = scenario.GetResultMessage( - nwoResult.SoilProfileProbability.SoilProfile1D, - nwoResult.SoilProfileProbability.StiFileName); - // The error message can contain "," and ";" and should therefor be surrounded with double quotes, so it will be read correctly as a scv file - damProjectCalculatorLogBuilder.Append( - @"""", - ++recordIndex, - " - ", - resultMessage, - " - ", - nwoResult.NwoId, - " - ", - nwoResult.LocationXrdStart, - " - ", - nwoResult.MStabResults.CalculationName, - @"""" - ); + // The error message can contain "," and ";" and should therefor be surrounded with double quotes, so it will be read correctly as a scv file + var resultMessage = scenario.GetResultMessage( + soilProfileProbability.SoilProfile1D, + soilProfileProbability.StiFileName); - scenario.CalculationResults.Add(damProjectCalculatorLogBuilder.Build(nwoResult.SoilProfileProbability, scenario.NwoResults.IndexOf(nwoResult))); - scenario.CalculationResult = CalculationResult.Succeeded; - } - foreach (var error in scenario.Errors) - { - damProjectCalculatorLogBuilder.Append(error); - scenario.CalculationResults.Add(damProjectCalculatorLogBuilder.Build(soilProfileProbability)); - scenario.CalculationResult = CalculationResult.Succeeded; - } - firstNwoSoilProfileProbability = false; - } - else - { - if (scenario.CalculationResult != CalculationResult.NoRun) - { - // The error message can contain "," and ";" and should therefor be surrounded with double quotes, so it will be read correctly as a csv file - string resultMessage = scenario.GetResultMessage(soilProfileProbability.SoilProfile1D, - soilProfileProbability.StiFileName); - damProjectCalculatorLogBuilder.Append( - @"""", - ++recordIndex, - " - ", - resultMessage, - @"""" - ); + damProjectCalculatorLogBuilder.Append( + @"""", + ++recordIndex, + " - ", + resultMessage, + @"""" + ); - scenario.CalculationResults.Add(damProjectCalculatorLogBuilder.Build(soilProfileProbability)); - } - scenario.CalculationResult = CalculationResult.Succeeded; - } - } - else - { - // The error message can contain "," and ";" and should therefor be surrounded with double quotes, so it will be read correctly as a scv file - var resultMessage = scenario.GetResultMessage( - soilProfileProbability.SoilProfile1D, - soilProfileProbability.StiFileName); - - damProjectCalculatorLogBuilder.Append( - @"""", - ++recordIndex, - " - ", - resultMessage, - @"""" - ); - - scenario.CalculationResults.Add(damProjectCalculatorLogBuilder.Build(soilProfileProbability, damFailureMechanismeCalculationSpecification.StabilityKernelType)); - scenario.CalculationResult = CalculationResult.Succeeded; - } + scenario.CalculationResults.Add(damProjectCalculatorLogBuilder.Build(soilProfileProbability, damFailureMechanismeCalculationSpecification.StabilityKernelType)); + scenario.CalculationResult = CalculationResult.Succeeded; } } catch (Exception exception) @@ -726,7 +661,6 @@ { return SelectStabilityNormativeResultDeterministicNormal(liftVanCalculationResult, bishopCalculationRecord); } - case AnalysisType.AdaptNWO: case AnalysisType.AdaptGeometry: { return SelectStabilityNormativeResultDeterministicDesign(liftVanCalculationResult, bishopCalculationRecord); Index: dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs =================================================================== diff -u -r660 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 660) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 669) @@ -41,8 +41,7 @@ {InputDamProjectType.Assessment, DamProjectType.Assessment}, {InputDamProjectType.AssessmentRegional, DamProjectType.AssessmentRegional}, {InputDamProjectType.Design, DamProjectType.Design}, - {InputDamProjectType.Operational, DamProjectType.Operational}, - {InputDamProjectType.NWO, DamProjectType.NWO} + {InputDamProjectType.Operational, DamProjectType.Operational} }; return translationTable[inputDamProjectType]; } @@ -58,8 +57,7 @@ {DamProjectType.Assessment, InputDamProjectType.Assessment}, {DamProjectType.AssessmentRegional, InputDamProjectType.AssessmentRegional}, {DamProjectType.Design, InputDamProjectType.Design}, - {DamProjectType.Operational, InputDamProjectType.Operational}, - {DamProjectType.NWO, InputDamProjectType.NWO} + {DamProjectType.Operational, InputDamProjectType.Operational} }; return translationTable[damProjectType]; } Fisheye: Tag 669 refers to a dead (removed) revision in file `dam engine/trunk/src/Deltares.DamEngine.Data/General/Results/NwoDesignResults.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs =================================================================== diff -u -r580 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 580) +++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 669) @@ -35,7 +35,6 @@ [TestCase(InputDamProjectType.AssessmentRegional, DamProjectType.AssessmentRegional)] [TestCase(InputDamProjectType.Design, DamProjectType.Design)] [TestCase(InputDamProjectType.Operational, DamProjectType.Operational)] - [TestCase(InputDamProjectType.NWO, DamProjectType.NWO)] public void CanConvertToDamProjectType(InputDamProjectType inputDamProjectType, DamProjectType damProjectType) { Assert.AreEqual(damProjectType, ConversionHelper.ConvertToDamProjectType(inputDamProjectType)); @@ -46,7 +45,6 @@ [TestCase(DamProjectType.AssessmentRegional, InputDamProjectType.AssessmentRegional)] [TestCase(DamProjectType.Design, InputDamProjectType.Design)] [TestCase(DamProjectType.Operational, InputDamProjectType.Operational)] - [TestCase(DamProjectType.NWO, InputDamProjectType.NWO)] public void CanConvertToInputDamProjectType(DamProjectType damProjectType, InputDamProjectType inputDamProjectType) { Assert.AreEqual(inputDamProjectType, ConversionHelper.ConvertToInputDamProjectType(damProjectType)); Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PLLinesCreator.cs =================================================================== diff -u -r630 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PLLinesCreator.cs (.../PLLinesCreator.cs) (revision 630) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PLLinesCreator.cs (.../PLLinesCreator.cs) (revision 669) @@ -1745,49 +1745,12 @@ } var isDitchPresent = (ditchDikeSidePoint != null); - var isNonWaterRetainingOjectPresent = ((NWOPhreaticAdaption != null) && surfaceLine.HasAnnotation(CharacteristicPointType.NonWaterRetainingObjectPoint1)); - var adjustDitch = false; - // Handle making the waterlevel horizontal in the NWO at the Polderside when needed (For Riverside see AdaptPL1ForNonWaterRetainingObject). - var nonWaterRetainingGeometryPoint = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint1); - if (isNonWaterRetainingOjectPresent && (NWOPhreaticAdaption != PhreaticAdaptionType.Fill) && - (nonWaterRetainingGeometryPoint.X >= surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X)) + + // if there is a ditch, then adjust it. + if (isDitchPresent) { - // if there is a ditch and it is to the left of the NWO, then only the ditch needs to be adjusted and the NWO will be correct automatically. - // if there is a ditch but it is to the right of the NWO, the NWO needs adjusting and the Ditch will be correct automatically. - // if there is no ditch then the NWO needs adjusting. - if (isDitchPresent) - { - adjustDitch = (nonWaterRetainingGeometryPoint.X >= surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchPolderSide).X); - } - if (!adjustDitch) - { - GeometryPoint nw1 = nonWaterRetainingGeometryPoint; - int surfacePointIndex = surfaceLine.Geometry.Points.IndexOf(nw1); - AdjustForDitchAndOrNonWaterRetainingObjectatPolderSide(phreaticLine, surfacePointIndex); - } - } - else - { - // No (relevant) NWO so enable handling of ditch. - // If there is a ditch but there is also a NWO to the right of it at polder side, then do not adjust the ditch. Do in all other cases. - // First see if there is a NWO. - adjustDitch = !isNonWaterRetainingOjectPresent; - if (!adjustDitch) - { - // there is a NWO, check the position - adjustDitch = - !((isDitchPresent) && - (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint1).X >= - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X) && - (surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.NonWaterRetainingObjectPoint4).X <= - surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DitchDikeSide).X)); - } - } - // if the NWO is not there or irrelevant and there is a ditch, then adjust it. - if ((adjustDitch) && (isDitchPresent)) - { int surfacePointIndex = surfaceLine.Geometry.Points.IndexOf(ditchDikeSidePoint); - AdjustForDitchAndOrNonWaterRetainingObjectatPolderSide(phreaticLine, surfacePointIndex); + AdjustForDitchatPolderSide(phreaticLine, surfacePointIndex); } else { @@ -1797,13 +1760,10 @@ // After a renewed discussion with Vastenburg, Van der Zwan and Bka, it has been decided that the PL1 should follow the // surfaceline (with offset) until either end of surface line or polder level. Note: this is only needed when the phreatic level // at dike toe is above polder level. - if ((!isNonWaterRetainingOjectPresent) && (!isDitchPresent)) + if (phreaticLine.Points[phreaticLine.Points.Count - 1].Z > WaterLevelPolder) { - if (phreaticLine.Points[phreaticLine.Points.Count - 1].Z > WaterLevelPolder) - { - AddPhreaticLineAlongSurfaceLevel(phreaticLine); - } - } + AddPhreaticLineAlongSurfaceLevel(phreaticLine); + } } //Validate if endpoint surface has reached @@ -1847,7 +1807,7 @@ } } - private void AdjustForDitchAndOrNonWaterRetainingObjectatPolderSide(PLLine phreaticLine, int surfacePointIndex) + private void AdjustForDitchatPolderSide(PLLine phreaticLine, int surfacePointIndex) { const double maxDouble = 99999.999; var phreaticPolderPartialLine = new Line(); Index: dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs =================================================================== diff -u -r631 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 631) +++ dam engine/trunk/src/Deltares.DamEngine.Io/DamInput.cs (.../DamInput.cs) (revision 669) @@ -219,10 +219,8 @@ private object operationalOptionsField; - private object designOptionsField; + private LocationDesignOptions designOptionsField; - private object nWOOptionsField; - private LocationWaternetOptions waternetOptionsField; private LocationGeneral generalField; @@ -268,7 +266,7 @@ } /// - public object DesignOptions { + public LocationDesignOptions DesignOptions { get { return this.designOptionsField; } @@ -278,16 +276,6 @@ } /// - public object NWOOptions { - get { - return this.nWOOptionsField; - } - set { - this.nWOOptionsField = value; - } - } - - /// public LocationWaternetOptions WaternetOptions { get { return this.waternetOptionsField; @@ -1297,6 +1285,431 @@ [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class LocationDesignOptions { + + private bool redesignDikeHeightField; + + private bool redesignDikeShoulderField; + + private string shoulderEmbankmentMaterialField; + + private double stabilityShoulderGrowSlopeField; + + private double stabilityShoulderGrowDeltaXField; + + private double stabilitySlopeAdaptionDeltaXField; + + private double slopeAdaptionStartCotangentField; + + private double slopeAdaptionEndCotangentField; + + private double slopeAdaptionStepCotangentField; + + private double newDikeTopWidthField; + + private bool newDikeTopWidthFieldSpecified; + + private double newDikeSlopeInsideField; + + private bool newDikeSlopeInsideFieldSpecified; + + private double newDikeSlopeOutsideField; + + private bool newDikeSlopeOutsideFieldSpecified; + + private double newShoulderTopSlopeField; + + private bool newShoulderTopSlopeFieldSpecified; + + private double newShoulderBaseSlopeField; + + private bool newShoulderBaseSlopeFieldSpecified; + + private double newMaxHeightShoulderAsFractionField; + + private bool newMaxHeightShoulderAsFractionFieldSpecified; + + private double newMinDistanceDikeToeStartDitchField; + + private bool newMinDistanceDikeToeStartDitchFieldSpecified; + + private bool useNewDitchDefinitionField; + + private double newWidthDitchBottomField; + + private bool newWidthDitchBottomFieldSpecified; + + private double newSlopeAngleDitchField; + + private bool newSlopeAngleDitchFieldSpecified; + + private double newDepthDitchField; + + private bool newDepthDitchFieldSpecified; + + private LocationDesignOptionsStabilityDesignMethod stabilityDesignMethodField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool RedesignDikeHeight { + get { + return this.redesignDikeHeightField; + } + set { + this.redesignDikeHeightField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool RedesignDikeShoulder { + get { + return this.redesignDikeShoulderField; + } + set { + this.redesignDikeShoulderField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ShoulderEmbankmentMaterial { + get { + return this.shoulderEmbankmentMaterialField; + } + set { + this.shoulderEmbankmentMaterialField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double StabilityShoulderGrowSlope { + get { + return this.stabilityShoulderGrowSlopeField; + } + set { + this.stabilityShoulderGrowSlopeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double StabilityShoulderGrowDeltaX { + get { + return this.stabilityShoulderGrowDeltaXField; + } + set { + this.stabilityShoulderGrowDeltaXField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double StabilitySlopeAdaptionDeltaX { + get { + return this.stabilitySlopeAdaptionDeltaXField; + } + set { + this.stabilitySlopeAdaptionDeltaXField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double SlopeAdaptionStartCotangent { + get { + return this.slopeAdaptionStartCotangentField; + } + set { + this.slopeAdaptionStartCotangentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double SlopeAdaptionEndCotangent { + get { + return this.slopeAdaptionEndCotangentField; + } + set { + this.slopeAdaptionEndCotangentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double SlopeAdaptionStepCotangent { + get { + return this.slopeAdaptionStepCotangentField; + } + set { + this.slopeAdaptionStepCotangentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewDikeTopWidth { + get { + return this.newDikeTopWidthField; + } + set { + this.newDikeTopWidthField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewDikeTopWidthSpecified { + get { + return this.newDikeTopWidthFieldSpecified; + } + set { + this.newDikeTopWidthFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewDikeSlopeInside { + get { + return this.newDikeSlopeInsideField; + } + set { + this.newDikeSlopeInsideField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewDikeSlopeInsideSpecified { + get { + return this.newDikeSlopeInsideFieldSpecified; + } + set { + this.newDikeSlopeInsideFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewDikeSlopeOutside { + get { + return this.newDikeSlopeOutsideField; + } + set { + this.newDikeSlopeOutsideField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewDikeSlopeOutsideSpecified { + get { + return this.newDikeSlopeOutsideFieldSpecified; + } + set { + this.newDikeSlopeOutsideFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewShoulderTopSlope { + get { + return this.newShoulderTopSlopeField; + } + set { + this.newShoulderTopSlopeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewShoulderTopSlopeSpecified { + get { + return this.newShoulderTopSlopeFieldSpecified; + } + set { + this.newShoulderTopSlopeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewShoulderBaseSlope { + get { + return this.newShoulderBaseSlopeField; + } + set { + this.newShoulderBaseSlopeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewShoulderBaseSlopeSpecified { + get { + return this.newShoulderBaseSlopeFieldSpecified; + } + set { + this.newShoulderBaseSlopeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewMaxHeightShoulderAsFraction { + get { + return this.newMaxHeightShoulderAsFractionField; + } + set { + this.newMaxHeightShoulderAsFractionField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewMaxHeightShoulderAsFractionSpecified { + get { + return this.newMaxHeightShoulderAsFractionFieldSpecified; + } + set { + this.newMaxHeightShoulderAsFractionFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewMinDistanceDikeToeStartDitch { + get { + return this.newMinDistanceDikeToeStartDitchField; + } + set { + this.newMinDistanceDikeToeStartDitchField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewMinDistanceDikeToeStartDitchSpecified { + get { + return this.newMinDistanceDikeToeStartDitchFieldSpecified; + } + set { + this.newMinDistanceDikeToeStartDitchFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool UseNewDitchDefinition { + get { + return this.useNewDitchDefinitionField; + } + set { + this.useNewDitchDefinitionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewWidthDitchBottom { + get { + return this.newWidthDitchBottomField; + } + set { + this.newWidthDitchBottomField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewWidthDitchBottomSpecified { + get { + return this.newWidthDitchBottomFieldSpecified; + } + set { + this.newWidthDitchBottomFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewSlopeAngleDitch { + get { + return this.newSlopeAngleDitchField; + } + set { + this.newSlopeAngleDitchField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewSlopeAngleDitchSpecified { + get { + return this.newSlopeAngleDitchFieldSpecified; + } + set { + this.newSlopeAngleDitchFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double NewDepthDitch { + get { + return this.newDepthDitchField; + } + set { + this.newDepthDitchField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NewDepthDitchSpecified { + get { + return this.newDepthDitchFieldSpecified; + } + set { + this.newDepthDitchFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public LocationDesignOptionsStabilityDesignMethod StabilityDesignMethod { + get { + return this.stabilityDesignMethodField; + } + set { + this.stabilityDesignMethodField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum LocationDesignOptionsStabilityDesignMethod { + + /// + OptimizedSlopeAndShoulderAdaption, + + /// + SlopeAdaptionBeforeShoulderAdaption, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] public partial class LocationWaternetOptions { private LocationWaternetOptionsPhreaticLineCreationMethod phreaticLineCreationMethodField; @@ -2404,9 +2817,6 @@ /// Design, - - /// - NWO, } /// Index: dam engine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointType.cs =================================================================== diff -u -r452 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointType.cs (.../CharacteristicPointType.cs) (revision 452) +++ dam engine/trunk/src/Deltares.DamEngine.Data/Geotechnics/CharacteristicPointType.cs (.../CharacteristicPointType.cs) (revision 669) @@ -113,26 +113,6 @@ DitchPolderSide = 19, // Insteek sloot polderzijde /// - /// First point of NWO (top left) - /// - NonWaterRetainingObjectPoint1 = 20, - - /// - /// Second point of NWO (bottom left) - /// - NonWaterRetainingObjectPoint2 = 21, - - /// - /// Third point of NWO (bottom right) - /// - NonWaterRetainingObjectPoint3 = 23, - - /// - /// Fourth point of NWO (top right) - /// - NonWaterRetainingObjectPoint4 = 24, - - /// /// The surface level inside /// SurfaceLevelInside = 25, // Maaiveld binnenwaarts Index: dam engine/trunk/src/Deltares.DamEngine.Data/General/DAMEnumerations.cs =================================================================== diff -u -r599 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Data/General/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 599) +++ dam engine/trunk/src/Deltares.DamEngine.Data/General/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 669) @@ -50,9 +50,7 @@ Assessment, AssessmentRegional, // #Bka: was/is: Assessment + type = regional. Not yet properly replaced Operational, - Design, - // TODO: NWO obsolete - NWO + Design } public enum ProgramType @@ -86,9 +84,7 @@ public enum AnalysisType { NoAdaption, - AdaptGeometry, - // TODO: NWO obsolete - AdaptNWO + AdaptGeometry }; public enum FailureMechanismSystemType Index: dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/InputFile.xml =================================================================== diff -u -r613 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/InputFile.xml (.../InputFile.xml) (revision 613) +++ dam engine/trunk/src/Deltares.DamEngine.Interface.Tests/TestFiles/InputFile.xml (.../InputFile.xml) (revision 669) @@ -1,28 +1,28 @@ - + - - - + + + - + - - - + + + - + - - - + + + Index: dam engine/trunk/src/Deltares.DamEngine.Interface/EngineInterface.cs =================================================================== diff -u -r520 -r669 --- dam engine/trunk/src/Deltares.DamEngine.Interface/EngineInterface.cs (.../EngineInterface.cs) (revision 520) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/EngineInterface.cs (.../EngineInterface.cs) (revision 669) @@ -163,7 +163,6 @@ { case DamProjectType.Assessment: case DamProjectType.AssessmentRegional: - case DamProjectType.NWO: case DamProjectType.Operational: throw new NotImplementedException(); case DamProjectType.Design: Fisheye: Tag 669 refers to a dead (removed) revision in file `dam engine/trunk/src/Deltares.DamEngine.Data/General/NWO/NonWaterRetainingObject.cs'. Fisheye: No comparison available. Pass `N' to diff?