Ignore:
Timestamp:
Jul 3, 2013 8:39:28 AM (11 years ago)
Author:
gah
Message:

bandaid R bindings for R 3.0.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/examples/zoo/mesh/mesh.m

    r3735 r3739  
    1313
    1414switch 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 data
    25     % 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 on
    31     % the x-axis and 50 points on the y-axis.  The 50 points are
    32     % equidistant between 0.0 and 1.0
    33 
    34     % Specify the x-axis of the mesh
    35     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 mesh
    40     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:50
    53       for j = 1:50
    54         string = sprintf('%12g  %12g\n', xv(i), xv(j));
    55         rpLibPutString(lib, 'output.cloud.points', string, 1);
    56       endfor
    57     endfor
    58 
    5915  case 'cloud'
    6016    mesh = 'output.mesh';
Note: See TracChangeset for help on using the changeset viewer.