⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makemeshdata.m

📁 MATLAB二维电阻抗断层成像算法!用于医学成像,里面包括有限元剖分正问题,及反问题的算法.并且附有网络剖分数据表!
💻 M
字号:
% MakeMeshData is a script that builds two circular  
% meshes for 2D EIT Package demos. Denser mesh (mesh 2) is for forward computations and
% a coarse mesh (mesh 1) for inverse computations. See also 
% meshgen_eit2d.m , MakeElement and  MakeNode. 
clear all
clc
S=1; % Length of the electrode.
N=24;  % Number of the electrodes.
r=10;  % Radius of the circle.
style='s'; % 's' for the structured mesh and 'u' for the unstructured mesh

[H1,g1,H2,g2,E1,E2,Ind2,Indb1,Indb2] = meshgen_eit2d(S,N,r,style);
[Element1,Nodelist1]=MakeElement(H1,Indb1,E1);
[Node1]=MakeNode(Element1,Nodelist1,g1);
[Element2,Nodelist2]=MakeElement(H2,Indb2,E2);
[Node2]=MakeNode(Element2,Nodelist2,g2);

save('meshdata24','Element1','Node1','Element2','Node2','Ind2')


%%% If you do not have access to QMG, try next one

%r=[14,12,10,8,5,3,0]; % Radii of rings in course mesh
%N=[32,26,20,16,12,8,1]; % Number of nodes in each ring
%eI=[1,1];      % Number of elements in the electrode and between electrodes
%[g1,gp,H1,E1]=cirgrid_eit(r,N,eI); % make the course circular grid
%% G 1 is the coods of nodes H1 is a list of nodes of each triangle
%% gp is the polar coordinates (not needed)
%% Each row of E1 is a list of elements under an electrode
%[g2,H2,Ind2] = RefineMesh(g1,H1); % Make a finer mesh for the potential
%% Mesh 1 is for resistivity Mesh 2 is for potential
%% Ind2 which elements of mesh 2 are in which element of mesh 1
%%     a sparse boolean array

%%Now calculate the electrode information for the fine mesh
%E2=[];
%for ii=1:size(E1,1)
% Eii=E1(ii,:);
% E2ii=[];
%  for jj=1:size(Eii,2)
%   Ind=find(Ind2(:,Eii(jj)));
%   E2ii=[E2ii,Ind(1:2)']; 
%  end
% E2=[E2;E2ii];
%end 

%Indb1=findboundary(g1,H1); % Index of boundary
%Indb2=findboundary(g2,H2);

%[Element1,Nodelist1]=MakeElement(H1,Indb1,E1);
%[Node1]=MakeNode(Element1,Nodelist1,g1);
%[Element2,Nodelist2]=MakeElement(H2,Indb2,E2);
%[Node2]=MakeNode(Element2,Nodelist2,g2);

%% Element1(k).Topology is H(1,:) etc
%% Element1(k).Face(:,1) is neighbouring elements 0 if no neighbour
%% Element1(k).Face(:,2) is electrode number ,0 if not on an electrode
%% Node1(k).Coordinate is coordinates kth node


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -