Ejemplo n.º 1
0
        static public void Save(MrrEquDictionary equations, string fileName)
        {
            XmlWriterSettings settings = new XmlWriterSettings();

            settings.CloseOutput = true;
            settings.Indent      = true;

            XmlWriter writer = XmlWriter.Create(fileName, settings);

            writer.WriteStartDocument(true);
            writer.WriteStartElement("MRR");
            foreach (int index in equations.IndexList)
            {
                writer.WriteStartElement("coeffs");
                writer.WriteAttributeString("type", index.ToString());
                double[] coefficients = equations.GetEquation(index);
                for (int i = 0; i < coefficients.Length; i++)
                {
                    writer.WriteStartElement("coeff");
                    writer.WriteAttributeString("index", i.ToString());
                    writer.WriteString(coefficients[i].ToString());
                    writer.WriteEndElement();
                }
                writer.WriteEndElement();
            }
            writer.WriteEndElement();
            writer.WriteEndDocument();
            writer.Close();
        }
Ejemplo n.º 2
0
        internal MRREquation(int equationIndex, double meshSize, double jetRadius, string fileName)
        {
            MrrEquDictionary equations = MrrEquFile.Open(fileName);

            mrrEquation = equations.GetEquation(equationIndex);
            mrrValues   = new double[mrrValueCount];
            mrrSum      = calcIntegral();
            fillValues(mrrSum);
            fillMatrix(meshSize, jetRadius, mrrSum);
        }
Ejemplo n.º 3
0
        public MRRFunction(int equationIndex)
        {
            MrrEquDictionary equations = MrrEquFile.Open();

            cfs = equations.GetEquation(equationIndex);
        }