Ejemplo n.º 1
0
        public void InitCaseBoundary()
        {
            if (currentMeshFileName == "")
            {
                return;
            }
            PolyMesh      mesh    = new PolyMesh(currentMeshFileName);
            List <string> patches = mesh.GetPatchNamesByType("patch");
            List <string> walls   = mesh.GetPatchNamesByType("wall");
            List <string> syms    = mesh.GetPatchNamesByType("symmetry");

            currentCase.Field.Boundarys.Clear();

            foreach (string wall in walls)
            {
                AdiabatWall aw = new AdiabatWall(wall);
                currentCase.Field.Boundarys.Add(aw);
            }
            foreach (string sym in syms)
            {
                Symmetry sp = new Symmetry(sym);
                currentCase.Field.Boundarys.Add(sp);
            }
            foreach (string pn in patches)
            {
                if (pn.StartsWith("up", StringComparison.OrdinalIgnoreCase))
                {
                    Upface uf = new Upface(pn);
                    currentCase.Field.Boundarys.Add(uf);
                }
                else
                {
                    Plug p = new Plug(pn);
                    currentCase.Field.Boundarys.Add(p);
                }
            }
            UpdateCaseObject();
        }