You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
428 B
18 lines
428 B
% compute the center coordinate of every subdomain/ellipse
|
|
function coor = centerCoordinate(lx, ly, ly_full, nelx, nely)
|
|
|
|
cx = lx/2;
|
|
cy = ly_full - ly/2;
|
|
|
|
coor = zeros(nely, nelx, 2);
|
|
coor(1,1,:) = [cx, cy]; % NOTE is [cx, cy]
|
|
|
|
for i = 1:nelx
|
|
cy = ly_full - ly/2;
|
|
for j = 1:nely
|
|
coor(j,i,:) = [cx, cy];
|
|
cy = cy - ly;
|
|
end
|
|
cx = cx + lx;
|
|
end
|
|
end
|