private void FillResultPicture()
 {
     CylindricalPlate plate = solidMechanicsModel.Model.Shape as CylindricalPlate;
     if (plate != null)
     {
         LinearMesh mesh = new LinearMesh(plate, solidMechanicsModel.HorizontalElements);
         List<Shape> shapes = new List<Shape>();
         foreach (FiniteElementRectangle fe in mesh.Elements)
         {
             shapes.Add(ConvertFiniteElementToShape(fe));
         }
         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
         {
             Figures.Clear();
             foreach (Shape shape in shapes)
             {
                 Figures.Add(shape);
             }
         }));
     }
 }
        public void Solve()
        {
            Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            {
                CylindricalPlate plate = solidMechanicsModel.Model.Shape as CylindricalPlate;
                if (plate != null)
                {
                    LinearMesh mesh = new LinearMesh(plate, solidMechanicsModel.HorizontalElements);
                    Stopwatch sw = new Stopwatch();
                    sw.Start();

                    Solver solver = new CylindricalPlate1DSolver(solidMechanicsModel.Model, mesh, error, solidMechanicsModel.MaxAmplitude);
                    IEnumerable<INumericalResult> results = solver.Solve(maxResults);

                    sw.Stop();
                    TimeElapsed = sw.Elapsed;

                    pointsForGrid = mesh.GetPointsForResult();
                    Results.Clear();
                    foreach (INumericalResult result in results)
                    {
                        Results.Add(result);
                    }
                }
            }));
        }