Пример #1
0
        /// <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);
            }
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadCases" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="analyzer">The analyzer.</param>
 /// <param name="loadPatterns">The load patterns.</param>
 internal LoadCases(ApiCSiApplication app, Analyzer analyzer, LoadPatterns loadPatterns) : base(app)
 {
     _analyzer     = analyzer;
     _loadPatterns = loadPatterns;
 }