Exemple #1
0
        public Element2D(ElementCode elementcode, Material material, params Node[] nodes)
        {
            this.elementcode = elementcode;
            this.material = material;
            ElementParameter ElePara = ElementList.Serendipity.Find(l => l.ELEMENTCODE == elementcode);

            if ((ElePara.DIM == 2) & (ElePara.NODENUM == nodes.Length))
            {
                for (int i = 0; i < ElePara.NODENUM; ++i)
                {
                    Nodes.Add(nodes[i]);
                }
                for (int i = 0; i < ElePara.NODENUM; ++i)
                {
                    Edges.Add(new Edge(nodes[i].ID, nodes[(i + 1) % ElePara.NODENUM].ID));
                }
            }
            else
            {
                throw new FormatException();
            }
        }
Exemple #2
0
 /// <summary>
 /// コピーコンストラクタ
 /// </summary>
 /// <param name="source"></param>
 public Element3D(Element3D source)
 {
     elementcode = source.elementcode;
     material = source.material;
     Nodes = new List<Node>();
     for (int i = 0; i < source.Nodes.Count; ++i)
     {
         Nodes.Add(new Node(source.Nodes[i]));
     }
     Edges = new List<Edge>();
     for (int i = 0; i < source.Edges.Count; ++i)
     {
         Edges.Add(new Edge(source.Edges[i]));
     }
     Surfaces = new List<Surface3D>();
     for (int i = 0; i < source.Surfaces.Count; ++i)
     {
         Surfaces.Add(new Surface3D(source.Surfaces[i]));
     }
     center = new Node(source.center);
     radius = source.radius;
     DeleteFlag = source.DeleteFlag;
 }
Exemple #3
0
 public Element(ElementCode elementcode, Material material)
 {
     this.elementcode = elementcode;
     this.material = material;
     ElementParameter ElePara = ElementList.Serendipity.Find(l => l.ELEMENTCODE == elementcode);
 }