I am using the geometryFromEdges function to generate the geometry in which I want to solve the PDE. All the geometry will be formed by rectangles, but the number of rectangles could vary. So I need to identify the FaceLabel ID for every rectangle to set the PDE coefficients properly. Following you can see a section of my code where I define the geometry:
%Create the PDE model with a single dependent variable.
numberOfPDE = 1;model = createpde(numberOfPDE);% Geometry description:
DIE = [3, 4, -x_ds/2, x_ds/2, x_ds/2, -x_ds/2, -y_ds/2, -y_ds/2, y_ds/2, y_ds/2]';MR = [3, 4, xinfMR, xsupMR, xsupMR, xinfMR, yinfMR, yinfMR, ysupMR, ysupMR]';AR = [3, 4, xinfAR, xsupAR, xsupAR, xinfAR, yinfAR, yinfAR, ysupAR, ysupAR]';DR = [3, 4, xinfDR, xsupDR, xsupDR, xinfDR, yinfDR, yinfDR, ysupDR, ysupDR]';%Define geometry
gm=[DIE,MR,AR,DR];sf='DIE+MR+AR+DR';ns=char('DIE','MR','AR','DR');ns=ns';g=decsg(gm,sf,ns);geometryFromEdges(model,g);
So is there any way to map the geometry labels from gm variable (DIE, MR, AR and DR) to the Face labels ID after generating the geometry for the pde?
Thanks in advanced for any help on that.
Best Answer