Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs
===================================================================
diff -u -r4000 -r4052
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 4000)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/KernelWrapperHelper.cs (.../KernelWrapperHelper.cs) (revision 4052)
@@ -30,73 +30,72 @@
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.Standard;
-namespace Deltares.DamEngine.Calculators.KernelWrappers.Common
+namespace Deltares.DamEngine.Calculators.KernelWrappers.Common;
+
+public class KernelWrapperHelper
{
- public class KernelWrapperHelper
+ ///
+ /// Creates the kernel wrapper.
+ /// Everything that is non-generic and failure mechanism specific should be put here
+ ///
+ /// The current failure mechanism specification.
+ ///
+ ///
+ ///
+ public static IKernelWrapper CreateKernelWrapper(
+ DamFailureMechanismeCalculationSpecification currentSpecification)
{
- ///
- /// Creates the kernel wrapper.
- /// Everything that is non-generic and failure mechanism specific should be put here
- ///
- /// The current failure mechanism specification.
- ///
- ///
- ///
- public static IKernelWrapper CreateKernelWrapper(
- DamFailureMechanismeCalculationSpecification currentSpecification)
+ IKernelWrapper kernelWrapper = null;
+ switch (currentSpecification.FailureMechanismSystemType)
{
- IKernelWrapper kernelWrapper = null;
- switch (currentSpecification.FailureMechanismSystemType)
- {
- case FailureMechanismSystemType.StabilityOutside:
- switch (currentSpecification.StabilityModelType)
- {
- case MStabModelType.Bishop:
- kernelWrapper = new MacroStabilityOutwardsKernelWrapper();
- var macroStabilityOutwardsKernelWrapper = (MacroStabilityOutwardsKernelWrapper) kernelWrapper;
- macroStabilityOutwardsKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy();
- break;
- default:
- throw new NotImplementedException();
- }
+ case FailureMechanismSystemType.StabilityOutside:
+ switch (currentSpecification.StabilityModelType)
+ {
+ case MStabModelType.Bishop:
+ kernelWrapper = new MacroStabilityOutwardsKernelWrapper();
+ var macroStabilityOutwardsKernelWrapper = (MacroStabilityOutwardsKernelWrapper) kernelWrapper;
+ macroStabilityOutwardsKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy();
+ break;
+ default:
+ throw new NotImplementedException();
+ }
- break;
- case FailureMechanismSystemType.StabilityInside:
- switch (currentSpecification.StabilityModelType)
- {
- case MStabModelType.Bishop:
- case MStabModelType.BishopUpliftVan:
- case MStabModelType.UpliftVan:
- kernelWrapper = new MacroStabilityInwardsKernelWrapper();
- var macroStabilityInwardsKernelWrapper = (MacroStabilityInwardsKernelWrapper) kernelWrapper;
- macroStabilityInwardsKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy();
- break;
- default:
- throw new NotImplementedException();
- }
+ break;
+ case FailureMechanismSystemType.StabilityInside:
+ switch (currentSpecification.StabilityModelType)
+ {
+ case MStabModelType.Bishop:
+ case MStabModelType.BishopUpliftVan:
+ case MStabModelType.UpliftVan:
+ kernelWrapper = new MacroStabilityInwardsKernelWrapper();
+ var macroStabilityInwardsKernelWrapper = (MacroStabilityInwardsKernelWrapper) kernelWrapper;
+ macroStabilityInwardsKernelWrapper.FailureMechanismParametersMStab = currentSpecification.FailureMechanismParametersMStab.Copy();
+ break;
+ default:
+ throw new NotImplementedException();
+ }
- break;
- case FailureMechanismSystemType.Piping:
- switch (currentSpecification.PipingModelType)
- {
- case PipingModelType.Bligh:
- kernelWrapper = new DamPipingBlighKernelWrapper();
- break;
- case PipingModelType.SellmeijerVnk:
- kernelWrapper = new DamPipingSellmeijerVnkKernelWrapper();
- break;
- case PipingModelType.Sellmeijer4Forces:
- kernelWrapper = new DamPipingSellmeijer4ForcesKernelWrapper();
- break;
- case PipingModelType.Wti2017:
- kernelWrapper = new WtiPipingSellmeijerRevisedKernelWrapper();
- break;
- }
+ break;
+ case FailureMechanismSystemType.Piping:
+ switch (currentSpecification.PipingModelType)
+ {
+ case PipingModelType.Bligh:
+ kernelWrapper = new DamPipingBlighKernelWrapper();
+ break;
+ case PipingModelType.SellmeijerVnk:
+ kernelWrapper = new DamPipingSellmeijerVnkKernelWrapper();
+ break;
+ case PipingModelType.Sellmeijer4Forces:
+ kernelWrapper = new DamPipingSellmeijer4ForcesKernelWrapper();
+ break;
+ case PipingModelType.Wti2017:
+ kernelWrapper = new WtiPipingSellmeijerRevisedKernelWrapper();
+ break;
+ }
- break;
- }
-
- return kernelWrapper;
+ break;
}
+
+ return kernelWrapper;
}
}
\ No newline at end of file