Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs =================================================================== diff -u -r3893 -r4000 --- DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 3893) +++ DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 4000) @@ -36,17 +36,207 @@ /// public static class ConversionHelper { + public const int CpNone = 0; // + public const int CpSurfaceLevelOutside = 1; // Maaiveld buitenwaarts + public const int CpDikeToeAtRiver = 5; // Teen dijk buitenwaarts + public const int CpShoulderTopOutside = 6; // Kruin buitenberm + public const int CpShoulderBaseOutside = 7; // Insteek buitenberm + public const int CpDikeTopAtRiver = 8; // Kruin buitentalud + public const int CpDikeLine = 9; // referentielijn + public const int CpTrafficLoadOutside = 10; // Verkeersbelasting kant buitenwaarts + public const int CpTrafficLoadInside = 11; // Verkeersbelasting kant binnenwaarts + public const int CpDikeTopAtPolder = 12; // Kruin binnentalud + public const int CpShoulderBaseInside = 13; // Insteek binnenberm + public const int CpShoulderTopInside = 14; // Kruin binnenberm + public const int CpDikeToeAtPolder = 15; // Teen dijk binnenwaarts + public const int CpDitchDikeSide = 16; // Insteek sloot dijkzijde + public const int CpBottomDitchDikeSide = 17; // Slootbodem dijkzijde + public const int CpBottomDitchPolderSide = 18; // Slootbodem polderzijde + public const int CpDitchPolderSide = 19; // Insteek sloot polderzijde + public const int CpSurfaceLevelInside = 25; // Maaiveld binnenwaarts + + public const int InputFailureMechanismStabilityInside = 0; + public const int InputFailureMechanismStabilityOutside = 1; + public const int InputFailureMechanismPiping = 2; + + public const int InputSegmentFailureMechanismAll = 0; + public const int InputSegmentFailureMechanismStability = 1; + public const int InputSegmentFailureMechanismPiping = 2; + public const int InputSegmentFailureMechanismLiquefaction = 3; + /// + /// The input zone type no zones + /// + public const int InputZoneTypeNoZones = 0; + + /// + /// The input zone type old zone area, this now translates to No Zones as Zone Area is no longer to be used. + /// + public const int InputZoneTypeOldZoneArea = 1; + + /// + /// The input zone types forbidden zones + /// + public const int InputZoneTypesForbiddenZones = 2; + + /// + /// The input search method grid + /// + public const int InputSearchMethodGrid = 0; + + /// + /// The input search method genetic + /// + public const int InputSearchMethodGenetic = 1; + + /// + /// The input search method BeeSwarm + /// + public const int InputSearchMethodBeeSwarm = 2; + + /// + /// The input grid type automatic + /// + public const int InputGridTypeAutomatic = 0; + + /// + /// The input grid type specified + /// + public const int InputGridTypeSpecified = 1; + + /// + /// The input tangent lines on boundaty lines + /// + public const int InputTangentLinesOnBoundaryLines = 0; + + /// + /// The input tangent lines specified + /// + public const int InputTangentLinesSpecified = 1; + + /// + /// The m stab model type bishop + /// + public const int MStabModelTypeBishop = 0; + + /// + /// The m stab model type spencer + /// + public const int MStabModelTypeSpencer = 1; + + /// + /// The m stab model type fellenius + /// + public const int MStabModelTypeFellenius = 2; + + /// + /// The m stab model type uplift van + /// + public const int MStabModelTypeUpliftVan = 3; + + /// + /// The m stab model type uplift spencer + /// + public const int MStabModelTypeUpliftSpencer = 4; + + /// + /// The m stab model type bishop random field + /// + public const int MStabModelTypeBishopRandomField = 5; + + /// + /// The m stab model type horizontal balance + /// + public const int MStabModelTypeHorizontalBalance = 6; + + /// + /// The m stab model type bishop uplift van + /// + public const int MStabModelTypeBishopUpliftVan = 7; + + /// + /// The m stab model type spencer high + /// + public const int MStabModelTypeSpencerHigh = 8; + + /// + /// The m stab model type spencer low + /// + public const int MStabModelTypeSpencerLow = 9; + + /// + /// The piping model type bligh + /// + public const int PipingModelTypeBligh = 0; + + /// + /// The piping model type sellmeijer + /// + public const int PipingModelTypeSellmeijer = 1; + + /// + /// The piping model type sellmeijer4 forces + /// + public const int PipingModelTypeSellmeijer4Forces = 2; + + /// + /// The piping model type wti2017 + /// + public const int PipingModelTypeWti2017 = 3; + + /// + /// Constants for translating to Enums TimeStepUnit + /// + public const uint TimeStepUnitSecond = 0; + + public const uint TimeStepUnitMinute = 1; + public const uint TimeStepUnitHour = 2; + public const uint TimeStepUnitDay = 3; + public const uint TimeStepUnitMonth = 4; + public const uint TimeStepUnitWeek = 5; + public const uint TimeStepUnitYear = 6; + public const uint TimeStepUnitNonequidistant = 7; + + /// + /// Constants for translating to Enums PlLineType + /// + public const uint PlLineTypePl1 = 1; + + public const uint PlLineTypePl2 = 2; + public const uint PlLineTypePl3 = 3; + public const uint PlLineTypePl4 = 4; + + /// + /// Constants for translating to Enums SensorType + /// + public const uint SensorTypePiezometricHead = 0; + + public const uint SensorTypeWaterLevel = 1; + public const uint SensorTypePolderLevel = 2; + + /// + /// Constants for translating to Enums DataSourceTypeSensors + /// + public const uint DataSourceTypeSensorsIgnore = 0; + + public const uint DataSourceTypeSensorsLocationData = 1; + public const uint DataSourceTypeSensorsSensor = 2; + + /// /// Converts the type DamProjectType from input object type to Dam Engine type. /// /// Type of the input object. /// Dam Engine type public static DamProjectType ConvertToDamProjectType(InputDamProjectType inputDamProjectType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputDamProjectType.Design, DamProjectType.Design}, - {InputDamProjectType.Operational, DamProjectType.Operational} + { + InputDamProjectType.Design, DamProjectType.Design + }, + { + InputDamProjectType.Operational, DamProjectType.Operational + } }; return translationTable[inputDamProjectType]; } @@ -58,10 +248,14 @@ /// Type of the input object. public static InputDamProjectType ConvertToInputDamProjectType(DamProjectType damProjectType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DamProjectType.Design, InputDamProjectType.Design}, - {DamProjectType.Operational, InputDamProjectType.Operational} + { + DamProjectType.Design, InputDamProjectType.Design + }, + { + DamProjectType.Operational, InputDamProjectType.Operational + } }; return translationTable[damProjectType]; } @@ -75,13 +269,23 @@ /// public static LocationWaternetOptionsPhreaticLineCreationMethod ConvertToInputPhreaticLineCreationMethod(PlLineCreationMethod plLineCreationMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PlLineCreationMethod.ExpertKnowledgeLinearInDike, LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeLinearInDike}, - {PlLineCreationMethod.ExpertKnowledgeRRD, LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeRRD}, - {PlLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD, LocationWaternetOptionsPhreaticLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD}, - {PlLineCreationMethod.Sensors, LocationWaternetOptionsPhreaticLineCreationMethod.Sensors}, - {PlLineCreationMethod.None, LocationWaternetOptionsPhreaticLineCreationMethod.None} + { + PlLineCreationMethod.ExpertKnowledgeLinearInDike, LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeLinearInDike + }, + { + PlLineCreationMethod.ExpertKnowledgeRRD, LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeRRD + }, + { + PlLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD, LocationWaternetOptionsPhreaticLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD + }, + { + PlLineCreationMethod.Sensors, LocationWaternetOptionsPhreaticLineCreationMethod.Sensors + }, + { + PlLineCreationMethod.None, LocationWaternetOptionsPhreaticLineCreationMethod.None + } }; return translationTable[plLineCreationMethod]; } @@ -95,13 +299,23 @@ /// public static PlLineCreationMethod ConvertToPhreaticLineCreationMethod(LocationWaternetOptionsPhreaticLineCreationMethod inputPhreaticLineCreationMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeLinearInDike, PlLineCreationMethod.ExpertKnowledgeLinearInDike}, - {LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeRRD, PlLineCreationMethod.ExpertKnowledgeRRD}, - {LocationWaternetOptionsPhreaticLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD, PlLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD}, - {LocationWaternetOptionsPhreaticLineCreationMethod.Sensors, PlLineCreationMethod.Sensors}, - {LocationWaternetOptionsPhreaticLineCreationMethod.None, PlLineCreationMethod.None} + { + LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeLinearInDike, PlLineCreationMethod.ExpertKnowledgeLinearInDike + }, + { + LocationWaternetOptionsPhreaticLineCreationMethod.ExpertKnowledgeRRD, PlLineCreationMethod.ExpertKnowledgeRRD + }, + { + LocationWaternetOptionsPhreaticLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD, PlLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD + }, + { + LocationWaternetOptionsPhreaticLineCreationMethod.Sensors, PlLineCreationMethod.Sensors + }, + { + LocationWaternetOptionsPhreaticLineCreationMethod.None, PlLineCreationMethod.None + } }; return translationTable[inputPhreaticLineCreationMethod]; } @@ -115,13 +329,23 @@ /// public static LocationWaternetOptionsIntrusionVerticalWaterPressure ConvertToInputIntrusionVerticalWaterPressure(IntrusionVerticalWaterPressureType intrusionVerticalWaterPressureType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {IntrusionVerticalWaterPressureType.FullHydroStatic, LocationWaternetOptionsIntrusionVerticalWaterPressure.FullHydroStatic}, - {IntrusionVerticalWaterPressureType.HydroStatic, LocationWaternetOptionsIntrusionVerticalWaterPressure.HydroStatic}, - {IntrusionVerticalWaterPressureType.Linear, LocationWaternetOptionsIntrusionVerticalWaterPressure.Linear}, - {IntrusionVerticalWaterPressureType.SemiTimeDependent, LocationWaternetOptionsIntrusionVerticalWaterPressure.SemiTimeDependent}, - {IntrusionVerticalWaterPressureType.Standard, LocationWaternetOptionsIntrusionVerticalWaterPressure.Standard} + { + IntrusionVerticalWaterPressureType.FullHydroStatic, LocationWaternetOptionsIntrusionVerticalWaterPressure.FullHydroStatic + }, + { + IntrusionVerticalWaterPressureType.HydroStatic, LocationWaternetOptionsIntrusionVerticalWaterPressure.HydroStatic + }, + { + IntrusionVerticalWaterPressureType.Linear, LocationWaternetOptionsIntrusionVerticalWaterPressure.Linear + }, + { + IntrusionVerticalWaterPressureType.SemiTimeDependent, LocationWaternetOptionsIntrusionVerticalWaterPressure.SemiTimeDependent + }, + { + IntrusionVerticalWaterPressureType.Standard, LocationWaternetOptionsIntrusionVerticalWaterPressure.Standard + } }; return translationTable[intrusionVerticalWaterPressureType]; } @@ -135,13 +359,23 @@ /// public static IntrusionVerticalWaterPressureType ConvertToIntrusionVerticalWaterPressure(LocationWaternetOptionsIntrusionVerticalWaterPressure inputIntrusionVerticalWaterPressure) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {LocationWaternetOptionsIntrusionVerticalWaterPressure.FullHydroStatic, IntrusionVerticalWaterPressureType.FullHydroStatic}, - {LocationWaternetOptionsIntrusionVerticalWaterPressure.HydroStatic, IntrusionVerticalWaterPressureType.HydroStatic}, - {LocationWaternetOptionsIntrusionVerticalWaterPressure.Linear, IntrusionVerticalWaterPressureType.Linear}, - {LocationWaternetOptionsIntrusionVerticalWaterPressure.SemiTimeDependent, IntrusionVerticalWaterPressureType.SemiTimeDependent}, - {LocationWaternetOptionsIntrusionVerticalWaterPressure.Standard, IntrusionVerticalWaterPressureType.Standard} + { + LocationWaternetOptionsIntrusionVerticalWaterPressure.FullHydroStatic, IntrusionVerticalWaterPressureType.FullHydroStatic + }, + { + LocationWaternetOptionsIntrusionVerticalWaterPressure.HydroStatic, IntrusionVerticalWaterPressureType.HydroStatic + }, + { + LocationWaternetOptionsIntrusionVerticalWaterPressure.Linear, IntrusionVerticalWaterPressureType.Linear + }, + { + LocationWaternetOptionsIntrusionVerticalWaterPressure.SemiTimeDependent, IntrusionVerticalWaterPressureType.SemiTimeDependent + }, + { + LocationWaternetOptionsIntrusionVerticalWaterPressure.Standard, IntrusionVerticalWaterPressureType.Standard + } }; return translationTable[inputIntrusionVerticalWaterPressure]; } @@ -153,17 +387,35 @@ /// public static int ConvertToOutputCalculationResult(CalculationResult calculationResult) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {CalculationResult.NoRun, 0}, - {CalculationResult.Succeeded, 1}, - {CalculationResult.NoInput, 2}, - {CalculationResult.NoLicense, 3}, - {CalculationResult.UserAbort, 4}, - {CalculationResult.InvalidInputStructure, 5}, - {CalculationResult.InvalidInputData, 6}, - {CalculationResult.RunFailed, 7}, - {CalculationResult.UnexpectedError, 8} + { + CalculationResult.NoRun, 0 + }, + { + CalculationResult.Succeeded, 1 + }, + { + CalculationResult.NoInput, 2 + }, + { + CalculationResult.NoLicense, 3 + }, + { + CalculationResult.UserAbort, 4 + }, + { + CalculationResult.InvalidInputStructure, 5 + }, + { + CalculationResult.InvalidInputData, 6 + }, + { + CalculationResult.RunFailed, 7 + }, + { + CalculationResult.UnexpectedError, 8 + } }; return translationTable[calculationResult]; } @@ -175,67 +427,102 @@ /// public static CalculationResult ConvertToCalculationResult(int calculationResult) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {0, CalculationResult.NoRun}, - {1, CalculationResult.Succeeded}, - {2, CalculationResult.NoInput}, - {3, CalculationResult.NoLicense}, - {4, CalculationResult.UserAbort}, - {5, CalculationResult.InvalidInputStructure}, - {6, CalculationResult.InvalidInputData}, - {7, CalculationResult.RunFailed}, - {8, CalculationResult.UnexpectedError} + { + 0, CalculationResult.NoRun + }, + { + 1, CalculationResult.Succeeded + }, + { + 2, CalculationResult.NoInput + }, + { + 3, CalculationResult.NoLicense + }, + { + 4, CalculationResult.UserAbort + }, + { + 5, CalculationResult.InvalidInputStructure + }, + { + 6, CalculationResult.InvalidInputData + }, + { + 7, CalculationResult.RunFailed + }, + { + 8, CalculationResult.UnexpectedError + } }; return translationTable[calculationResult]; } - public const int CpNone = 0; // - public const int CpSurfaceLevelOutside = 1; // Maaiveld buitenwaarts - public const int CpDikeToeAtRiver = 5; // Teen dijk buitenwaarts - public const int CpShoulderTopOutside = 6; // Kruin buitenberm - public const int CpShoulderBaseOutside = 7; // Insteek buitenberm - public const int CpDikeTopAtRiver = 8; // Kruin buitentalud - public const int CpDikeLine = 9; // referentielijn - public const int CpTrafficLoadOutside = 10; // Verkeersbelasting kant buitenwaarts - public const int CpTrafficLoadInside = 11; // Verkeersbelasting kant binnenwaarts - public const int CpDikeTopAtPolder = 12; // Kruin binnentalud - public const int CpShoulderBaseInside = 13; // Insteek binnenberm - public const int CpShoulderTopInside = 14; // Kruin binnenberm - public const int CpDikeToeAtPolder = 15; // Teen dijk binnenwaarts - public const int CpDitchDikeSide = 16; // Insteek sloot dijkzijde - public const int CpBottomDitchDikeSide = 17; // Slootbodem dijkzijde - public const int CpBottomDitchPolderSide = 18; // Slootbodem polderzijde - public const int CpDitchPolderSide = 19; // Insteek sloot polderzijde - public const int CpSurfaceLevelInside = 25; // Maaiveld binnenwaarts - /// /// Converts the input characteristic point type to the Dam characteristic point type /// /// Type of the input point. /// public static CharacteristicPointType ConvertToDamPointType(int inputPointType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {CpNone, CharacteristicPointType.None}, - {CpSurfaceLevelOutside, CharacteristicPointType.SurfaceLevelOutside}, - {CpDikeToeAtRiver, CharacteristicPointType.DikeToeAtRiver}, - {CpShoulderTopOutside, CharacteristicPointType.ShoulderTopOutside}, - {CpShoulderBaseOutside, CharacteristicPointType.ShoulderBaseOutside}, - {CpDikeTopAtRiver, CharacteristicPointType.DikeTopAtRiver}, - {CpDikeLine, CharacteristicPointType.DikeLine}, - {CpTrafficLoadOutside, CharacteristicPointType.TrafficLoadOutside}, - {CpTrafficLoadInside, CharacteristicPointType.TrafficLoadInside}, - {CpDikeTopAtPolder, CharacteristicPointType.DikeTopAtPolder}, - {CpShoulderBaseInside, CharacteristicPointType.ShoulderBaseInside}, - {CpShoulderTopInside, CharacteristicPointType.ShoulderTopInside}, - {CpDikeToeAtPolder, CharacteristicPointType.DikeToeAtPolder}, - {CpDitchDikeSide, CharacteristicPointType.DitchDikeSide}, - {CpBottomDitchDikeSide, CharacteristicPointType.BottomDitchDikeSide}, - {CpBottomDitchPolderSide, CharacteristicPointType.BottomDitchPolderSide}, - {CpDitchPolderSide, CharacteristicPointType.DitchPolderSide}, - {CpSurfaceLevelInside, CharacteristicPointType.SurfaceLevelInside} + { + CpNone, CharacteristicPointType.None + }, + { + CpSurfaceLevelOutside, CharacteristicPointType.SurfaceLevelOutside + }, + { + CpDikeToeAtRiver, CharacteristicPointType.DikeToeAtRiver + }, + { + CpShoulderTopOutside, CharacteristicPointType.ShoulderTopOutside + }, + { + CpShoulderBaseOutside, CharacteristicPointType.ShoulderBaseOutside + }, + { + CpDikeTopAtRiver, CharacteristicPointType.DikeTopAtRiver + }, + { + CpDikeLine, CharacteristicPointType.DikeLine + }, + { + CpTrafficLoadOutside, CharacteristicPointType.TrafficLoadOutside + }, + { + CpTrafficLoadInside, CharacteristicPointType.TrafficLoadInside + }, + { + CpDikeTopAtPolder, CharacteristicPointType.DikeTopAtPolder + }, + { + CpShoulderBaseInside, CharacteristicPointType.ShoulderBaseInside + }, + { + CpShoulderTopInside, CharacteristicPointType.ShoulderTopInside + }, + { + CpDikeToeAtPolder, CharacteristicPointType.DikeToeAtPolder + }, + { + CpDitchDikeSide, CharacteristicPointType.DitchDikeSide + }, + { + CpBottomDitchDikeSide, CharacteristicPointType.BottomDitchDikeSide + }, + { + CpBottomDitchPolderSide, CharacteristicPointType.BottomDitchPolderSide + }, + { + CpDitchPolderSide, CharacteristicPointType.DitchPolderSide + }, + { + CpSurfaceLevelInside, CharacteristicPointType.SurfaceLevelInside + } }; return translationTable[inputPointType]; } @@ -247,26 +534,62 @@ /// public static int ConvertToInputPointType(CharacteristicPointType characteristicPointType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {CharacteristicPointType.None, CpNone}, - {CharacteristicPointType.SurfaceLevelOutside, CpSurfaceLevelOutside}, - {CharacteristicPointType.DikeToeAtRiver, CpDikeToeAtRiver}, - {CharacteristicPointType.ShoulderTopOutside, CpShoulderTopOutside}, - {CharacteristicPointType.ShoulderBaseOutside, CpShoulderBaseOutside}, - {CharacteristicPointType.DikeTopAtRiver, CpDikeTopAtRiver}, - {CharacteristicPointType.DikeLine, CpDikeLine}, - {CharacteristicPointType.TrafficLoadOutside, CpTrafficLoadOutside}, - {CharacteristicPointType.TrafficLoadInside, CpTrafficLoadInside}, - {CharacteristicPointType.DikeTopAtPolder, CpDikeTopAtPolder}, - {CharacteristicPointType.ShoulderBaseInside, CpShoulderBaseInside}, - {CharacteristicPointType.ShoulderTopInside, CpShoulderTopInside}, - {CharacteristicPointType.DikeToeAtPolder, CpDikeToeAtPolder}, - {CharacteristicPointType.DitchDikeSide, CpDitchDikeSide}, - {CharacteristicPointType.BottomDitchDikeSide, CpBottomDitchDikeSide}, - {CharacteristicPointType.BottomDitchPolderSide, CpBottomDitchPolderSide}, - {CharacteristicPointType.DitchPolderSide, CpDitchPolderSide}, - {CharacteristicPointType.SurfaceLevelInside, CpSurfaceLevelInside} + { + CharacteristicPointType.None, CpNone + }, + { + CharacteristicPointType.SurfaceLevelOutside, CpSurfaceLevelOutside + }, + { + CharacteristicPointType.DikeToeAtRiver, CpDikeToeAtRiver + }, + { + CharacteristicPointType.ShoulderTopOutside, CpShoulderTopOutside + }, + { + CharacteristicPointType.ShoulderBaseOutside, CpShoulderBaseOutside + }, + { + CharacteristicPointType.DikeTopAtRiver, CpDikeTopAtRiver + }, + { + CharacteristicPointType.DikeLine, CpDikeLine + }, + { + CharacteristicPointType.TrafficLoadOutside, CpTrafficLoadOutside + }, + { + CharacteristicPointType.TrafficLoadInside, CpTrafficLoadInside + }, + { + CharacteristicPointType.DikeTopAtPolder, CpDikeTopAtPolder + }, + { + CharacteristicPointType.ShoulderBaseInside, CpShoulderBaseInside + }, + { + CharacteristicPointType.ShoulderTopInside, CpShoulderTopInside + }, + { + CharacteristicPointType.DikeToeAtPolder, CpDikeToeAtPolder + }, + { + CharacteristicPointType.DitchDikeSide, CpDitchDikeSide + }, + { + CharacteristicPointType.BottomDitchDikeSide, CpBottomDitchDikeSide + }, + { + CharacteristicPointType.BottomDitchPolderSide, CpBottomDitchPolderSide + }, + { + CharacteristicPointType.DitchPolderSide, CpDitchPolderSide + }, + { + CharacteristicPointType.SurfaceLevelInside, CpSurfaceLevelInside + } }; return translationTable[characteristicPointType]; } @@ -278,10 +601,14 @@ /// public static WaterpressureInterpolationModel ConvertToWaterpressureInterpolationModel(int inputWaterpressureInterpolationModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {0, WaterpressureInterpolationModel.Automatic}, - {1, WaterpressureInterpolationModel.Hydrostatic} + { + 0, WaterpressureInterpolationModel.Automatic + }, + { + 1, WaterpressureInterpolationModel.Hydrostatic + } }; return translationTable[inputWaterpressureInterpolationModel]; } @@ -293,10 +620,14 @@ /// public static int ConvertToInputWaterpressureInterpolationModel(WaterpressureInterpolationModel waterpressureInterpolationModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {WaterpressureInterpolationModel.Automatic, 0}, - {WaterpressureInterpolationModel.Hydrostatic, 1} + { + WaterpressureInterpolationModel.Automatic, 0 + }, + { + WaterpressureInterpolationModel.Hydrostatic, 1 + } }; return translationTable[waterpressureInterpolationModel]; } @@ -308,11 +639,17 @@ /// public static int ConvertToInputSoilGeometryType(SoilProfileType soilProfileType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SoilProfileType.ProfileType1D, 0}, - {SoilProfileType.ProfileType2D, 1}, - {SoilProfileType.ProfileTypeStiFile, 2} + { + SoilProfileType.ProfileType1D, 0 + }, + { + SoilProfileType.ProfileType2D, 1 + }, + { + SoilProfileType.ProfileTypeStiFile, 2 + } }; return translationTable[soilProfileType]; } @@ -324,31 +661,39 @@ /// public static SoilProfileType ConvertToSoilGeometryType(int soilGeometryType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {0, SoilProfileType.ProfileType1D}, - {1, SoilProfileType.ProfileType2D}, - {2, SoilProfileType.ProfileTypeStiFile} + { + 0, SoilProfileType.ProfileType1D + }, + { + 1, SoilProfileType.ProfileType2D + }, + { + 2, SoilProfileType.ProfileTypeStiFile + } }; return translationTable[soilGeometryType]; } - public const int InputFailureMechanismStabilityInside = 0; - public const int InputFailureMechanismStabilityOutside = 1; - public const int InputFailureMechanismPiping = 2; - /// /// Converts the Dam failure mechanism type to the input failure mechanism type . /// /// Type of the segment failure mechanism. /// public static int ConvertToInputFailureMechanismSystemType(FailureMechanismSystemType segmentFailureMechanismType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {FailureMechanismSystemType.StabilityInside, InputFailureMechanismStabilityInside}, - {FailureMechanismSystemType.StabilityOutside, InputFailureMechanismStabilityOutside}, - {FailureMechanismSystemType.Piping, InputFailureMechanismPiping} + { + FailureMechanismSystemType.StabilityInside, InputFailureMechanismStabilityInside + }, + { + FailureMechanismSystemType.StabilityOutside, InputFailureMechanismStabilityOutside + }, + { + FailureMechanismSystemType.Piping, InputFailureMechanismPiping + } }; return translationTable[segmentFailureMechanismType]; } @@ -360,33 +705,42 @@ /// public static FailureMechanismSystemType ConvertToFailureMechanismSystemType(int failureMechanismSystemType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputFailureMechanismStabilityInside, FailureMechanismSystemType.StabilityInside}, - {InputFailureMechanismStabilityOutside, FailureMechanismSystemType.StabilityOutside}, - {InputFailureMechanismPiping, FailureMechanismSystemType.Piping} + { + InputFailureMechanismStabilityInside, FailureMechanismSystemType.StabilityInside + }, + { + InputFailureMechanismStabilityOutside, FailureMechanismSystemType.StabilityOutside + }, + { + InputFailureMechanismPiping, FailureMechanismSystemType.Piping + } }; return translationTable[failureMechanismSystemType]; } - public const int InputSegmentFailureMechanismAll = 0; - public const int InputSegmentFailureMechanismStability = 1; - public const int InputSegmentFailureMechanismPiping = 2; - public const int InputSegmentFailureMechanismLiquefaction = 3; - /// /// Converts the Dam segment failure mechanism type to the input segment failure mechanism type . /// /// Type of the segment failure mechanism. /// public static int ConvertToInputSegmentFailureMechanismSystemType(SegmentFailureMechanismType segmentFailureMechanismType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SegmentFailureMechanismType.All, InputSegmentFailureMechanismAll}, - {SegmentFailureMechanismType.Stability, InputSegmentFailureMechanismStability}, - {SegmentFailureMechanismType.Piping, InputSegmentFailureMechanismPiping}, - {SegmentFailureMechanismType.Liquefaction, InputSegmentFailureMechanismLiquefaction} + { + SegmentFailureMechanismType.All, InputSegmentFailureMechanismAll + }, + { + SegmentFailureMechanismType.Stability, InputSegmentFailureMechanismStability + }, + { + SegmentFailureMechanismType.Piping, InputSegmentFailureMechanismPiping + }, + { + SegmentFailureMechanismType.Liquefaction, InputSegmentFailureMechanismLiquefaction + } }; return translationTable[segmentFailureMechanismType]; } @@ -398,12 +752,20 @@ /// public static SegmentFailureMechanismType ConvertToSegmentFailureMechanismSystemType(int segmentFailureMechanismSystemType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputSegmentFailureMechanismAll, SegmentFailureMechanismType.All}, - {InputSegmentFailureMechanismStability, SegmentFailureMechanismType.Stability}, - {InputSegmentFailureMechanismPiping, SegmentFailureMechanismType.Piping}, - {InputSegmentFailureMechanismLiquefaction, SegmentFailureMechanismType.Liquefaction} + { + InputSegmentFailureMechanismAll, SegmentFailureMechanismType.All + }, + { + InputSegmentFailureMechanismStability, SegmentFailureMechanismType.Stability + }, + { + InputSegmentFailureMechanismPiping, SegmentFailureMechanismType.Piping + }, + { + InputSegmentFailureMechanismLiquefaction, SegmentFailureMechanismType.Liquefaction + } }; return translationTable[segmentFailureMechanismSystemType]; } @@ -415,12 +777,20 @@ /// public static InputPipingModelType ConvertToInputPipingModelType(PipingModelType pipingModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PipingModelType.Bligh, InputPipingModelType.Bligh}, - {PipingModelType.SellmeijerVnk, InputPipingModelType.SellmeijerVnk}, - {PipingModelType.Sellmeijer4Forces, InputPipingModelType.Sellmeijer4Forces}, - {PipingModelType.Wti2017, InputPipingModelType.WtiSellmeijerRevised} + { + PipingModelType.Bligh, InputPipingModelType.Bligh + }, + { + PipingModelType.SellmeijerVnk, InputPipingModelType.SellmeijerVnk + }, + { + PipingModelType.Sellmeijer4Forces, InputPipingModelType.Sellmeijer4Forces + }, + { + PipingModelType.Wti2017, InputPipingModelType.WtiSellmeijerRevised + } }; return translationTable[pipingModelType]; } @@ -432,12 +802,20 @@ /// public static PipingModelType ConvertToPipingModelType(InputPipingModelType inputPipingModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputPipingModelType.Bligh, PipingModelType.Bligh}, - {InputPipingModelType.SellmeijerVnk, PipingModelType.SellmeijerVnk}, - {InputPipingModelType.Sellmeijer4Forces, PipingModelType.Sellmeijer4Forces}, - {InputPipingModelType.WtiSellmeijerRevised, PipingModelType.Wti2017} + { + InputPipingModelType.Bligh, PipingModelType.Bligh + }, + { + InputPipingModelType.SellmeijerVnk, PipingModelType.SellmeijerVnk + }, + { + InputPipingModelType.Sellmeijer4Forces, PipingModelType.Sellmeijer4Forces + }, + { + InputPipingModelType.WtiSellmeijerRevised, PipingModelType.Wti2017 + } }; return translationTable[inputPipingModelType]; } @@ -449,11 +827,17 @@ /// public static InputStabilityModelType ConvertToInputStabilityModelType(MStabModelType stabilityModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabModelType.Bishop, InputStabilityModelType.Bishop}, - {MStabModelType.UpliftVan, InputStabilityModelType.UpliftVan}, - {MStabModelType.BishopUpliftVan, InputStabilityModelType.BishopUpliftVan}, + { + MStabModelType.Bishop, InputStabilityModelType.Bishop + }, + { + MStabModelType.UpliftVan, InputStabilityModelType.UpliftVan + }, + { + MStabModelType.BishopUpliftVan, InputStabilityModelType.BishopUpliftVan + }, }; return translationTable[stabilityModelType]; } @@ -465,11 +849,17 @@ /// public static MStabModelType ConvertToStabilityModelType(InputStabilityModelType inputStabilityModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputStabilityModelType.Bishop, MStabModelType.Bishop}, - {InputStabilityModelType.UpliftVan, MStabModelType.UpliftVan}, - {InputStabilityModelType.BishopUpliftVan, MStabModelType.BishopUpliftVan}, + { + InputStabilityModelType.Bishop, MStabModelType.Bishop + }, + { + InputStabilityModelType.UpliftVan, MStabModelType.UpliftVan + }, + { + InputStabilityModelType.BishopUpliftVan, MStabModelType.BishopUpliftVan + }, }; return translationTable[inputStabilityModelType]; } @@ -481,11 +871,17 @@ /// public static DesignResultStabilityDesignResultsStabilityModelType ConvertToOutputStabilityModelType(MStabModelType stabilityModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabModelType.Bishop, DesignResultStabilityDesignResultsStabilityModelType.Bishop}, - {MStabModelType.UpliftVan, DesignResultStabilityDesignResultsStabilityModelType.UpliftVan}, - {MStabModelType.BishopUpliftVan, DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan}, + { + MStabModelType.Bishop, DesignResultStabilityDesignResultsStabilityModelType.Bishop + }, + { + MStabModelType.UpliftVan, DesignResultStabilityDesignResultsStabilityModelType.UpliftVan + }, + { + MStabModelType.BishopUpliftVan, DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan + }, }; return translationTable[stabilityModelType]; } @@ -497,11 +893,17 @@ /// public static MStabModelType ConvertToStabilityModelType(DesignResultStabilityDesignResultsStabilityModelType outputStabilityModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DesignResultStabilityDesignResultsStabilityModelType.Bishop, MStabModelType.Bishop}, - {DesignResultStabilityDesignResultsStabilityModelType.UpliftVan, MStabModelType.UpliftVan}, - {DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan, MStabModelType.BishopUpliftVan}, + { + DesignResultStabilityDesignResultsStabilityModelType.Bishop, MStabModelType.Bishop + }, + { + DesignResultStabilityDesignResultsStabilityModelType.UpliftVan, MStabModelType.UpliftVan + }, + { + DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan, MStabModelType.BishopUpliftVan + }, }; return translationTable[outputStabilityModelType]; } @@ -513,10 +915,14 @@ /// public static InputAnalysisType ConvertToInputAnalysisType(AnalysisType analysisType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {AnalysisType.NoAdaption, InputAnalysisType.NoAdaption}, - {AnalysisType.AdaptGeometry, InputAnalysisType.AdaptGeometry} + { + AnalysisType.NoAdaption, InputAnalysisType.NoAdaption + }, + { + AnalysisType.AdaptGeometry, InputAnalysisType.AdaptGeometry + } }; return translationTable[analysisType]; } @@ -528,40 +934,33 @@ /// public static AnalysisType ConvertToAnalysisType(InputAnalysisType inputAnalysisType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputAnalysisType.NoAdaption, AnalysisType.NoAdaption}, - {InputAnalysisType.AdaptGeometry, AnalysisType.AdaptGeometry} + { + InputAnalysisType.NoAdaption, AnalysisType.NoAdaption + }, + { + InputAnalysisType.AdaptGeometry, AnalysisType.AdaptGeometry + } }; return translationTable[inputAnalysisType]; } /// - /// The input zone type no zones - /// - public const int InputZoneTypeNoZones = 0; - - /// - /// The input zone type old zone area, this now translates to No Zones as Zone Area is no longer to be used. - /// - public const int InputZoneTypeOldZoneArea = 1; - - /// - /// The input zone types forbidden zones - /// - public const int InputZoneTypesForbiddenZones = 2; - - /// /// Converts the type of to input zone. /// /// Type of the zone. /// public static int ConvertToInputZoneType(MStabZonesType zoneType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabZonesType.NoZones, InputZoneTypeNoZones}, - {MStabZonesType.ForbiddenZone, InputZoneTypesForbiddenZones} + { + MStabZonesType.NoZones, InputZoneTypeNoZones + }, + { + MStabZonesType.ForbiddenZone, InputZoneTypesForbiddenZones + } }; return translationTable[zoneType]; } @@ -573,42 +972,39 @@ /// public static MStabZonesType ConvertToZoneType(int inputZoneType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputZoneTypeNoZones, MStabZonesType.NoZones}, - {InputZoneTypeOldZoneArea, MStabZonesType.NoZones}, - {InputZoneTypesForbiddenZones, MStabZonesType.ForbiddenZone} + { + InputZoneTypeNoZones, MStabZonesType.NoZones + }, + { + InputZoneTypeOldZoneArea, MStabZonesType.NoZones + }, + { + InputZoneTypesForbiddenZones, MStabZonesType.ForbiddenZone + } }; return translationTable[inputZoneType]; } /// - /// The input search method grid - /// - public const int InputSearchMethodGrid = 0; - - /// - /// The input search method genetic - /// - public const int InputSearchMethodGenetic = 1; - - /// - /// The input search method BeeSwarm - /// - public const int InputSearchMethodBeeSwarm = 2; - - /// /// Converts to input search method. /// /// The search method. /// public static int ConvertToInputSearchMethod(MStabSearchMethod searchMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabSearchMethod.Grid, InputSearchMethodGrid}, - {MStabSearchMethod.GeneticAlgorithm, InputSearchMethodGenetic}, - {MStabSearchMethod.BeeSwarm, InputSearchMethodBeeSwarm} + { + MStabSearchMethod.Grid, InputSearchMethodGrid + }, + { + MStabSearchMethod.GeneticAlgorithm, InputSearchMethodGenetic + }, + { + MStabSearchMethod.BeeSwarm, InputSearchMethodBeeSwarm + } }; return translationTable[searchMethod]; } @@ -620,11 +1016,17 @@ /// public static MStabSearchMethod ConvertToSearchMethod(int searchMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputSearchMethodGrid, MStabSearchMethod.Grid}, - {InputSearchMethodGenetic, MStabSearchMethod.GeneticAlgorithm}, - {InputSearchMethodBeeSwarm, MStabSearchMethod.BeeSwarm} + { + InputSearchMethodGrid, MStabSearchMethod.Grid + }, + { + InputSearchMethodGenetic, MStabSearchMethod.GeneticAlgorithm + }, + { + InputSearchMethodBeeSwarm, MStabSearchMethod.BeeSwarm + } }; return translationTable[searchMethod]; } @@ -636,14 +1038,26 @@ /// public static MessageMessageType ConvertToInputMessageType(LogMessageType messageType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {LogMessageType.Warning, MessageMessageType.Warning}, - {LogMessageType.Debug, MessageMessageType.Info}, - {LogMessageType.Error, MessageMessageType.Error}, - {LogMessageType.FatalError, MessageMessageType.Error}, - {LogMessageType.Info, MessageMessageType.Info}, - {LogMessageType.Trace, MessageMessageType.Info} + { + LogMessageType.Warning, MessageMessageType.Warning + }, + { + LogMessageType.Debug, MessageMessageType.Info + }, + { + LogMessageType.Error, MessageMessageType.Error + }, + { + LogMessageType.FatalError, MessageMessageType.Error + }, + { + LogMessageType.Info, MessageMessageType.Info + }, + { + LogMessageType.Trace, MessageMessageType.Info + } }; return translationTable[messageType]; } @@ -655,36 +1069,36 @@ /// public static LogMessageType ConvertToLogMessageType(MessageMessageType validationResultMessageType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MessageMessageType.Warning, LogMessageType.Warning}, - {MessageMessageType.Error, LogMessageType.Error}, - {MessageMessageType.Info, LogMessageType.Info} + { + MessageMessageType.Warning, LogMessageType.Warning + }, + { + MessageMessageType.Error, LogMessageType.Error + }, + { + MessageMessageType.Info, LogMessageType.Info + } }; return translationTable[validationResultMessageType]; } /// - /// The input grid type automatic - /// - public const int InputGridTypeAutomatic = 0; - - /// - /// The input grid type specified - /// - public const int InputGridTypeSpecified = 1; - - /// /// Converts to input grid determination. /// /// Type of the grid. /// public static int ConvertToInputGridDetermination(GridSizeDetermination gridType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {GridSizeDetermination.Automatic, InputGridTypeAutomatic}, - {GridSizeDetermination.Specified, InputGridTypeSpecified} + { + GridSizeDetermination.Automatic, InputGridTypeAutomatic + }, + { + GridSizeDetermination.Specified, InputGridTypeSpecified + } }; return translationTable[gridType]; @@ -697,57 +1111,73 @@ /// public static SoilShearStrengthModel ConvertToSoilShearStrengthModel(ShearStrengthModel shearStrengthModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {ShearStrengthModel.None, SoilShearStrengthModel.None}, - {ShearStrengthModel.CPhi, SoilShearStrengthModel.CPhi}, - {ShearStrengthModel.StressTable, SoilShearStrengthModel.StressTable}, - {ShearStrengthModel.PseudoValues, SoilShearStrengthModel.PseudoValues}, - {ShearStrengthModel.SuMeasured, SoilShearStrengthModel.SuMeasured}, - {ShearStrengthModel.SuCalculated, SoilShearStrengthModel.SuCalculated}, - {ShearStrengthModel.SuGradient, SoilShearStrengthModel.SuGradient}, - {ShearStrengthModel.SuCalculatedWithYield, SoilShearStrengthModel.SuCalculatedWithYield}, - {ShearStrengthModel.CPhiOrSuCalculated, SoilShearStrengthModel.CPhiOrSuCalculated}, + { + ShearStrengthModel.None, SoilShearStrengthModel.None + }, + { + ShearStrengthModel.CPhi, SoilShearStrengthModel.CPhi + }, + { + ShearStrengthModel.StressTable, SoilShearStrengthModel.StressTable + }, + { + ShearStrengthModel.PseudoValues, SoilShearStrengthModel.PseudoValues + }, + { + ShearStrengthModel.SuMeasured, SoilShearStrengthModel.SuMeasured + }, + { + ShearStrengthModel.SuCalculated, SoilShearStrengthModel.SuCalculated + }, + { + ShearStrengthModel.SuGradient, SoilShearStrengthModel.SuGradient + }, + { + ShearStrengthModel.SuCalculatedWithYield, SoilShearStrengthModel.SuCalculatedWithYield + }, + { + ShearStrengthModel.CPhiOrSuCalculated, SoilShearStrengthModel.CPhiOrSuCalculated + }, }; - return translationTable[shearStrengthModel]; + return translationTable[shearStrengthModel]; } - + /// /// Converts to grid determination. /// /// Type of the grid. /// public static GridSizeDetermination ConvertToGridDetermination(int gridType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputGridTypeAutomatic, GridSizeDetermination.Automatic}, - {InputGridTypeSpecified, GridSizeDetermination.Specified} + { + InputGridTypeAutomatic, GridSizeDetermination.Automatic + }, + { + InputGridTypeSpecified, GridSizeDetermination.Specified + } }; return translationTable[gridType]; } /// - /// The input tangent lines on boundaty lines - /// - public const int InputTangentLinesOnBoundaryLines = 0; - - /// - /// The input tangent lines specified - /// - public const int InputTangentLinesSpecified = 1; - - /// /// Converts to input tangent lines definition. /// /// Type of the tangent line. /// public static int ConvertToInputTangentLinesDefinition(TangentLinesDefinition tangentLineType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {TangentLinesDefinition.OnBoundaryLines, InputGridTypeSpecified}, - {TangentLinesDefinition.Specified, InputGridTypeAutomatic} + { + TangentLinesDefinition.OnBoundaryLines, InputGridTypeSpecified + }, + { + TangentLinesDefinition.Specified, InputGridTypeAutomatic + } }; return translationTable[tangentLineType]; } @@ -759,32 +1189,54 @@ /// public static TangentLinesDefinition ConvertToTangentLinesDefinition(int tangentLineType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {InputGridTypeSpecified, TangentLinesDefinition.OnBoundaryLines}, - {InputGridTypeAutomatic, TangentLinesDefinition.Specified} + { + InputGridTypeSpecified, TangentLinesDefinition.OnBoundaryLines + }, + { + InputGridTypeAutomatic, TangentLinesDefinition.Specified + } }; return translationTable[tangentLineType]; } - + /// /// Converts the soil shear strength model to shear strength model. /// /// The soil shear strength model. /// public static ShearStrengthModel ConvertToShearStrengthModel(SoilShearStrengthModel soilShearStrengthModel) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SoilShearStrengthModel.None, ShearStrengthModel.None}, - {SoilShearStrengthModel.CPhi, ShearStrengthModel.CPhi}, - {SoilShearStrengthModel.StressTable, ShearStrengthModel.StressTable}, - {SoilShearStrengthModel.PseudoValues, ShearStrengthModel.PseudoValues}, - {SoilShearStrengthModel.SuMeasured, ShearStrengthModel.SuMeasured}, - {SoilShearStrengthModel.SuCalculated, ShearStrengthModel.SuCalculated}, - {SoilShearStrengthModel.SuGradient, ShearStrengthModel.SuGradient}, - {SoilShearStrengthModel.SuCalculatedWithYield, ShearStrengthModel.SuCalculatedWithYield}, - {SoilShearStrengthModel.CPhiOrSuCalculated, ShearStrengthModel.CPhiOrSuCalculated}, + { + SoilShearStrengthModel.None, ShearStrengthModel.None + }, + { + SoilShearStrengthModel.CPhi, ShearStrengthModel.CPhi + }, + { + SoilShearStrengthModel.StressTable, ShearStrengthModel.StressTable + }, + { + SoilShearStrengthModel.PseudoValues, ShearStrengthModel.PseudoValues + }, + { + SoilShearStrengthModel.SuMeasured, ShearStrengthModel.SuMeasured + }, + { + SoilShearStrengthModel.SuCalculated, ShearStrengthModel.SuCalculated + }, + { + SoilShearStrengthModel.SuGradient, ShearStrengthModel.SuGradient + }, + { + SoilShearStrengthModel.SuCalculatedWithYield, ShearStrengthModel.SuCalculatedWithYield + }, + { + SoilShearStrengthModel.CPhiOrSuCalculated, ShearStrengthModel.CPhiOrSuCalculated + }, }; return translationTable[soilShearStrengthModel]; } @@ -796,11 +1248,17 @@ /// public static SoilDilatancyType ConvertToSoilDilatancyType(DilatancyType dilatancyType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DilatancyType.Zero, SoilDilatancyType.Zero}, - {DilatancyType.Phi, SoilDilatancyType.Phi}, - {DilatancyType.MinusPhi, SoilDilatancyType.MinusPhi}, + { + DilatancyType.Zero, SoilDilatancyType.Zero + }, + { + DilatancyType.Phi, SoilDilatancyType.Phi + }, + { + DilatancyType.MinusPhi, SoilDilatancyType.MinusPhi + }, }; return translationTable[dilatancyType]; } @@ -812,11 +1270,17 @@ /// public static DilatancyType ConvertToDilatancyType(SoilDilatancyType soilDilatancyType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SoilDilatancyType.Zero, DilatancyType.Zero}, - {SoilDilatancyType.Phi, DilatancyType.Phi}, - {SoilDilatancyType.MinusPhi, DilatancyType.MinusPhi}, + { + SoilDilatancyType.Zero, DilatancyType.Zero + }, + { + SoilDilatancyType.Phi, DilatancyType.Phi + }, + { + SoilDilatancyType.MinusPhi, DilatancyType.MinusPhi + }, }; return translationTable[soilDilatancyType]; } @@ -828,10 +1292,14 @@ /// public static StabilityDesignMethod ConvertToDamStabilityDesignMethod(LocationDesignOptionsStabilityDesignMethod stabilityDesignMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption}, - {LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption} + { + LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption + }, + { + LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption + } }; return translationTable[stabilityDesignMethod]; } @@ -843,143 +1311,125 @@ /// public static LocationDesignOptionsStabilityDesignMethod ConvertToInputStabilityDesignMethod(StabilityDesignMethod stabilityDesignMethod) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption}, - {StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption} + { + StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption + }, + { + StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption + } }; return translationTable[stabilityDesignMethod]; } /// - /// The m stab model type bishop - /// - public const int MStabModelTypeBishop = 0; - - /// - /// The m stab model type spencer - /// - public const int MStabModelTypeSpencer = 1; - - /// - /// The m stab model type fellenius - /// - public const int MStabModelTypeFellenius = 2; - - /// - /// The m stab model type uplift van - /// - public const int MStabModelTypeUpliftVan = 3; - - /// - /// The m stab model type uplift spencer - /// - public const int MStabModelTypeUpliftSpencer = 4; - - /// - /// The m stab model type bishop random field - /// - public const int MStabModelTypeBishopRandomField = 5; - - /// - /// The m stab model type horizontal balance - /// - public const int MStabModelTypeHorizontalBalance = 6; - - /// - /// The m stab model type bishop uplift van - /// - public const int MStabModelTypeBishopUpliftVan = 7; - - /// - /// The m stab model type spencer high - /// - public const int MStabModelTypeSpencerHigh = 8; - - /// - /// The m stab model type spencer low - /// - public const int MStabModelTypeSpencerLow = 9; - - /// /// Converts to MStab Model Type. /// /// The input MStabModelType. /// public static MStabModelType ConvertToMStabModelType(int inputMStabModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabModelTypeBishop, MStabModelType.Bishop}, - {MStabModelTypeSpencer, MStabModelType.Spencer}, - {MStabModelTypeFellenius, MStabModelType.Fellenius}, - {MStabModelTypeUpliftVan, MStabModelType.UpliftVan}, - {MStabModelTypeUpliftSpencer, MStabModelType.UpliftSpencer}, - {MStabModelTypeBishopRandomField, MStabModelType.BishopRandomField}, - {MStabModelTypeHorizontalBalance, MStabModelType.HorizontalBalance}, - {MStabModelTypeBishopUpliftVan, MStabModelType.BishopUpliftVan}, - {MStabModelTypeSpencerHigh, MStabModelType.SpencerHigh}, - {MStabModelTypeSpencerLow, MStabModelType.SpencerLow}, + { + MStabModelTypeBishop, MStabModelType.Bishop + }, + { + MStabModelTypeSpencer, MStabModelType.Spencer + }, + { + MStabModelTypeFellenius, MStabModelType.Fellenius + }, + { + MStabModelTypeUpliftVan, MStabModelType.UpliftVan + }, + { + MStabModelTypeUpliftSpencer, MStabModelType.UpliftSpencer + }, + { + MStabModelTypeBishopRandomField, MStabModelType.BishopRandomField + }, + { + MStabModelTypeHorizontalBalance, MStabModelType.HorizontalBalance + }, + { + MStabModelTypeBishopUpliftVan, MStabModelType.BishopUpliftVan + }, + { + MStabModelTypeSpencerHigh, MStabModelType.SpencerHigh + }, + { + MStabModelTypeSpencerLow, MStabModelType.SpencerLow + }, }; return translationTable[inputMStabModelType]; } - + /// /// Converts to output MStabModelType. /// /// The UpliftType. /// public static int ConvertToOutputMStabModelType(MStabModelType mStabModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {MStabModelType.Bishop, MStabModelTypeBishop}, - {MStabModelType.Spencer, MStabModelTypeSpencer}, - {MStabModelType.Fellenius, MStabModelTypeFellenius}, - {MStabModelType.UpliftVan, MStabModelTypeUpliftVan}, - {MStabModelType.UpliftSpencer, MStabModelTypeUpliftSpencer}, - {MStabModelType.BishopRandomField, MStabModelTypeBishopRandomField}, - {MStabModelType.HorizontalBalance, MStabModelTypeHorizontalBalance}, - {MStabModelType.BishopUpliftVan, MStabModelTypeBishopUpliftVan}, - {MStabModelType.SpencerHigh, MStabModelTypeSpencerHigh}, - {MStabModelType.SpencerLow, MStabModelTypeSpencerLow}, + { + MStabModelType.Bishop, MStabModelTypeBishop + }, + { + MStabModelType.Spencer, MStabModelTypeSpencer + }, + { + MStabModelType.Fellenius, MStabModelTypeFellenius + }, + { + MStabModelType.UpliftVan, MStabModelTypeUpliftVan + }, + { + MStabModelType.UpliftSpencer, MStabModelTypeUpliftSpencer + }, + { + MStabModelType.BishopRandomField, MStabModelTypeBishopRandomField + }, + { + MStabModelType.HorizontalBalance, MStabModelTypeHorizontalBalance + }, + { + MStabModelType.BishopUpliftVan, MStabModelTypeBishopUpliftVan + }, + { + MStabModelType.SpencerHigh, MStabModelTypeSpencerHigh + }, + { + MStabModelType.SpencerLow, MStabModelTypeSpencerLow + }, }; return translationTable[mStabModelType]; } /// - /// The piping model type bligh - /// - public const int PipingModelTypeBligh = 0; - - /// - /// The piping model type sellmeijer - /// - public const int PipingModelTypeSellmeijer = 1; - - /// - /// The piping model type sellmeijer4 forces - /// - public const int PipingModelTypeSellmeijer4Forces = 2; - - /// - /// The piping model type wti2017 - /// - public const int PipingModelTypeWti2017 = 3; - - /// /// Converts to Piping Model Type. /// /// The input PipingModelType. /// public static PipingModelType ConvertToPipingModelType(int inputPipingModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PipingModelTypeBligh, PipingModelType.Bligh}, - {PipingModelTypeSellmeijer, PipingModelType.SellmeijerVnk}, - {PipingModelTypeSellmeijer4Forces, PipingModelType.Sellmeijer4Forces}, - {PipingModelTypeWti2017, PipingModelType.Wti2017} + { + PipingModelTypeBligh, PipingModelType.Bligh + }, + { + PipingModelTypeSellmeijer, PipingModelType.SellmeijerVnk + }, + { + PipingModelTypeSellmeijer4Forces, PipingModelType.Sellmeijer4Forces + }, + { + PipingModelTypeWti2017, PipingModelType.Wti2017 + } }; return translationTable[inputPipingModelType]; } @@ -991,45 +1441,57 @@ /// public static int ConvertToOutputPipingModelType(PipingModelType pipingModelType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PipingModelType.Bligh, PipingModelTypeBligh}, - {PipingModelType.SellmeijerVnk, PipingModelTypeSellmeijer}, - {PipingModelType.Sellmeijer4Forces, PipingModelTypeSellmeijer4Forces}, - {PipingModelType.Wti2017, PipingModelTypeWti2017} + { + PipingModelType.Bligh, PipingModelTypeBligh + }, + { + PipingModelType.SellmeijerVnk, PipingModelTypeSellmeijer + }, + { + PipingModelType.Sellmeijer4Forces, PipingModelTypeSellmeijer4Forces + }, + { + PipingModelType.Wti2017, PipingModelTypeWti2017 + } }; return translationTable[pipingModelType]; } /// - /// Constants for translating to Enums TimeStepUnit - /// - public const uint TimeStepUnitSecond = 0; - public const uint TimeStepUnitMinute = 1; - public const uint TimeStepUnitHour = 2; - public const uint TimeStepUnitDay = 3; - public const uint TimeStepUnitMonth = 4; - public const uint TimeStepUnitWeek = 5; - public const uint TimeStepUnitYear = 6; - public const uint TimeStepUnitNonequidistant = 7; - - /// /// Converts the input TimeStepUnit to the TimeStepUnit. /// /// The time step unit. /// public static TimeStepUnit ConvertToTimeStepUnit(uint timeStepUnit) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {TimeStepUnitSecond, TimeStepUnit.Second}, - {TimeStepUnitMinute, TimeStepUnit.Minute}, - {TimeStepUnitHour, TimeStepUnit.Hour}, - {TimeStepUnitDay, TimeStepUnit.Day}, - {TimeStepUnitMonth, TimeStepUnit.Month}, - {TimeStepUnitWeek, TimeStepUnit.Week}, - {TimeStepUnitYear, TimeStepUnit.Year}, - {TimeStepUnitNonequidistant, TimeStepUnit.Nonequidistant}, + { + TimeStepUnitSecond, TimeStepUnit.Second + }, + { + TimeStepUnitMinute, TimeStepUnit.Minute + }, + { + TimeStepUnitHour, TimeStepUnit.Hour + }, + { + TimeStepUnitDay, TimeStepUnit.Day + }, + { + TimeStepUnitMonth, TimeStepUnit.Month + }, + { + TimeStepUnitWeek, TimeStepUnit.Week + }, + { + TimeStepUnitYear, TimeStepUnit.Year + }, + { + TimeStepUnitNonequidistant, TimeStepUnit.Nonequidistant + }, }; return translationTable[timeStepUnit]; } @@ -1041,41 +1503,57 @@ /// public static uint ConvertToInputTimeStepUnit(TimeStepUnit timeStepUnit) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {TimeStepUnit.Second, TimeStepUnitSecond}, - {TimeStepUnit.Minute, TimeStepUnitMinute}, - {TimeStepUnit.Hour, TimeStepUnitHour}, - {TimeStepUnit.Day, TimeStepUnitDay}, - {TimeStepUnit.Month, TimeStepUnitMonth}, - {TimeStepUnit.Week, TimeStepUnitWeek}, - {TimeStepUnit.Year, TimeStepUnitYear}, - {TimeStepUnit.Nonequidistant, TimeStepUnitNonequidistant}, + { + TimeStepUnit.Second, TimeStepUnitSecond + }, + { + TimeStepUnit.Minute, TimeStepUnitMinute + }, + { + TimeStepUnit.Hour, TimeStepUnitHour + }, + { + TimeStepUnit.Day, TimeStepUnitDay + }, + { + TimeStepUnit.Month, TimeStepUnitMonth + }, + { + TimeStepUnit.Week, TimeStepUnitWeek + }, + { + TimeStepUnit.Year, TimeStepUnitYear + }, + { + TimeStepUnit.Nonequidistant, TimeStepUnitNonequidistant + }, }; return translationTable[timeStepUnit]; } /// - /// Constants for translating to Enums PlLineType - /// - public const uint PlLineTypePl1 = 1; - public const uint PlLineTypePl2 = 2; - public const uint PlLineTypePl3 = 3; - public const uint PlLineTypePl4 = 4; - - /// /// Converts the input plLineType to Dam plLineType. /// /// Type of the pl line. /// plLineType public static PlLineType ConvertToPlLineType(uint plLineType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PlLineTypePl1, PlLineType.Pl1}, - {PlLineTypePl2, PlLineType.Pl2}, - {PlLineTypePl3, PlLineType.Pl3}, - {PlLineTypePl4, PlLineType.Pl4} + { + PlLineTypePl1, PlLineType.Pl1 + }, + { + PlLineTypePl2, PlLineType.Pl2 + }, + { + PlLineTypePl3, PlLineType.Pl3 + }, + { + PlLineTypePl4, PlLineType.Pl4 + } }; return translationTable[plLineType]; } @@ -1087,35 +1565,42 @@ /// plLineType as integer public static uint ConvertToInputPlLineType(PlLineType plLineType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {PlLineType.Pl1, PlLineTypePl1}, - {PlLineType.Pl2, PlLineTypePl2}, - {PlLineType.Pl3, PlLineTypePl3}, - {PlLineType.Pl4, PlLineTypePl4} + { + PlLineType.Pl1, PlLineTypePl1 + }, + { + PlLineType.Pl2, PlLineTypePl2 + }, + { + PlLineType.Pl3, PlLineTypePl3 + }, + { + PlLineType.Pl4, PlLineTypePl4 + } }; return translationTable[plLineType]; } /// - /// Constants for translating to Enums SensorType - /// - public const uint SensorTypePiezometricHead = 0; - public const uint SensorTypeWaterLevel = 1; - public const uint SensorTypePolderLevel = 2; - - /// /// Converts the Dam sensorType to input sensorType. /// /// Type of the sensor. /// sensorType public static SensorType ConvertToSensorType(uint sensorType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SensorTypePiezometricHead, SensorType.PiezometricHead}, - {SensorTypePolderLevel, SensorType.PolderLevel}, - {SensorTypeWaterLevel, SensorType.WaterLevel} + { + SensorTypePiezometricHead, SensorType.PiezometricHead + }, + { + SensorTypePolderLevel, SensorType.PolderLevel + }, + { + SensorTypeWaterLevel, SensorType.WaterLevel + } }; return translationTable[sensorType]; } @@ -1127,23 +1612,22 @@ /// sensorType as integer public static uint ConvertToInputSensorType(SensorType sensorType) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {SensorType.PiezometricHead, SensorTypePiezometricHead}, - {SensorType.PolderLevel, SensorTypePolderLevel}, - {SensorType.WaterLevel, SensorTypeWaterLevel} + { + SensorType.PiezometricHead, SensorTypePiezometricHead + }, + { + SensorType.PolderLevel, SensorTypePolderLevel + }, + { + SensorType.WaterLevel, SensorTypeWaterLevel + } }; return translationTable[sensorType]; } /// - /// Constants for translating to Enums DataSourceTypeSensors - /// - public const uint DataSourceTypeSensorsIgnore = 0; - public const uint DataSourceTypeSensorsLocationData = 1; - public const uint DataSourceTypeSensorsSensor = 2; - - /// /// Converts the Dam DataSourceTypeSensors to input DataSourceTypeSensors. /// /// The data source type sensors. @@ -1152,11 +1636,17 @@ /// public static DataSourceTypeSensors ConvertToDataSourceTypeSensors(uint dataSourceTypeSensors) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DataSourceTypeSensorsIgnore, DataSourceTypeSensors.Ignore}, - {DataSourceTypeSensorsLocationData, DataSourceTypeSensors.LocationData}, - {DataSourceTypeSensorsSensor, DataSourceTypeSensors.Sensor} + { + DataSourceTypeSensorsIgnore, DataSourceTypeSensors.Ignore + }, + { + DataSourceTypeSensorsLocationData, DataSourceTypeSensors.LocationData + }, + { + DataSourceTypeSensorsSensor, DataSourceTypeSensors.Sensor + } }; return translationTable[dataSourceTypeSensors]; } @@ -1170,11 +1660,17 @@ /// public static uint ConvertToInputDataSourceTypeSensors(DataSourceTypeSensors dataSourceTypeSensors) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DataSourceTypeSensors.Ignore, DataSourceTypeSensorsIgnore}, - {DataSourceTypeSensors.LocationData, DataSourceTypeSensorsLocationData}, - {DataSourceTypeSensors.Sensor, DataSourceTypeSensorsSensor} + { + DataSourceTypeSensors.Ignore, DataSourceTypeSensorsIgnore + }, + { + DataSourceTypeSensors.LocationData, DataSourceTypeSensorsLocationData + }, + { + DataSourceTypeSensors.Sensor, DataSourceTypeSensorsSensor + } }; return translationTable[dataSourceTypeSensors]; } @@ -1186,28 +1682,45 @@ /// public static DikeSoilScenario ConvertToDikeSoilScenario(LocationWaternetOptionsDikeSoilScenario waternetOptionsDikeSoilScenario) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {LocationWaternetOptionsDikeSoilScenario.ClayDikeOnClay, DikeSoilScenario.ClayDikeOnClay}, - {LocationWaternetOptionsDikeSoilScenario.ClayDikeOnSand, DikeSoilScenario.ClayDikeOnSand}, - {LocationWaternetOptionsDikeSoilScenario.SandDikeOnClay, DikeSoilScenario.SandDikeOnClay}, - {LocationWaternetOptionsDikeSoilScenario.SandDikeOnSand, DikeSoilScenario.SandDikeOnSand} + { + LocationWaternetOptionsDikeSoilScenario.ClayDikeOnClay, DikeSoilScenario.ClayDikeOnClay + }, + { + LocationWaternetOptionsDikeSoilScenario.ClayDikeOnSand, DikeSoilScenario.ClayDikeOnSand + }, + { + LocationWaternetOptionsDikeSoilScenario.SandDikeOnClay, DikeSoilScenario.SandDikeOnClay + }, + { + LocationWaternetOptionsDikeSoilScenario.SandDikeOnSand, DikeSoilScenario.SandDikeOnSand + } }; return translationTable[waternetOptionsDikeSoilScenario]; } + /// /// Converts to input DikeSoilScenario type. /// /// The DikeSoilScenario type. /// public static LocationWaternetOptionsDikeSoilScenario ConvertToInputDikeSoilScenario(DikeSoilScenario waternetOptionsDikeSoilScenario) { - var translationTable = new Dictionary() + var translationTable = new Dictionary { - {DikeSoilScenario.ClayDikeOnClay, LocationWaternetOptionsDikeSoilScenario.ClayDikeOnClay}, - {DikeSoilScenario.ClayDikeOnSand, LocationWaternetOptionsDikeSoilScenario.ClayDikeOnSand}, - {DikeSoilScenario.SandDikeOnClay, LocationWaternetOptionsDikeSoilScenario.SandDikeOnClay}, - {DikeSoilScenario.SandDikeOnSand, LocationWaternetOptionsDikeSoilScenario.SandDikeOnSand} + { + DikeSoilScenario.ClayDikeOnClay, LocationWaternetOptionsDikeSoilScenario.ClayDikeOnClay + }, + { + DikeSoilScenario.ClayDikeOnSand, LocationWaternetOptionsDikeSoilScenario.ClayDikeOnSand + }, + { + DikeSoilScenario.SandDikeOnClay, LocationWaternetOptionsDikeSoilScenario.SandDikeOnClay + }, + { + DikeSoilScenario.SandDikeOnSand, LocationWaternetOptionsDikeSoilScenario.SandDikeOnSand + } }; return translationTable[waternetOptionsDikeSoilScenario]; }