/// <summary> /// Creates a new instance of <see cref="MacroStabilityInwardsFailureMechanism"/>. /// </summary> public MacroStabilityInwardsFailureMechanism() : base(Resources.MacroStabilityInwardsFailureMechanism_DisplayName, Resources.MacroStabilityInwardsFailureMechanism_Code) { GeneralInput = new GeneralMacroStabilityInwardsInput(); MacroStabilityInwardsProbabilityAssessmentInput = new MacroStabilityInwardsProbabilityAssessmentInput(); SurfaceLines = new MacroStabilityInwardsSurfaceLineCollection(); StochasticSoilModels = new MacroStabilityInwardsStochasticSoilModelCollection(); CalculationsGroup = new CalculationGroup { Name = RiskeerCommonDataResources.FailureMechanism_Calculations_DisplayName }; CalculationsInputComments = new Comment(); }
/// <summary> /// Gets the calculated Waternet for daily circumstances. /// </summary> /// <param name="input">The input to calculate the Waternet for.</param> /// <param name="generalInput">General calculation parameters that are the same across all calculations.</param> /// <exception cref="ArgumentNullException">Thrown when any parameter is <c>null</c>.</exception> /// <returns>Returns the corresponding derived Waternet value.</returns> public static MacroStabilityInwardsWaternet GetWaternetDaily(MacroStabilityInwardsInput input, GeneralMacroStabilityInwardsInput generalInput) { if (input == null) { throw new ArgumentNullException(nameof(input)); } if (generalInput == null) { throw new ArgumentNullException(nameof(generalInput)); } return(input.SoilProfileUnderSurfaceLine != null ? WaternetCalculationService.CalculateDaily(input, generalInput) : new MacroStabilityInwardsWaternet(new MacroStabilityInwardsPhreaticLine[0], new MacroStabilityInwardsWaternetLine[0])); }