3 % Initialization of the Mesh structure
for a square domain
5 % Square domain is `[0,1]\times[0,1]`.<br/>
7 % This mesh has 4 boundary labels :
8 % - label 1 : boundary `y=0`
9 % - label 2 : boundary `x=1`
10 % - label 3 : boundary `y=1`
11 % - label 4 : boundary `x=0` <br/>
12 % There are N+1 points on each boundary.
15 % N: integer, number of elements on a boundary
21 % #ComputeAreaOpt, EdgeLengthOpt
23 % OptFEM2DP1 [V1.0d] - Copyright (C) 2013 CJS (LAGA)
25 % This file is part of OptFEM2DP1.
26 % OptFEM2DP1 is free software: you can redistribute it and/or modify
27 % it under the terms of the GNU General Public License as published by
28 % the Free Software Foundation, either version 3 of the License, or
29 % (at your option) any later version.
31 % OptFEM2DP1 is distributed in the hope that it will be useful,
32 % but WITHOUT ANY WARRANTY; without even the implied warranty of
33 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 % GNU General Public License
for more details.
36 % You should have received a copy of the GNU General Public License
37 % along with
this program. If
not, see <http:
40 mesh=msh2m_structured_mesh(t,t,1,1:4); % package msh
44 [x,y] = meshgrid(t,t);
60 be(:,1:N)=[I(1:end-1);I(2:end)];
64 be(:,N+1:2*N)=[I(1:end-1);I(2:end)];
69 be(:,2*N+1:3*N)=[I(1:end-1);I(2:end)];
74 be(:,3*N+1:4*N)=[I(1:end-1);I(2:end)];
77 Th=struct('q',q,'me',me,'ql',ql,'mel',zeros(1,nme),'be',be,'bel',bel, ...