/// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing steady state load case.</param>
        /// <param name="loadDirections">U1, U2, U3, R1, R2 or R3, indicating the direction of each load.</param>
        /// <param name="functions">The name of the steady state function associated with each load.</param>
        /// <param name="scaleFactor">The scale factor of each load assigned to the load case. [L/s^2] for U1 U2 and U3; otherwise unitless.</param>
        /// <param name="coordinateSystems">This is an array that includes the name of the coordinate system associated with each load.
        /// If this item is a blank string, the Global coordinate system is assumed.</param>
        /// <param name="angles">This is an array that includes the angle between the acceleration local 1 axis and the +X-axis of the coordinate system specified by <paramref name="coordinateSystems" />.
        /// The rotation is about the Z-axis of the specified coordinate system. [deg].</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetLoads(string name,
                             out eDegreeOfFreedom[] loadDirections,
                             out string[] functions,
                             out double[] scaleFactor,
                             out string[] coordinateSystems,
                             out double[] angles)
        {
            functions         = new string[0];
            scaleFactor       = new double[0];
            coordinateSystems = new string[0];
            angles            = new double[0];

            string[] csiLoadDirections = new string[0];

            _callCode = _sapModel.LoadCases.ResponseSpectrum.GetLoads(name,
                                                                      ref _numberOfItems,
                                                                      ref csiLoadDirections,
                                                                      ref functions,
                                                                      ref scaleFactor,
                                                                      ref coordinateSystems,
                                                                      ref angles);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadDirections = new eDegreeOfFreedom[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadDirections[i] = EnumLibrary.ConvertStringToEnumByDescription <eDegreeOfFreedom>(csiLoadDirections[i]);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Returns the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing steady state load case.</param>
        /// <param name="loadTypes">Either <see cref="eLoadType.Load" /> or <see cref="eLoadType.Accel" />, indicating the type of each load assigned to the load case.</param>
        /// <param name="loadNames">The name of each load assigned to the load case.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Load" />, this item is the name of a defined load pattern.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />, this item is U1, U2, U3, R1, R2 or R3, indicating the direction of the load.</param>
        /// <param name="functions">The name of the load function associated with each load.</param>
        /// <param name="scaleFactor">The scale factor of each load assigned to the load case. [L/s^2] for U1 U2 and U3; otherwise unitless.</param>
        /// <param name="timeFactor">The time scale factor of each load assigned to the load case.</param>
        /// <param name="arrivalTime">The arrival time of each load assigned to the load case.</param>
        /// <param name="coordinateSystems">This is an array that includes the name of the coordinate system associated with each load.
        /// If this item is a blank string, the Global coordinate system is assumed.
        /// This item applies only when <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />.</param>
        /// <param name="angles">This is an array that includes the angle between the acceleration local 1 axis and the +X-axis of the coordinate system specified by <paramref name="coordinateSystems" />.
        /// The rotation is about the Z-axis of the specified coordinate system. [deg].
        /// This item applies only when <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetLoads(string name,
                             out eLoadType[] loadTypes,
                             out string[] loadNames,
                             out string[] functions,
                             out double[] scaleFactor,
                             out double[] timeFactor,
                             out double[] arrivalTime,
                             out string[] coordinateSystems,
                             out double[] angles)
        {
            loadTypes         = new eLoadType[0];
            loadNames         = new string[0];
            functions         = new string[0];
            scaleFactor       = new double[0];
            timeFactor        = new double[0];
            arrivalTime       = new double[0];
            coordinateSystems = new string[0];
            angles            = new double[0];

            string[] csiLoadTypes = new string[0];

            _callCode = _sapModel.LoadCases.DirHistNonlinear.GetLoads(name, ref _numberOfItems, ref csiLoadTypes, ref loadNames, ref functions, ref scaleFactor, ref timeFactor, ref arrivalTime, ref coordinateSystems, ref angles);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadTypes = new eLoadType[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadTypes[i] = EnumLibrary.ConvertStringToEnumByDescription <eLoadType>(csiLoadTypes[i]);
            }
        }
Esempio n. 3
0
        public void ConvertStringToEnumByDescription_of_Nonexisting_Enum_without_Description_Returns_FirstEnum()
        {
            EnumWithoutDescription expectedEnum = 0;
            EnumWithoutDescription testEnum     = EnumLibrary.ConvertStringToEnumByDescription <EnumWithoutDescription>("nonexistentEnum");

            Assert.AreEqual(expectedEnum, testEnum);
        }
Esempio n. 4
0
        /// <summary>
        /// This function retrieves the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing steady state load case.</param>
        /// <param name="loadTypes">Either <see cref="eLoadType.Load" /> or <see cref="eLoadType.Accel" />, indicating the type of each load assigned to the load case.</param>
        /// <param name="loadNames">The name of each load assigned to the load case.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Load" />, this item is the name of a defined load pattern.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />, this item is U1, U2, U3, R1, R2 or R3, indicating the direction of the load.</param>
        /// <param name="scaleFactor">The scale factor of each load assigned to the load case. [L/s^2] for U1 U2 and U3; otherwise unitless.</param>
        /// <exception cref="CSiException"></exception>
        public void GetLoads(string name,
                             ref eLoadType[] loadTypes,
                             ref string[] loadNames,
                             ref double[] scaleFactor)
        {
            string[] csiLoadTypes = new string[0];

            _callCode = _sapModel.LoadCases.StaticLinear.GetLoads(name, ref _numberOfItems, ref csiLoadTypes, ref loadNames, ref scaleFactor);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            loadTypes = new eLoadType[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadTypes[i] = EnumLibrary.ConvertStringToEnumByDescription <eLoadType>(csiLoadTypes[i]);
            }
        }
Esempio n. 5
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]);
            }
        }
Esempio n. 6
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]);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// This function retrieves the load data for the specified load case.
        /// </summary>
        /// <param name="name">The name of an existing power spectral density load case.</param>
        /// <param name="loadTypes">Either <see cref="eLoadType.Load" /> or <see cref="eLoadType.Accel" />, indicating the type of each load assigned to the load case.</param>
        /// <param name="loadNames">The name of each load assigned to the load case.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Load" />, this item is the name of a defined load pattern.
        /// If <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />, this item is U1, U2, U3, R1, R2 or R3, indicating the direction of the load.</param>
        /// <param name="functions">The name of the power spectral density function associated with each load.</param>
        /// <param name="scaleFactor">The scale factor of each load assigned to the load case. [L/s^2] for U1 U2 and U3; otherwise unitless.</param>
        /// <param name="phaseAngle">The phase angle for each load. [deg].</param>
        /// <param name="coordinateSystems">This is an array that includes the name of the coordinate system associated with each load.
        /// If this item is a blank string, the Global coordinate system is assumed.
        /// This item applies only when <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />.</param>
        /// <param name="angles">This is an array that includes the angle between the acceleration local 1 axis and the +X-axis of the coordinate system specified by <paramref name="coordinateSystems" />.
        /// The rotation is about the Z-axis of the specified coordinate system. [deg].
        /// This item applies only when <paramref name="loadTypes" /> = <see cref="eLoadType.Accel" />.</param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        public void GetLoads(string name,
                             ref eLoadType[] loadTypes,
                             ref string[] loadNames,
                             ref string[] functions,
                             ref double[] scaleFactor,
                             ref double[] phaseAngle,
                             ref string[] coordinateSystems,
                             ref double[] angles)
        {
            string[] csiLoadTypes = new string[0];

            _callCode = _sapModel.LoadCases.PSD.GetLoads(name, ref _numberOfItems, ref csiLoadTypes, ref loadNames, ref functions, ref scaleFactor, ref phaseAngle, ref coordinateSystems, ref angles);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadTypes = new eLoadType[_numberOfItems - 1];
            for (int i = 0; i < _numberOfItems; i++)
            {
                loadTypes[i] = EnumLibrary.ConvertStringToEnumByDescription <eLoadType>(csiLoadTypes[i]);
            }
        }
Esempio n. 8
0
 public EnumWithoutDescription ConvertStringToEnumByDescription_of_Existing_Enum_without_Description_Returns_Matching_Enum(string enumName)
 {
     return(EnumLibrary.ConvertStringToEnumByDescription <EnumWithoutDescription>(enumName));
 }