Changeset 23363
- Timestamp:
- 10/01/18 14:46:53 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m
r22821 r23363 23 23 resolution=getfieldvalue(options,'resolution')*1000; 24 24 25 %initialize mesh: 25 %initialize mesh: 26 26 mesh=mesh3dsurface; 27 27 … … 97 97 end 98 98 fprintf(fid,'};\n'); 99 99 100 100 fclose(fid); 101 101 % }}} … … 112 112 end 113 113 if isempty(gmshpath), 114 error('gm tnot found, make sure it is properly installed');114 error('gmsh not found, make sure it is properly installed'); 115 115 end 116 116 … … 161 161 mesh.numberofelements=fscanf(fid,'%i',1); 162 162 A=fscanf(fid,'%i %i %i %i %i %i %i %i',[8 mesh.numberofelements]); 163 mesh.elements=A(6:8,:)'; 163 mesh.elements=A(6:8,:)'; 164 164 A=fscanf(fid,'%s',1); 165 165 if ~strcmp(A,'$EndElements'), 166 166 error(['Expecting $EndElements (' A ')']); 167 167 end 168 fclose(fid); 168 fclose(fid); 169 169 %}}} 170 170 171 %figure out other fields in mesh3dsurface: 171 %figure out other fields in mesh3dsurface: 172 172 mesh.r=sqrt(mesh.x.^2+mesh.y.^2+mesh.z.^2); 173 173 mesh.lat = asin(mesh.z./mesh.r)/pi*180; 174 174 mesh.long = atan2(mesh.y,mesh.x)/pi*180; 175 175 176 %erase files: 176 %erase files: 177 177 system('rm -rf sphere.geo sphere.msh sphere.pos'); 178 178 179 %return mesh: 179 %return mesh: 180 180 return;
Note:
See TracChangeset
for help on using the changeset viewer.