Ejemplo n.º 1
0
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="uniqueName">Name of the unique material.</param>
        /// <param name="temperature">The temperature.</param>
        /// <returns>MaterialMechanicsAnisotropic.</returns>
        internal static MaterialMechanicsAnisotropic Factory(
            ApiCSiApplication app,
            string uniqueName,
            double temperature = 0)
        {
            MaterialMechanicsAnisotropic material = new MaterialMechanicsAnisotropic(app, uniqueName, temperature);

            material.Fill();
            return(material);
        }
        ///// <summary>
        ///// The different temperatures at which properties are specified for the material.
        ///// </summary>
        ///// <value>The temperatures.</value>
        //private List<double> _temperatures = new List<double>();
        ///// <summary>
        ///// The different temperatures at which properties are specified for the material.
        ///// </summary>
        ///// <value>The temperatures.</value>
        //public ReadOnlyCollection<double> Temperatures => new ReadOnlyCollection<double>(_temperatures);

        ///// <summary>
        ///// The properties by temperature
        ///// </summary>
        //private readonly List<MaterialByTemperature> _propertiesByTemperature = new List<MaterialByTemperature>();
        #endregion

        #region Initialization
        /// <summary>
        /// Factories the specified application.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="uniqueName">Name of the unique.</param>
        /// <param name="symmetryType">LoadType of the symmetry.</param>
        /// <param name="temperature">The temperature.</param>
        /// <returns>MaterialMechanics.</returns>
        internal static MaterialMechanics Factory(ApiCSiApplication app,
                                                  string uniqueName,
                                                  eMaterialSymmetryType symmetryType,
                                                  double temperature = 0)
        {
            switch (symmetryType)
            {
            case eMaterialSymmetryType.Anisotropic:
                return(MaterialMechanicsAnisotropic.Factory(app, uniqueName, temperature));

            case eMaterialSymmetryType.Isotropic:
                return(MaterialMechanicsIsotropic.Factory(app, uniqueName, temperature));

            case eMaterialSymmetryType.Orthotropic:
                return(MaterialMechanicsOrthotropic.Factory(app, uniqueName, temperature));

            case eMaterialSymmetryType.Uniaxial:
                return(MaterialMechanicsUniaxial.Factory(app, uniqueName, temperature));

            default:
                return(null);
            }
        }