public Vector GetResultAtPoint(Point point, double t)
        {
            IFiniteElement element = getElementForPoint(point);
            Vector result = null;
            if (element != null)
            {
                int time = (int)(cutTime(t) / _deltaTime);

                FiniteElementRectangle elementKsiTeta = new FiniteElementRectangle()
                    {
                        Node1 = new FiniteElementNode(-1, -1),
                        Node3 = new FiniteElementNode(1, 1)
                    };
                Point pointKsiTeta = ResultHelper.TransformCoordinates(point, element, elementKsiTeta);
                Matrix finiteElementApproximationMatrix = getFiniteElementApproximationMatrix(pointKsiTeta);
                result = GetUByElement(element, U[time]) * finiteElementApproximationMatrix;
            }
            return result;
        }
        private void GenerateFiniteElements(int LElements, int HElements)
        {
            Elements.Clear();

            int LNodes = LElements + 1;
            int finiteElementsCount = Nodes.Count - LNodes;

            for (int i = 0; i < finiteElementsCount; i++)
            {
                if ((i + 1) % LNodes != 0)
                {
                    FiniteElementRectangle element = new FiniteElementRectangle();
                    element.Node4 = Nodes[i];
                    element.Node3 = Nodes[i + 1];
                    element.Node1 = Nodes[i + LNodes];
                    element.Node2 = Nodes[i + LNodes + 1];

                    Elements.Add(element);
                }

            }

        }
 public Vector GetResultAtPoint(Point point, double t)
 {
     IFiniteElement element = getElementForPoint(point);
     Vector result = null;
     if (element != null)
     {
         FiniteElementRectangle elementKsiTeta = new FiniteElementRectangle()
             {
                 Node1 = new FiniteElementNode(-1, -1),
                 Node3 = new FiniteElementNode(1, 1)
             };
         Point pointKsiTeta = ResultHelper.TransformCoordinates(point, element, elementKsiTeta);
         Matrix finiteElementApproximationMatrix = getFiniteElementApproximationMatrix(pointKsiTeta);
         result = GetUByElement(element) * (finiteElementApproximationMatrix * Math.Cos(_frequency * t));
     }
     return result;
 }
 private Shape ConvertFiniteElementToShape(FiniteElementRectangle fe)
 {
     Rectangle rectangle = new Rectangle(fe.Node1.Point.X, fe.Node1.Point.Y, fe.Node3.Point.Y - fe.Node1.Point.Y, fe.Node3.Point.X - fe.Node1.Point.X);
     return rectangle;
 }