Inheritance: AnalysisCaseAppliedLoad
 public string encode(AccelLoad.AccelLoadValues value)
 {
     switch (value) {
         case AccelLoad.AccelLoadValues.UX: return "Accel U1";
         case AccelLoad.AccelLoadValues.UY: return "Accel U2";
         case AccelLoad.AccelLoadValues.UZ: return "Accel U3";
         case AccelLoad.AccelLoadValues.RX: return "Accel R1";
         case AccelLoad.AccelLoadValues.RY: return "Accel R2";
         case AccelLoad.AccelLoadValues.RZ: return "Accel R3";
     }
     return " ";
 }
        private void readStaticCase(XmlNode node)
        {
            AnalysisCase aCase = null;
            string name = readAttribute(node, "Case", "").Trim();
            name = (name.Length > 0) ? name : Culture.Get("Case");
            foreach (AbstractCase ac in model.AbstractCases)
                if (ac.Name.Equals(name))
                {
                    aCase = ac as AnalysisCase;
                    break;
                }
            AnalysisCaseProps props = aCase.Properties;
            if (props is StaticCaseProps)
            {
                StaticCaseProps scprops = (StaticCaseProps)props;

                string lType = readAttribute(node, "LoadType", "Load Case");
                string lName = readAttribute(node, "LoadName", "").Trim();
                lName = (lName.Length > 0) ? lName : Culture.Get("Case");
                string sFact = readAttribute(node, "LoadSF", "0");

                AnalysisCaseAppliedLoad appLoad = null;
                if ("Load case".Equals(lType))
                    appLoad = model.LoadCases[lName];
                else
                    appLoad = new AccelLoad((AccelLoad.AccelLoadValues)Enum.Parse(typeof(AccelLoad.AccelLoadValues), lName));
                if (appLoad != null)
                {
                    StaticCaseFactor factor = new StaticCaseFactor(appLoad, float.Parse(sFact));
                    List<StaticCaseFactor> list = scprops.Loads;
                    list.Add(factor);
                    scprops.Loads = list;
                }
            }
        }
        private void readResponseSpectrumLoadCase(XmlNode node)
        {
            string name = readAttribute(node, "Case", "").Trim();
            name = (name.Length > 0) ? name : Culture.Get("Case");
            AnalysisCase aCase = null;
            foreach (AnalysisCase ac in model.AbstractCases)
                if (name.Equals(ac.Name))
                {
                    aCase = ac;
                    break;
                }
            if (aCase != null)
            {
                ResponseSpectrumCaseProps rsp = aCase.Properties as ResponseSpectrumCaseProps;
                if (rsp == null)
                {
                    rsp = new ResponseSpectrumCaseProps();
                    aCase.Properties = rsp;
                }
                List<ResponseSpectrumCaseFactor> list = rsp.Loads;

                //readAttribute(node, "LoadType", "Acceleration");
                AccelLoad load = new AccelLoad(decodeAccel(readAttribute(node, "LoadName", "Accel U1")));
                bool contains = false;
                foreach (ResponseSpectrumCaseFactor rscf in list)
                    if (rscf.Accel.Equals(load))
                        contains = true;
                if (!contains)
                {
                    list.Add(new ResponseSpectrumCaseFactor(load));
                    rsp.Loads = list;
                }
                //readAttribute(node, "CoordSys", "GLOBAL");

                float factor = float.Parse(readAttribute(node, "TransAccSF", "1"));
                string spectrum = readAttribute(node, "Function", rsp.ResponseSpectrumFunction.ToString());
                foreach (ResponseSpectrum rs in model.ResponseSpectra)
                    if (spectrum.Equals(rs.ToString()))
                    {
                        rsp.ResponseSpectrumFunction = rs;
                        rsp.ScaleFactor = factor;
                        break;
                    }

                //readAttribute(node, "Angle", "0");

            }
        }
        private void readModalCase(XmlNode node)
        {
            string name = readAttribute(node, "Case", "").Trim();
            name = (name.Length > 0) ? name : Culture.Get("Case");

            AnalysisCase aCase = null;
            foreach (AnalysisCase ac in model.AbstractCases)
                if (name.Equals(ac.Name))
                {
                    aCase = ac;
                    break;
                }

            if (aCase != null)
            {
                ModalCaseProps mcp = aCase.Properties as ModalCaseProps;
                if (mcp == null)
                {
                    mcp = new ModalCaseProps();
                    aCase.Properties = mcp;
                }
                mcp.ModesType = ModalCaseProps.ModesMethod.RitzVectors;

                List<ModalCaseFactor> list = mcp.Loads;

                bool isAccel = readAttribute(node, "LoadType", "Accel").Equals("Accel"); // else "Load Case"
                AnalysisCaseAppliedLoad load = null;
                if (isAccel)
                {
                    string tmp = readAttribute(node, "LoadName", "Accel ").Substring(6);
                    load = new AccelLoad((AccelLoad.AccelLoadValues)Enum.Parse(typeof(AccelLoad.AccelLoadValues), tmp));
                }
                else
                {
                    load = model.LoadCases[readAttribute(node, "LoadName", ((LoadCase)load).Name)];
                }
                ModalCaseFactor f = Contains(list, load);
                if (f == null)
                {
                    f = new ModalCaseFactor(load);
                    list.Add(f);
                }
                f.Cycles = int.Parse(readAttribute(node, "MaxCycles", f.Cycles.ToString()));
                f.Ratio = float.Parse(readAttribute(node, "TargetPar", f.Ratio.ToString()));
                mcp.Loads = list;
            }
        }
 public ResponseSpectrumCaseProps(AccelLoad.AccelLoadValues direction)
 {
     loads.Add(new ResponseSpectrumCaseFactor(new AccelLoad(direction)));
 }