Exemplo n.º 1
0
        /// <summary>
        /// This function retrieves the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing modal Eigen load case.</param>
        /// <param name="loadTypes">The load types.</param>
        /// <param name="loadNames">This is an array that includes the name of each load assigned to the load case.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Load" />, this item is the name of a defined load pattern.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Accel" />, this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Link" />, this item is not used.</param>
        /// <param name="targetMassParticipationRatios">The target mass participation ratios.</param>
        /// <param name="isStaticCorrectionModeCalculated">True: Static correction modes are to be calculated.</param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        public void GetLoads(string name,
                             ref eLoadTypeModal[] loadTypes,
                             ref string[] loadNames,
                             ref double[] targetMassParticipationRatios,
                             ref bool[] isStaticCorrectionModeCalculated)
        {
            string[] csiLoadTypes = new string[0];

            _callCode = _sapModel.LoadCases.ModalEigen.GetLoads(name, ref _numberOfItems, ref csiLoadTypes, ref loadNames, ref targetMassParticipationRatios, ref isStaticCorrectionModeCalculated);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadTypes = new eLoadTypeModal[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadTypes[i] = EnumLibrary.ConvertStringToEnumByDescription <eLoadTypeModal>(csiLoadTypes[i]);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing modal Ritz load case.</param>
        /// <param name="loadTypes">The load types.</param>
        /// <param name="loadNames">This is an array that includes the name of each load assigned to the load case.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Load" />, this item is the name of a defined load pattern.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Accel" />, this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadTypeModal.Link" />, this item is not used.</param>
        /// <param name="maxNumberGenerationCycles">The maximum number generation cycles to be performed for the specified Ritz starting vector.
        /// A value of 0 means there is no limit on the number of cycles.</param>
        /// <param name="targetDynamicParticipationRatio">The target dynamic participation ratio.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetLoads(string name,
                             ref eLoadTypeModal[] loadTypes,
                             ref string[] loadNames,
                             ref int[] maxNumberGenerationCycles,
                             ref double[] targetDynamicParticipationRatio)
        {
            string[] csiLoadTypes = new string[0];

            _callCode = _sapModel.LoadCases.ModalRitz.GetLoads(name, ref _numberOfItems, ref csiLoadTypes, ref loadNames, ref maxNumberGenerationCycles, ref targetDynamicParticipationRatio);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadTypes = new eLoadTypeModal[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadTypes[i] = EnumLibrary.ConvertStringToEnumByDescription <eLoadTypeModal>(csiLoadTypes[i]);
            }
        }