コード例 #1
0
        void FindAllStreamLines()
        {
            FindInitSpecial();
            double tmp = w.AlphaRadians;

            w.AlphaDegrees  = 0;
            StreamLines     = new List <List <DataPoint> >();
            StreamLinesBase = new List <List <DataPoint> >();
            async_full      = new FullBuildAsync(AsyncFullBuild);
            res_list        = new List <IAsyncResult>();
            for (double y = h; y <= y_max - h; y += h)
            {
                StreamLines.Add(new List <DataPoint>());
                StreamLines.Add(new List <DataPoint>());
                StreamLinesBase.Add(new List <DataPoint>());
                StreamLinesBase.Add(new List <DataPoint>());
                res_list.Add(async_full.BeginInvoke(StreamLinesBase[StreamLinesBase.Count - 2], StreamLinesBase[StreamLinesBase.Count - 1], StreamLines[StreamLines.Count - 2], StreamLines[StreamLines.Count - 1], Exp(I * tmp), y, null, null));
            }
            LeftStagnationPoint  = w.f.z(LeftStagnationPointBase * Exp(I * tmp));
            RightStagnationPoint = w.f.z(RightStagnationPointBase * Exp(I * tmp));
            g.DrawStagnationPoints(RightStagnationPoint, LeftStagnationPoint);
            LeftSpecialStreamLine  = new List <DataPoint>();
            RightSpecialStreamLine = new List <DataPoint>();
            res_list.Add(async_transform.BeginInvoke(LeftSpecialStreamLineBase, LeftSpecialStreamLine, Exp(I * tmp), null, null));
            res_list.Add(async_transform.BeginInvoke(RightSpecialStreamLineBase, RightSpecialStreamLine, Exp(I * tmp), null, null));
            while (!res_list.IsAllThreadsCompleted())
            {
            }
            w.AlphaRadians = tmp;
            res_list       = null;
        }
コード例 #2
0
 void FindAllStreamLines()
 {
     async_full = new FullBuildAsync(AsyncFullBuild);
     res_list   = new List <IAsyncResult>();
     for (double y = y_min + h; y <= y_max - h; y += h)
     {
         StreamLines.Add(new List <DataPoint>());
         StreamLinesBase.Add(new List <DataPoint>());
         res_list.Add(async_full.BeginInvoke(StreamLinesBase[StreamLinesBase.Count - 1], StreamLines[StreamLines.Count - 1], y, null, null));
     }
     while (!res_list.IsAllThreadsCompleted())
     {
     }
     res_list = null;
 }