Exemplo n.º 1
0
        public List <string> GetAllPatchNames()
        {
            List <string>          names = new List <string>();
            FoamDictionaryListFile f     = new FoamDictionaryListFile(FoamConst.GetBoundaryFileNameFromVxt(vxtFileName));

            f.Read();
            if (!f.Dictionary.IsNull)
            {
                foreach (KeyValuePair <string, FoamDictionary> k in f.Dictionary)
                {
                    names.Add(k.Key);
                }
            }
            return(names);
        }
Exemplo n.º 2
0
        public void SetBoundaryType(string name, BoundaryType bt)
        {
            FoamDictionaryListFile f = new FoamDictionaryListFile(FoamConst.GetBoundaryFileNameFromVxt(vxtFileName));

            f.Read();
            if (!f.Dictionary.IsNull)
            {
                foreach (KeyValuePair <string, FoamDictionary> k in f.Dictionary)
                {
                    if (k.Key == name)
                    {
                        FoamDictionary cv = k.Value;
                        cv.SetChild("type", bt.ToString());
                        cv.RemoveChild("inGroups");
                    }
                }
            }
            f.Write();
        }
Exemplo n.º 3
0
        public List <string> GetPatchNamesByType(string typeName)
        {
            List <string>          names = new List <string>();
            FoamDictionaryListFile f     = new FoamDictionaryListFile(FoamConst.GetBoundaryFileNameFromVxt(vxtFileName));

            f.Read();
            if (!f.Dictionary.IsNull)
            {
                foreach (KeyValuePair <string, FoamDictionary> k in f.Dictionary)
                {
                    FoamDictionary cv = k.Value;
                    if (cv.Child("type").Data == typeName)
                    {
                        names.Add(k.Key);
                    }
                }
            }
            return(names);
        }
Exemplo n.º 4
0
        private void button6_Click(object sender, EventArgs e)
        {
            FoamDictionaryListFile f = new FoamDictionaryListFile(@"F:\lflow\testdata\r400_1.run\constant\polyMesh\boundary");

            f.Read();
        }