Changeset 555 for trunk/examples/app-fermi/cee/fermi.c
- Timestamp:
- Dec 9, 2006, 1:33:35 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/app-fermi/cee/fermi.c
r159 r555 3 3 // 4 4 // This simple example shows how to use Rappture within a simulator 5 // written in Python.5 // written in C. 6 6 // ====================================================================== 7 // AUTHOR: Michael McLennan, Purdue University7 // AUTHOR: Derrick Kearney, Purdue University 8 8 // Copyright (c) 2004-2005 Purdue Research Foundation 9 9 // … … 12 12 // ====================================================================== 13 13 14 #include "RpLibraryCInterface.h" 15 #include "RpUnitsCInterface.h" 14 #include "rappture.h" 16 15 17 16 #include <stdlib.h> … … 69 68 dE = 0.005*(Emax-Emin); 70 69 70 rpPutString ( lib, 71 "output.curve(f12).about.label", 72 "Fermi-Dirac Factor", 73 RPLIB_OVERWRITE ); 74 rpPutString ( lib, 75 "output.curve(f12).xaxis.label", 76 "Fermi-Dirac Factor", 77 RPLIB_OVERWRITE ); 78 rpPutString ( lib, 79 "output.curve(f12).yaxis.label", 80 "Energy", 81 RPLIB_OVERWRITE ); 82 rpPutString ( lib, 83 "output.curve(f12).yaxis.units", 84 "eV", 85 RPLIB_OVERWRITE ); 86 71 87 while (E < Emax) { 72 88 f = 1.0/(1.0 + exp((E - Ef)/kT)); 73 89 sprintf(line,"%f %f\n",f, E); 74 rpPutString(lib,"output.curve(f12).component.xy", line, 1);90 rpPutString(lib,"output.curve(f12).component.xy", line, RPLIB_APPEND); 75 91 E = E + dE; 76 92 }
Note: See TracChangeset
for help on using the changeset viewer.