Exemple #1
0
        public EmbeddedNode BuildHostElementEmbeddedNode(Element element, Node node, IEmbeddedDOFInHostTransformationVector transformationVector)
        {
            IInverseInterpolation2D inverseInterpolation = Interpolation.CreateInverseMappingFor(Nodes);

            double[] naturalCoordinates = inverseInterpolation.TransformPointCartesianToNatural(new CartesianPoint(node.X, node.Y)).Coordinates;

            if (naturalCoordinates.Length == 0)
            {
                return(null);
            }

            element.EmbeddedNodes.Add(node);
            var embeddedNode = new EmbeddedNode(node, element, transformationVector.GetDependentDOFTypes);

            for (int i = 0; i < naturalCoordinates.Length; i++)
            {
                embeddedNode.Coordinates.Add(naturalCoordinates[i]);
            }
            return(embeddedNode);
        }