Exemple #1
0
        private int GetResType(ListProc resultType)
        {
            /*
             * LT_CASE = 1,
             * LT_CS = 2,  (construction stage)
             * LT_COMB = 3,
             * ...
             */

            string r = resultType.ToString();

            if (r.StartsWith("QuantityEstimation") || r.EndsWith("Utilization") || r.Contains("MaxComb") || r.StartsWith("FeaNode") || r.StartsWith("FeaBar") || r.StartsWith("FeaShell") || r.StartsWith("EigenFrequencies"))
            {
                return(0);
            }
            if (r.EndsWith("LoadCase"))
            {
                return(1);
            }
            if (r.EndsWith("LoadCombination"))
            {
                return(3);
            }
            if (r.StartsWith("NodalVibrationShape"))
            {
                return(6);
            }

            throw new NotImplementedException($"'restype' index for {r} is not implemented.");
        }
Exemple #2
0
        // Assumption
        // the method is returning the results every 50 cm for bar elements.
        // Future Development...Get the user to decide the step ?
        // It is RUBBISH code developed to Deconstruct the Results

        public static Options GetOptions(ListProc resultType)
        {
            string r = resultType.ToString();

            if (r.StartsWith("BarsInternalForces") || r.StartsWith("BarsStresses") || r.StartsWith("BarsDisplacements") || r.StartsWith("LabelledSection"))
            {
                return(new Options(1, 0.5));
            }
            else if (r.StartsWith("ShellDisplacement") || r.StartsWith("ShellStress") || r.StartsWith("ShellInternalForce") || r.StartsWith("ShellDerivedForce"))
            {
                return(new Options(1, "srf"));
            }
            else
            {
                return(new Options());
            }
        }
Exemple #3
0
        private int GetDefaultCaseIndex(ListProc resultType)
        {
            string r = resultType.ToString();

            if (r.StartsWith("QuantityEstimation") || r.EndsWith("Utilization") || r.Contains("MaxComb") || r.StartsWith("FeaNode") || r.StartsWith("FeaBar") || r.StartsWith("FeaShell") || r.StartsWith("EigenFrequencies"))
            {
                return(0);
            }
            if (r.EndsWith("LoadCase"))
            {
                return(-65536); // All load cases
            }
            if (r.EndsWith("LoadCombination") || r.StartsWith("NodalVibrationShape"))
            {
                return(-1); // All load combinations
            }
            throw new FormatException($"Default case index of ResultType.{resultType} not known.");
        }