示例#1
0
        //private bool isElementEmbedded = false;

        public ElementEmbedder(Model model, Element embeddedElement, IEmbeddedDOFInHostTransformationVector transformation)
        {
            this.model           = model;
            this.embeddedElement = embeddedElement;
            this.transformation  = transformation;
            Initialize();
        }
示例#2
0
        public EmbeddedNode BuildHostElementEmbeddedNode(Element element, Node node, IEmbeddedDOFInHostTransformationVector transformationVector)
        {
            var points = GetNaturalCoordinates(element, node);

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

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

            for (int i = 0; i < points.Length; i++)
            {
                embeddedNode.Coordinates.Add(points[i]);
            }
            return(embeddedNode);
        }
示例#3
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);
        }
示例#4
0
 public ThermalEmbeddedGrouping(Model model, IEnumerable <Element> hostGroup, IEnumerable <Element> embeddedGroup,
                                IEmbeddedDOFInHostTransformationVector transformer)
 {
     this.model         = model;
     this.HostGroup     = hostGroup;
     this.EmbeddedGroup = embeddedGroup;
     this.transformer   = transformer;
     hostGroup.Select(e => e.ElementType).Distinct().ToList().ForEach(et =>
     {
         if (!(et is IEmbeddedHostElement))
         {
             throw new ArgumentException("EmbeddedGrouping: One or more elements of host group does NOT implement IEmbeddedHostElement.");
         }
     });
     embeddedGroup.Select(e => e.ElementType).Distinct().ToList().ForEach(et =>
     {
         if (!(et is IEmbeddedElement))
         {
             throw new ArgumentException("EmbeddedGrouping: One or more elements of embedded group does NOT implement IEmbeddedElement.");
         }
     });
 }