Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs =================================================================== diff -u -r73dcfebc1d95b398d477e77956e4e80f1000093d -r7b85b872a5fb870af978dcd26fdfbd52f12b288c --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision 73dcfebc1d95b398d477e77956e4e80f1000093d) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/AssemblyCategoriesCalculator.cs (.../AssemblyCategoriesCalculator.cs) (revision 7b85b872a5fb870af978dcd26fdfbd52f12b288c) @@ -72,71 +72,5 @@ throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateGenericErrorMessage(), e); } } - - public IEnumerable CalculateFailureMechanismCategories(AssemblyCategoriesInput assemblyCategoriesInput) - { - try - { - ICategoryLimitsCalculator kernel = factory.CreateAssemblyCategoriesKernel(); - CategoriesList output = kernel.CalculateFailureMechanismCategoryLimitsWbi11( - new AssessmentSection(1, assemblyCategoriesInput.SignalingNorm, assemblyCategoriesInput.LowerLimitNorm), - new FailureMechanism(assemblyCategoriesInput.N, assemblyCategoriesInput.FailureMechanismContribution)); - - return AssemblyCategoryCreator.CreateFailureMechanismAssemblyCategories(output); - } - catch (AssemblyException e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateErrorMessage(e.Errors), e); - } - catch (Exception e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateGenericErrorMessage(), e); - } - } - - public IEnumerable CalculateFailureMechanismSectionCategories( - AssemblyCategoriesInput assemblyCategoriesInput) - { - try - { - ICategoryLimitsCalculator kernel = factory.CreateAssemblyCategoriesKernel(); - CategoriesList output = kernel.CalculateFmSectionCategoryLimitsWbi01( - new AssessmentSection(1, assemblyCategoriesInput.SignalingNorm, assemblyCategoriesInput.LowerLimitNorm), - new FailureMechanism(assemblyCategoriesInput.N, assemblyCategoriesInput.FailureMechanismContribution)); - - return AssemblyCategoryCreator.CreateFailureMechanismSectionAssemblyCategories(output); - } - catch (AssemblyException e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateErrorMessage(e.Errors), e); - } - catch (Exception e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateGenericErrorMessage(), e); - } - } - - public IEnumerable CalculateGeotechnicalFailureMechanismSectionCategories(double normativeNorm, - double failureMechanismN, - double failureMechanismContribution) - { - try - { - ICategoryLimitsCalculator kernel = factory.CreateAssemblyCategoriesKernel(); - CategoriesList output = kernel.CalculateFmSectionCategoryLimitsWbi02( - normativeNorm, - new FailureMechanism(failureMechanismN, failureMechanismContribution)); - - return AssemblyCategoryCreator.CreateFailureMechanismSectionAssemblyCategories(output); - } - catch (AssemblyException e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateErrorMessage(e.Errors), e); - } - catch (Exception e) - { - throw new AssemblyCategoriesCalculatorException(AssemblyErrorMessageCreatorOld.CreateGenericErrorMessage(), e); - } - } } } \ No newline at end of file Index: Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs =================================================================== diff -u -rfa3389c99cd0c94dfad0be6cb9c8a6a43df45e35 -r7b85b872a5fb870af978dcd26fdfbd52f12b288c --- Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs (.../IAssemblyCategoriesCalculator.cs) (revision fa3389c99cd0c94dfad0be6cb9c8a6a43df45e35) +++ Riskeer/AssemblyTool/src/Riskeer.AssemblyTool.KernelWrapper/Calculators/Categories/IAssemblyCategoriesCalculator.cs (.../IAssemblyCategoriesCalculator.cs) (revision 7b85b872a5fb870af978dcd26fdfbd52f12b288c) @@ -40,42 +40,5 @@ /// while performing the calculation. IEnumerable CalculateAssessmentSectionCategories( double signalingNorm, double lowerLimitNorm); - - /// - /// Performs the calculation for getting the failure mechanism categories. - /// - /// The object containing the input parameters for - /// determining the assembly categories. - /// An with categories of - /// . - /// Thrown when an error occurs - /// while performing the calculation. - IEnumerable CalculateFailureMechanismCategories(AssemblyCategoriesInput assemblyCategoriesInput); - - /// - /// Performs the calculation for getting the failure mechanism section categories. - /// - /// The object containing the input parameters for - /// determining the assembly categories. - /// An with categories of - /// . - /// Thrown when an error occurs - /// while performing the calculation. - IEnumerable CalculateFailureMechanismSectionCategories( - AssemblyCategoriesInput assemblyCategoriesInput); - - /// - /// Performs the calculation for getting the geotechnical failure mechanism section categories. - /// - /// The norm which has been defined on the assessment section. - /// The 'N' parameter used to factor in the 'length effect'. - /// The contribution of a failure mechanism. - /// An with categories of - /// . - /// Thrown when an error occurs - /// while performing the calculation. - IEnumerable CalculateGeotechnicalFailureMechanismSectionCategories(double normativeNorm, - double failureMechanismN, - double failureMechanismContribution); } } \ No newline at end of file Index: Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs =================================================================== diff -u -rfa3389c99cd0c94dfad0be6cb9c8a6a43df45e35 -r7b85b872a5fb870af978dcd26fdfbd52f12b288c --- Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs (.../AssemblyCategoriesCalculatorStub.cs) (revision fa3389c99cd0c94dfad0be6cb9c8a6a43df45e35) +++ Riskeer/AssemblyTool/test/Riskeer.AssemblyTool.KernelWrapper.TestUtil/Calculators/Categories/AssemblyCategoriesCalculatorStub.cs (.../AssemblyCategoriesCalculatorStub.cs) (revision 7b85b872a5fb870af978dcd26fdfbd52f12b288c) @@ -42,47 +42,11 @@ public double LowerLimitNorm { get; private set; } /// - /// Gets the normative norm that is used in the calculation. - /// - public double NormativeNorm { get; private set; } - - /// - /// Gets the 'N' parameter used to factor in the 'length effect' - /// that is used in the calculation. - /// - public double FailureMechanismN { get; private set; } - - /// - /// Gets the failure mechanism contribution that is used in the calculation. - /// - public double FailureMechanismContribution { get; private set; } - - /// - /// Gets the assembly categories input used in the assembly calculation methods. - /// - public AssemblyCategoriesInput AssemblyCategoriesInput { get; private set; } - - /// /// Gets or sets the output of the calculation. /// public IEnumerable AssessmentSectionCategoriesOutput { get; set; } /// - /// Gets or sets the output of the calculation. - /// - public IEnumerable FailureMechanismCategoriesOutput { get; set; } - - /// - /// Gets or sets the output of the calculation. - /// - public IEnumerable FailureMechanismSectionCategoriesOutput { get; set; } - - /// - /// Gets or sets the output of the calculation. - /// - public IEnumerable GeotechnicalFailureMechanismSectionCategoriesOutput { get; set; } - - /// /// Sets an indicator whether an exception must be thrown while performing the calculation. /// public bool ThrowExceptionOnCalculate { private get; set; } @@ -105,65 +69,5 @@ new AssessmentSectionAssemblyCategory(3.01, 4, AssessmentSectionAssemblyCategoryGroup.C) }); } - - public IEnumerable CalculateFailureMechanismCategories(AssemblyCategoriesInput assemblyCategoriesInput) - { - if (ThrowExceptionOnCalculate) - { - throw new AssemblyCategoriesCalculatorException("Message", new Exception()); - } - - AssemblyCategoriesInput = assemblyCategoriesInput; - - return FailureMechanismCategoriesOutput - ?? (FailureMechanismCategoriesOutput = new[] - { - new FailureMechanismAssemblyCategory(1, 2, FailureMechanismAssemblyCategoryGroup.It), - new FailureMechanismAssemblyCategory(2.01, 3, FailureMechanismAssemblyCategoryGroup.IIt), - new FailureMechanismAssemblyCategory(3.01, 4, FailureMechanismAssemblyCategoryGroup.IIIt) - }); - } - - public IEnumerable CalculateFailureMechanismSectionCategories( - AssemblyCategoriesInput assemblyCategoriesInput) - { - if (ThrowExceptionOnCalculate) - { - throw new AssemblyCategoriesCalculatorException("Message", new Exception()); - } - - AssemblyCategoriesInput = assemblyCategoriesInput; - - return FailureMechanismSectionCategoriesOutput - ?? (FailureMechanismSectionCategoriesOutput = new[] - { - new FailureMechanismSectionAssemblyCategory(1, 2, FailureMechanismSectionAssemblyCategoryGroup.Iv), - new FailureMechanismSectionAssemblyCategory(2.01, 3, FailureMechanismSectionAssemblyCategoryGroup.IIv), - new FailureMechanismSectionAssemblyCategory(3.01, 4, FailureMechanismSectionAssemblyCategoryGroup.IIIv) - }); - } - - public IEnumerable CalculateGeotechnicalFailureMechanismSectionCategories( - double normativeNorm, - double failureMechanismN, - double failureMechanismContribution) - { - if (ThrowExceptionOnCalculate) - { - throw new AssemblyCategoriesCalculatorException("Message", new Exception()); - } - - NormativeNorm = normativeNorm; - FailureMechanismN = failureMechanismN; - FailureMechanismContribution = failureMechanismContribution; - - return GeotechnicalFailureMechanismSectionCategoriesOutput - ?? (GeotechnicalFailureMechanismSectionCategoriesOutput = new[] - { - new FailureMechanismSectionAssemblyCategory(1, 2.1, FailureMechanismSectionAssemblyCategoryGroup.IIIv), - new FailureMechanismSectionAssemblyCategory(2.2, 3.1, FailureMechanismSectionAssemblyCategoryGroup.IVv), - new FailureMechanismSectionAssemblyCategory(3.2, 4, FailureMechanismSectionAssemblyCategoryGroup.Vv) - }); - } } } \ No newline at end of file