Ignore:
Timestamp:
Dec 9, 2006, 1:33:35 AM (18 years ago)
Author:
dkearney
Message:

updated examples removing output sections from tool.xml files and making the example code generate the output section using the rappture library put command. this change is made in the example files to help curb people from defining output sections in their tool.xml files. the output sections should really be created inside the program when the output data is ready to be entered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/app-fermi/cee/fermi.c

    r159 r555  
    33//
    44//  This simple example shows how to use Rappture within a simulator
    5 //  written in Python.
     5//  written in C.
    66// ======================================================================
    7 //  AUTHOR:  Michael McLennan, Purdue University
     7//  AUTHOR:  Derrick Kearney, Purdue University
    88//  Copyright (c) 2004-2005  Purdue Research Foundation
    99//
     
    1212// ======================================================================
    1313
    14 #include "RpLibraryCInterface.h"
    15 #include "RpUnitsCInterface.h"
     14#include "rappture.h"
    1615
    1716#include <stdlib.h>
     
    6968    dE = 0.005*(Emax-Emin);
    7069
     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
    7187    while (E < Emax) {
    7288        f = 1.0/(1.0 + exp((E - Ef)/kT));
    7389        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);
    7591        E = E + dE;
    7692    }
Note: See TracChangeset for help on using the changeset viewer.