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); }
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(); }
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); }
private void button6_Click(object sender, EventArgs e) { FoamDictionaryListFile f = new FoamDictionaryListFile(@"F:\lflow\testdata\r400_1.run\constant\polyMesh\boundary"); f.Read(); }