makenode.m
来自「实现对电磁层析模型的建立」· M 代码 · 共 46 行
M
46 行
function [Node]=MakeNode(Element,Nodelist,g);%MakeNode Computes the Node data structure for a 2D mesh % Function [Node]=MakeNode(Element,Nodelist,g);% computes the Node data for a mesh.% Node is a structure including all the nodal coordinates and% for each node there is information to which nodes (NodeConnection) % and elements (ElementConnection) the node is% connected. %% INPUT%% Element = Element structure, see MakeElement.m % Nodelist = list of all the faces, see MakeElement.m % g = coordinates of the nodes %% OUTPUT%% Node = node structure% M. Vauhkonen, University of Kuopio, Finland, 11.8.1999 % University of Kuopio, Department of Applied Physics, PO Box 1627,% FIN-70211 Kuopio, Finland, email: Marko.Vauhkonen@uku.fi[rg,cg]=size(g);msE=max(size(Element));for ii=1:rg ElementConnection=[]; Node(ii).Coordinate=[g(ii,:)]; for jj=1:msE if find(Element(jj).Topology==ii) ElementConnection=[ElementConnection,jj]; end end Node(ii).ElementConnection=ElementConnection; Nc=[]; [I,J]=find(Nodelist==ii); un=(Nodelist(I,:)); un=unique(un(:)); Nc=un(un~=ii); Node(ii).NodeConnection=Nc;end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?