Ignore:
Timestamp:
Sep 21, 2012 10:01:16 AM (12 years ago)
Author:
mmc
Message:

Updated all of the copyright notices to reference the transfer to
the new HUBzero Foundation, LLC.

Location:
trunk/examples/objects/app-fermi
Files:
16 edited

Legend:

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

    r1655 r3177  
    1 // ----------------------------------------------------------------------
    2 //  EXAMPLE: Fermi-Dirac function in C
    3 //
    4 //  This simple example shows how to use Rappture within a simulator
    5 //  written in C.
    6 // ======================================================================
    7 //  AUTHOR:  Derrick Kearney, Purdue University
    8 //  Copyright (c) 2005-2009  Purdue Research Foundation
    9 //
    10 //  See the file "license.terms" for information on usage and
    11 //  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12 // ======================================================================
    13 
     1/*
     2 * ----------------------------------------------------------------------
     3 *  EXAMPLE: Fermi-Dirac function in C
     4 *
     5 *  This simple example shows how to use Rappture within a simulator
     6 *  written in C.
     7 * ======================================================================
     8 *  AUTHOR:  Derrick Kearney, Purdue University
     9 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10 *
     11 *  See the file "license.terms" for information on usage and
     12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     13 * ======================================================================
     14 */
    1415#include "rappture.h"
    1516
     
    2324int main(int argc, char * argv[]) {
    2425
    25     // declare variables to interact with Rappture
     26    /* declare variables to interact with Rappture */
    2627    double T          = 0.0;
    2728    double Ef         = 0.0;
     
    3031
    3132
    32     // declare program variables
     33    /* declare program variables */
    3334    double E          = 0.0;
    3435    double dE         = 0.0;
     
    4243    double fArr[nPts];
    4344
    44     // initialize the global interface
     45    /* initialize the global interface */
    4546    Rp_InterfaceInit(argc,argv,&fermi_io);
    4647
    47     // check the global interface for errors
     48    /* check the global interface for errors */
    4849    if (Rp_InterfaceError() != 0) {
    49         // there were errors while setting up the interface
    50         // dump the traceback
     50        /* there were errors while setting up the interface */
     51        /* dump the traceback */
    5152        Rp_Outcome *o = Rp_InterfaceOutcome();
    5253        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    5556    }
    5657
    57     // connect variables to the interface
    58     // look in the global interface for an object named
    59     // "temperature", convert its value to Kelvin, and
    60     // store the value into the address of T.
    61     // look in the global interface for an object named
    62     // "Ef", convert its value to electron Volts and store
    63     // the value into the address of Ef.
    64     // look in the global interface for an object named
    65     // factorsTable and set the variable result to
    66     // point to it.
     58    /*
     59     * connect variables to the interface
     60     * look in the global interface for an object named
     61     * "temperature", convert its value to Kelvin, and
     62     * store the value into the address of T.
     63     * look in the global interface for an object named
     64     * "Ef", convert its value to electron Volts and store
     65     * the value into the address of Ef.
     66     * look in the global interface for an object named
     67     * factorsTable and set the variable result to
     68     * point to it.
     69     */
    6770    Rp_InterfaceConnect("temperature",&T,"units=K",NULL);
    6871    Rp_InterfaceConnect("Ef",&Ef,"units=eV",NULL);
     
    7073    Rp_InterfaceConnect("fdfPlot2",p2,NULL);
    7174
    72     // check the global interface for errors
     75    /* check the global interface for errors */
    7376    if (Rp_InterfaceError() != 0) {
    74         // there were errors while retrieving input data values
    75         // dump the traceback
     77        /* there were errors while retrieving input data values */
     78        /* dump the traceback */
    7679        Rp_Outcome *o = Rp_InterfaceOutcome();
    7780        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    8083    }
    8184
    82     // do science calculations
     85    /* do science calculations */
    8386    kT = 8.61734e-5 * T;
    8487    Emin = Ef - (10*kT);
     
    9699    }
    97100
    98     // set up the curves for the plot by using the add command
    99     // Rp_PlotAdd(plot,name,nPts,xdata,ydata,fmt);
    100     //
    101     // to group curves on the same plot, just keep adding curves
    102     // to save space, X array values are compared between curves.
    103     // the the X arrays contain the same values, we only store
    104     // one version in the internal data table, otherwise a new
    105     // column is created for the array. for big arrays this may take
    106     // some time, we should benchmark to see if this can be done
    107     // efficiently.
    108 
     101    /*
     102     * set up the curves for the plot by using the add command
     103     * Rp_PlotAdd(plot,name,nPts,xdata,ydata,fmt);
     104     *
     105     * to group curves on the same plot, just keep adding curves
     106     * to save space, X array values are compared between curves.
     107     * the the X arrays contain the same values, we only store
     108     * one version in the internal data table, otherwise a new
     109     * column is created for the array. for big arrays this may take
     110     * some time, we should benchmark to see if this can be done
     111     * efficiently.
     112     */
    109113    Rp_PlotAdd(p1,"fdfCurve1",nPts,fArr,EArr,"g:o");
    110114
     
    112116    Rp_PlotAdd(p2,"fdfCurve3",nPts,fArr,EArr,"p--");
    113117
    114     // close the global interface
    115     // signal to the graphical user interface that science
    116     // calculations are complete and to display the data
    117     // as described in the views
     118    /*
     119     * close the global interface
     120     * signal to the graphical user interface that science
     121     * calculations are complete and to display the data
     122     * as described in the views
     123     */
    118124    Rp_InterfaceClose();
    119125
  • trunk/examples/objects/app-fermi/c/ex3/fermi.c

    r1659 r3177  
    1 // ----------------------------------------------------------------------
    2 //  EXAMPLE: Fermi-Dirac function in C
    3 //
    4 //  This simple example shows how to use Rappture within a simulator
    5 //  written in C.
    6 // ======================================================================
    7 //  AUTHOR:  Derrick Kearney, Purdue University
    8 //  Copyright (c) 2005-2009  Purdue Research Foundation
    9 //
    10 //  See the file "license.terms" for information on usage and
    11 //  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12 // ======================================================================
    13 
     1/*
     2 * ----------------------------------------------------------------------
     3 *  EXAMPLE: Fermi-Dirac function in C
     4 *
     5 *  This simple example shows how to use Rappture within a simulator
     6 *  written in C.
     7 * ======================================================================
     8 *  AUTHOR:  Derrick Kearney, Purdue University
     9 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10 *
     11 *  See the file "license.terms" for information on usage and
     12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     13 * ======================================================================
     14 */
    1415#include "rappture.h"
    1516
     
    2324int main(int argc, char * argv[]) {
    2425
    25     // declare variables to interact with Rappture
     26    /* declare variables to interact with Rappture */
    2627    double T          = 0.0;
    2728    double Ef         = 0.0;
     
    3233
    3334
    34     // declare program variables
     35    /* declare program variables */
    3536    double E          = 0.0;
    3637    double dE         = 0.0;
     
    4546    double fArr2[nPts];
    4647
    47     // initialize the global interface
     48    /* initialize the global interface */
    4849    Rp_InterfaceInit(argc,argv,&fermi_io);
    4950
    50     // check the global interface for errors
     51    /* check the global interface for errors */
    5152    if (Rp_InterfaceError() != 0) {
    52         // there were errors while setting up the interface
    53         // dump the traceback
     53        /* there were errors while setting up the interface */
     54        /* dump the traceback */
    5455        Rp_Outcome *o = Rp_InterfaceOutcome();
    5556        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    5859    }
    5960
    60     // connect variables to the interface
    61     // look in the global interface for an object named
    62     // "temperature", convert its value to Kelvin, and
    63     // store the value into the address of T.
    64     // look in the global interface for an object named
    65     // "Ef", convert its value to electron Volts and store
    66     // the value into the address of Ef.
    67     // look in the global interface for the columns to
    68     // store data. retrieve them for later use.
     61    /*
     62     * connect variables to the interface
     63     * look in the global interface for an object named
     64     * "temperature", convert its value to Kelvin, and
     65     * store the value into the address of T.
     66     * look in the global interface for an object named
     67     * "Ef", convert its value to electron Volts and store
     68     * the value into the address of Ef.
     69     * look in the global interface for the columns to
     70     * store data. retrieve them for later use.
     71     */
    6972    Rp_InterfaceConnect("temperature",&T,"units=K",NULL);
    7073    Rp_InterfaceConnect("Ef",&Ef,"units=eV",NULL);
     
    7578    Rp_InterfaceConnect("Energy * 2",y2,NULL);
    7679
    77     // check the global interface for errors
     80    /* check the global interface for errors */
    7881    if (Rp_InterfaceError() != 0) {
    79         // there were errors while retrieving input data values
    80         // dump the traceback
     82        /* there were errors while retrieving input data values */
     83        /* dump the traceback */
    8184        Rp_Outcome *o = Rp_InterfaceOutcome();
    8285        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    8588    }
    8689
    87     // do science calculations
     90    /* do science calculations */
    8891    kT = 8.61734e-5 * T;
    8992    Emin = Ef - (10*kT);
     
    103106    }
    104107
    105     // store results in the results table
    106     // add data to the table pointed to by the variable result.
    107     // put the fArr data in the column named "Fermi-Dirac Factor"
    108     // put the EArr data in the column named "Energy"
    109     //
     108    /*
     109     * store results in the results table
     110     * add data to the table pointed to by the variable result.
     111     * put the fArr data in the column named "Fermi-Dirac Factor"
     112     * put the EArr data in the column named "Energy"
     113     */
    110114    Rp_TableColumnStoreDouble(x1,nPts,fArr);
    111115    Rp_TableColumnStoreDouble(y1,nPts,EArr);
     
    113117    Rp_TableColumnStoreDouble(y2,nPts,EArr2);
    114118
    115     // close the global interface
    116     // signal to the graphical user interface that science
    117     // calculations are complete and to display the data
    118     // as described in the views
     119    /*
     120     * close the global interface
     121     * signal to the graphical user interface that science
     122     * calculations are complete and to display the data
     123     * as described in the views
     124     */
    119125    Rp_InterfaceClose();
    120126
  • trunk/examples/objects/app-fermi/c/fermi4.c

    r1620 r3177  
    1 // ----------------------------------------------------------------------
    2 //  EXAMPLE: Fermi-Dirac function in C
    3 //
    4 //  This simple example shows how to use Rappture within a simulator
    5 //  written in C.
    6 // ======================================================================
    7 //  AUTHOR:  Derrick Kearney, Purdue University
    8 //  Copyright (c) 2005-2009  Purdue Research Foundation
    9 //
    10 //  See the file "license.terms" for information on usage and
    11 //  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12 // ======================================================================
    13 
     1/*
     2 * ----------------------------------------------------------------------
     3 *  EXAMPLE: Fermi-Dirac function in C
     4 *
     5 *  This simple example shows how to use Rappture within a simulator
     6 *  written in C.
     7 * ======================================================================
     8 *  AUTHOR:  Derrick Kearney, Purdue University
     9 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
     10 *
     11 *  See the file "license.terms" for information on usage and
     12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     13 * ======================================================================
     14 */
    1415#include "rappture.h"
    1516
     
    2324int main(int argc, char * argv[]) {
    2425
    25     // declare variables to interact with Rappture
     26    /* declare variables to interact with Rappture */
    2627    double T          = 0.0;
    2728    double Ef         = 0.0;
     
    2930
    3031
    31     // declare program variables
     32    /* declare program variables */
    3233    double E          = 0.0;
    3334    double dE         = 0.0;
     
    4041    double fArr[nPts];
    4142
    42     // initialize the global interface
     43    /* initialize the global interface */
    4344    Rp_InterfaceInit(argc,argv,&fermi_io);
    4445
    45     // check the global interface for errors
     46    /* check the global interface for errors */
    4647    if (Rp_InterfaceError() != 0) {
    47         // there were errors while setting up the interface
    48         // dump the traceback
     48        /* there were errors while setting up the interface */
     49        /* dump the traceback */
    4950        Rp_Outcome *o = Rp_InterfaceOutcome();
    5051        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    5354    }
    5455
    55     // connect variables to the interface
    56     // look in the global interface for an object named
    57     // "temperature", convert its value to Kelvin, and
    58     // store the value into the address of T.
    59     // look in the global interface for an object named
    60     // "Ef", convert its value to electron Volts and store
    61     // the value into the address of Ef.
    62     // look in the global interface for an object named
    63     // factorsTable and set the variable result to
    64     // point to it.
     56    /*
     57     * connect variables to the interface
     58     * look in the global interface for an object named
     59     * "temperature", convert its value to Kelvin, and
     60     * store the value into the address of T.
     61     * look in the global interface for an object named
     62     * "Ef", convert its value to electron Volts and store
     63     * the value into the address of Ef.
     64     * look in the global interface for an object named
     65     * factorsTable and set the variable result to
     66     * point to it.
     67     */
    6568    Rp_InterfaceConnect("temperature",&T,"units=K",NULL);
    6669    Rp_InterfaceConnect("Ef",&Ef,"units=eV",NULL);
    6770    Rp_InterfaceConnect("factorsTable",result,NULL);
    6871
    69     // check the global interface for errors
     72    /* check the global interface for errors */
    7073    if (Rp_InterfaceError() != 0) {
    71         // there were errors while retrieving input data values
    72         // dump the traceback
     74        /* there were errors while retrieving input data values */
     75        /* dump the traceback */
    7376        Rp_Outcome *o = Rp_InterfaceOutcome();
    7477        fprintf(stderr, "%s", Rp_OutcomeContext(o));
     
    7780    }
    7881
    79     // do science calculations
     82    /* do science calculations */
    8083    kT = 8.61734e-5 * T;
    8184    Emin = Ef - (10*kT);
     
    9396    }
    9497
    95     // store results in the results table
    96     // add data to the table pointed to by the variable result.
    97     // put the fArr data in the column named "Fermi-Dirac Factor"
    98     // put the EArr data in the column named "Energy"
    99     //
     98    /*
     99     * store results in the results table
     100     * add data to the table pointed to by the variable result.
     101     * put the fArr data in the column named "Fermi-Dirac Factor"
     102     * put the EArr data in the column named "Energy"
     103     */
    100104    Rp_TableAddData(result,"Fermi-Dirac Factor",nPts,fArr);
    101105    Rp_TableAddData(result,"Energy",nPts,EArr);
    102106
    103     // close the global interface
    104     // signal to the graphical user interface that science
    105     // calculations are complete and to display the data
    106     // as described in the views
     107    /*
     108     * close the global interface
     109     * signal to the graphical user interface that science
     110     * calculations are complete and to display the data
     111     * as described in the views
     112     */
    107113    Rp_InterfaceClose();
    108114
  • trunk/examples/objects/app-fermi/cpp/fermi4.cc

    r1620 r3177  
    66// ======================================================================
    77//  AUTHOR:  Derrick Kearney, Purdue University
    8 //  Copyright (c) 2005-2009  Purdue Research Foundation
     8//  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    99//
    1010//  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/fortran/fermi4.f

    r1620 r3177  
    88c  AUTHOR:  Michael McLennan, Purdue University
    99c  AUTHOR:  Derrick Kearney, Purdue University
    10 c  Copyright (c) 2004-2008  Purdue Research Foundation
     10c  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1111c
    1212c  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/matlab/ex2/fermi.m

    r1656 r3177  
    77% ======================================================================
    88%  AUTHOR:  Derrick Kearney, Purdue University
    9 %  Copyright (c) 2005-2009  Purdue Research Foundation
     9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010%
    1111%  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/matlab/ex3/fermi.m

    r1656 r3177  
    77% ======================================================================
    88%  AUTHOR:  Derrick Kearney, Purdue University
    9 %  Copyright (c) 2005-2009  Purdue Research Foundation
     9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010%
    1111%  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/matlab/fermi4.m

    r1620 r3177  
    77% ======================================================================
    88%  AUTHOR:  Derrick Kearney, Purdue University
    9 %  Copyright (c) 2005-2009  Purdue Research Foundation
     9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010%
    1111%  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/octave/ex2/fermi.m

    r1656 r3177  
    77% ======================================================================
    88%  AUTHOR:  Derrick Kearney, Purdue University
    9 %  Copyright (c) 2005-2009  Purdue Research Foundation
     9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010%
    1111%  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/octave/ex3/fermi.m

    r1656 r3177  
    77% ======================================================================
    88%  AUTHOR:  Derrick Kearney, Purdue University
    9 %  Copyright (c) 2005-2009  Purdue Research Foundation
     9%  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010%
    1111%  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/python/ex2/fermi.py

    r1656 r3177  
    77# ======================================================================
    88#  AUTHOR:  Derrick Kearney, Purdue University
    9 #  Copyright (c) 2005-2009  Purdue Research Foundation
     9#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010#
    1111#  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/python/ex3/fermi.py

    r1656 r3177  
    77# ======================================================================
    88#  AUTHOR:  Derrick Kearney, Purdue University
    9 #  Copyright (c) 2005-2009  Purdue Research Foundation
     9#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010#
    1111#  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/python/fermi4.py

    r1620 r3177  
    77# ======================================================================
    88#  AUTHOR:  Derrick Kearney, Purdue University
    9 #  Copyright (c) 2005-2009  Purdue Research Foundation
     9#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    1010#
    1111#  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/tcl/ex2/fermi.tcl

    r1656 r3177  
    66# ======================================================================
    77#  AUTHOR:  Derrick Kearney, Purdue University
    8 #  Copyright (c) 2005-2009  Purdue Research Foundation
     8#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    99#
    1010#  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/tcl/ex3/fermi.tcl

    r1656 r3177  
    66# ======================================================================
    77#  AUTHOR:  Derrick Kearney, Purdue University
    8 #  Copyright (c) 2005-2009  Purdue Research Foundation
     8#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    99#
    1010#  See the file "license.terms" for information on usage and
  • trunk/examples/objects/app-fermi/tcl/fermi4.tcl

    r1645 r3177  
    66# ======================================================================
    77#  AUTHOR:  Derrick Kearney, Purdue University
    8 #  Copyright (c) 2005-2009  Purdue Research Foundation
     8#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
    99#
    1010#  See the file "license.terms" for information on usage and
Note: See TracChangeset for help on using the changeset viewer.