/// <summary> /// Gets the case sub types. /// </summary> /// <param name="type">The type.</param> /// <param name="subType">Type of the sub.</param> /// <returns>System.Int32.</returns> protected static int getCaseSubTypes(eLoadCaseType type, eLoadCaseSubType subType) { switch (type) { case eLoadCaseType.NonlinearStatic: switch (subType) { case eLoadCaseSubType.Nonlinear: return(1); case eLoadCaseSubType.NonlinearStagedConstruction: return(2); default: return(0); } case eLoadCaseType.Modal: switch (subType) { case eLoadCaseSubType.Eigen: return(1); case eLoadCaseSubType.Ritz: return(2); default: return(0); } case eLoadCaseType.LinearModalTimeHistory: switch (subType) { case eLoadCaseSubType.Transient: return(1); case eLoadCaseSubType.Periodic: return(2); default: return(0); } default: return(0); } }
/// <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); } }
/// <summary> /// Gets the case types. /// </summary> public void FillCaseTypes() { if (_apiLoadCases == null) { return; } _apiLoadCases.GetCaseTypes(Name, out var loadCaseType, out var loadCaseSubType, out var designType, out var designTypeOption, out var autoCreatedCase); _type = loadCaseType; _subType = getCaseSubTypes(loadCaseType, loadCaseSubType); _designType = designType; _designTypeOption = designTypeOption; _autoCreatedCase = autoCreatedCase; }
/// <summary> /// Adds the specified unique name. /// </summary> /// <param name="uniqueName">Name of the unique.</param> /// <param name="caseType">Type of the case.</param> /// <param name="loadCaseSubType">Type of the load case sub.</param> /// <returns>System.Boolean.</returns> public bool Add( string uniqueName, eLoadCaseType caseType, eLoadCaseSubType loadCaseSubType = eLoadCaseSubType.None) { switch (caseType) { case eLoadCaseType.LinearStatic: return(AddStaticLinear(uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.Nonlinear: return(AddStaticNonlinear(uniqueName)); case eLoadCaseType.NonlinearStatic when loadCaseSubType == eLoadCaseSubType.NonlinearStagedConstruction: return(AddStaticNonlinearStaged(uniqueName)); case eLoadCaseType.ResponseSpectrum: return(AddResponseSpectrum(uniqueName)); case eLoadCaseType.LinearDirectIntegrationTimeHistory: return(AddTimeHistoryDirectLinear(uniqueName)); case eLoadCaseType.NonlinearDirectIntegrationTimeHistory: return(AddTimeHistoryDirectNonlinear(uniqueName)); case eLoadCaseType.LinearModalTimeHistory: return(AddTimeHistoryModalLinear(uniqueName)); case eLoadCaseType.NonlinearModalTimeHistory: return(AddTimeHistoryModalNonlinear(uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Eigen: return(AddModalEigen(uniqueName)); case eLoadCaseType.Modal when loadCaseSubType == eLoadCaseSubType.Ritz: return(AddModalRitz(uniqueName)); default: return(false); } }