Changeset 3739 for branches/1.3/examples/zoo/mesh/mesh.m
- Timestamp:
- Jul 3, 2013 8:39:28 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/examples/zoo/mesh/mesh.m
r3735 r3739 13 13 14 14 switch meshtype 15 case 'unirect2d'16 mesh = 'output.unirect2d';17 rpLibPutString(lib, 'output.unirect2d.about.label', \18 'unirect2d mesh (deprecated)', 0);19 rpLibPutString(lib, 'output.unirect2d.dim', '2', 0);20 rpLibPutString(lib, 'output.unirect2d.units', 'm', 0);21 rpLibPutString(lib, 'output.unirect2d.hide', 'yes', 0);22 23 % Create a unirect2d mesh. The mesh will be used in the 'field'24 % object below. We will specify a mesh and then provide the data25 % points to the field.26 27 rpLibPutString(lib, 'output.unirect2d.xaxis.label', 'Fermi-Dirac Factor',0);28 rpLibPutString(lib, 'output.unirect2d.yaxis.label', 'Energy', 0);29 30 % The uniform grid that we are specifying is a mesh of 50 points on31 % the x-axis and 50 points on the y-axis. The 50 points are32 % equidistant between 0.0 and 1.033 34 % Specify the x-axis of the mesh35 rpLibPutString(lib, 'output.unirect2d.xaxis.min', '0.0', 0);36 rpLibPutString(lib, 'output.unirect2d.xaxis.max', '1.0', 0);37 rpLibPutString(lib, 'output.unirect2d.xaxis.numpoints', '50', 0);38 39 % Specify the y-axis of the mesh40 rpLibPutString(lib, 'output.unirect2d.yaxis.min', '0.0', 0);41 rpLibPutString(lib, 'output.unirect2d.yaxis.max', '1.0', 0);42 rpLibPutString(lib, 'output.unirect2d.yaxis.numpoints', '50', 0);43 44 case 'oldcloud'45 mesh = 'output.cloud';46 rpLibPutString(lib, 'output.cloud.about.label', 'cloud (deprecated)', 0);47 rpLibPutString(lib, 'output.cloud.dim', '2', 0);48 rpLibPutString(lib, 'output.cloud.units', 'm', 0);49 rpLibPutString(lib, 'output.cloud.hide', 'yes', 0);50 51 xv = linspace(0, 1, 50)52 for i = 1:5053 for j = 1:5054 string = sprintf('%12g %12g\n', xv(i), xv(j));55 rpLibPutString(lib, 'output.cloud.points', string, 1);56 endfor57 endfor58 59 15 case 'cloud' 60 16 mesh = 'output.mesh';
Note: See TracChangeset
for help on using the changeset viewer.