/// <summary> /// Returns a new load case class. /// </summary> /// <param name="uniqueName">Unique load combination name.</param> /// <returns>Steel.</returns> public static LoadCase Factory(string uniqueName) { if (Registry.LoadCases.Keys.Contains(uniqueName)) { return(Registry.LoadCases[uniqueName]); } Tuple <eLoadCaseType, eLoadCaseSubType> loadCaseType = GetCaseTypes(uniqueName); LoadCase loadCase; switch (loadCaseType.Item1) { case eLoadCaseType.LinearStatic: loadCase = StaticLinear.Factory(uniqueName); break; case eLoadCaseType.NonlinearStatic when loadCaseType.Item2 == eLoadCaseSubType.Nonlinear: loadCase = StaticNonlinear.Factory(uniqueName); break; case eLoadCaseType.NonlinearStatic when loadCaseType.Item2 == eLoadCaseSubType.NonlinearStagedConstruction: loadCase = StaticNonlinearStaged.Factory(uniqueName); break; case eLoadCaseType.Modal when loadCaseType.Item2 == eLoadCaseSubType.Eigen: loadCase = ModalEigen.Factory(uniqueName); break; case eLoadCaseType.Modal when loadCaseType.Item2 == eLoadCaseSubType.Ritz: loadCase = ModalRitz.Factory(uniqueName); break; case eLoadCaseType.ResponseSpectrum: loadCase = ResponseSpectrum.Factory(uniqueName); break; case eLoadCaseType.LinearModalTimeHistory: loadCase = TimeHistoryModalLinear.Factory(uniqueName); break; case eLoadCaseType.NonlinearModalTimeHistory: loadCase = TimeHistoryModalNonlinear.Factory(uniqueName); break; case eLoadCaseType.LinearDirectIntegrationTimeHistory: loadCase = TimeHistoryDirectLinear.Factory(uniqueName); break; case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: loadCase = TimeHistoryDirectNonlinear.Factory(uniqueName); break; default: return(null); } Registry.LoadCases.Add(uniqueName, loadCase); return(loadCase); }
/// <summary> /// Factories the specified application. /// </summary> /// <param name="app">The application.</param> /// <param name="analyzer">The analyzer.</param> /// <param name="loadPatterns">The load patterns.</param> /// <param name="loadCases">The load cases.</param> /// <param name="uniqueName">Name of the unique.</param> /// <returns>MPT.CSI.OOAPI.Core.Program.Model.Loads.LoadCase.</returns> internal static LoadCase Factory( ApiCSiApplication app, Analyzer analyzer, LoadPatterns loadPatterns, LoadCases loadCases, string uniqueName) { Tuple <eLoadCaseType, eLoadCaseSubType> loadCaseType = GetCaseTypes(app?.Model?.Definitions?.LoadCases, uniqueName); switch (loadCaseType.Item1) { case eLoadCaseType.LinearStatic: return(StaticLinear.Factory(app, analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseType.Item2 == eLoadCaseSubType.Nonlinear: return(StaticNonlinear.Factory(app, analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseType.Item2 == eLoadCaseSubType.NonlinearStagedConstruction: return(StaticNonlinearStaged.Factory(app, analyzer, loadCases, uniqueName)); case eLoadCaseType.Modal when loadCaseType.Item2 == eLoadCaseSubType.Eigen: return(ModalEigen.Factory(app, analyzer, uniqueName)); case eLoadCaseType.Modal when loadCaseType.Item2 == eLoadCaseSubType.Ritz: return(ModalRitz.Factory(app, analyzer, uniqueName)); case eLoadCaseType.ResponseSpectrum: return(ResponseSpectrum.Factory(app, analyzer, loadCases, uniqueName)); case eLoadCaseType.LinearModalTimeHistory: return(TimeHistoryModalLinear.Factory(app, analyzer, uniqueName)); case eLoadCaseType.NonlinearModalTimeHistory: return(TimeHistoryModalNonlinear.Factory(app, analyzer, uniqueName)); case eLoadCaseType.LinearDirectIntegrationTimeHistory: return(TimeHistoryDirectLinear.Factory(app, analyzer, uniqueName)); case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: return(TimeHistoryDirectNonlinear.Factory(app, analyzer, uniqueName)); default: return(null); } }
/// <summary> /// Factories the specified application. /// </summary> /// <param name="analyzer">The analyzer.</param> /// <param name="loadPatterns">The load patterns.</param> /// <param name="loadCases">The load cases.</param> /// <param name="uniqueName">Name of the unique.</param> /// <returns>MPT.CSI.OOAPI.Core.Program.Model.Loads.LoadCase.</returns> internal static LoadCase Factory( Analyzer analyzer, LoadPatterns loadPatterns, LoadCases loadCases, string uniqueName, eLoadCaseType loadCaseType, eLoadCaseSubType loadCaseSubType) { switch (loadCaseType) { case eLoadCaseType.LinearStatic: return(StaticLinear.Factory(analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.Nonlinear: return(StaticNonlinear.Factory(analyzer, loadPatterns, loadCases, uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.NonlinearStagedConstruction: return(StaticNonlinearStaged.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Eigen: return(ModalEigen.Factory(analyzer, uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Ritz: return(ModalRitz.Factory(analyzer, uniqueName)); case eLoadCaseType.ResponseSpectrum: return(ResponseSpectrum.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.LinearModalTimeHistory: return(TimeHistoryModalLinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.NonlinearModalTimeHistory: return(TimeHistoryModalNonlinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.LinearDirectIntegrationTimeHistory: return(TimeHistoryDirectLinear.Factory(analyzer, loadCases, uniqueName)); case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: return(TimeHistoryDirectNonlinear.Factory(analyzer, loadCases, uniqueName)); default: return(null); } }