Index: DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs
===================================================================
diff -u -r2111 -r2173
--- DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2111)
+++ DamEngine/trunk/src/Deltares.DamEngine.Interface/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2173)
@@ -372,7 +372,46 @@
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()
+ {
+ {SegmentFailureMechanismType.All, InputSegmentFailureMechanismAll},
+ {SegmentFailureMechanismType.Stability, InputSegmentFailureMechanismStability},
+ {SegmentFailureMechanismType.Piping, InputSegmentFailureMechanismPiping},
+ {SegmentFailureMechanismType.Liquefaction, InputSegmentFailureMechanismLiquefaction}
+ };
+ return translationTable[segmentFailureMechanismType];
+ }
+
+ ///
+ /// Converts the input segment failure mechanism type to the Dam segment failure mechanism type .
+ ///
+ /// Type of the failure mechanism system.
+ ///
+ public static SegmentFailureMechanismType ConvertToSegmentFailureMechanismSystemType(int segmentFailureMechanismSystemType)
+ {
+ var translationTable = new Dictionary()
+ {
+ {InputSegmentFailureMechanismAll, SegmentFailureMechanismType.All},
+ {InputSegmentFailureMechanismStability, SegmentFailureMechanismType.Stability},
+ {InputSegmentFailureMechanismPiping, SegmentFailureMechanismType.Piping},
+ {InputSegmentFailureMechanismLiquefaction, SegmentFailureMechanismType.Liquefaction}
+ };
+ return translationTable[segmentFailureMechanismSystemType];
+ }
+
+ ///
/// Converts the Dam piping model to the input piping model.
///
/// Type of the piping model.