2 %
function Mesh=
GetMesh(cFileName)
3 % Initialization of the Mesh structure from a FreeFEM++ mesh file
5 % Description plus longue...
8 % cFileName: file name (
string)
11 % Mesh: mesh structure
13 % Generated fields of Mesh:
14 % q: @code $\int_a^b f(x) dx$ @endcode
17 % usage: Th=GetMesh('carre.msh')
18 % This program is open source. For license terms, see the COPYING file.
20 % --------------------------------------------------------------------
22 % This product includes software developed for the RBmatlab project at
23 % (C) Universities of Stuttgart and Münster, Germany.
25 % RBmatlab is a MATLAB software package for model reduction with an
26 % emphasis on Reduced Basis Methods. The project is maintained by
27 % M. Dihlmann, M. Drohmann, B. Haasdonk, M. Ohlberger and M. Schaefer.
28 % For Online Documentation and Download we refer to www.morepas.org.
29 % --------------------------------------------------------------------
30 [fid,message]=fopen(cFileName,'r');
32 error([message,
' : ',cFileName]);
34 n=fscanf(fid,
'%d',3); ; % n(1) -> number of vertices
35 % n(2) -> number of triangles
36 % n(3) -> number of boundary edges
42 d_tmp=fscanf(fid,'%g',2);
45 ql(i)=fscanf(fid,'%d',1);
48 i_tmp=fscanf(fid,'%d',4);
56 i_tmp=fscanf(fid,'%d',3);
64 Mesh=struct('q',q,'me',me,'ql',ql,'mel',mel,'be',be,'bel',bel, ...