- Timestamp:
- Apr 6, 2007, 6:06:24 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/app-fermi/cee/fermi.c
r555 r665 17 17 #include <stdio.h> 18 18 #include <math.h> 19 #include <unistd.h> 19 20 20 21 int main(int argc, char * argv[]) { … … 88 89 f = 1.0/(1.0 + exp((E - Ef)/kT)); 89 90 sprintf(line,"%f %f\n",f, E); 91 rpUtilsProgress((int)((E-Emin)/(Emax-Emin)*100),"Iterating"); 90 92 rpPutString(lib,"output.curve(f12).component.xy", line, RPLIB_APPEND); 91 93 E = E + dE; -
trunk/examples/app-fermi/fortran/fermi.f
r555 r665 19 19 integer rp_lib, rp_units_convert_dbl 20 20 21 integer driver, ok 21 integer driver, ok, progress 22 22 double precision T, Ef, kT, Emin, Emax, dE, f, E 23 23 CHARACTER*100 inFile, strVal … … 55 55 do 10 E=Emin,Emax,dE 56 56 f = 1.0/(1.0+exp((E-Ef)/kT)) 57 progress = nint((E-Emin)/(Emax-Emin)*100) 58 call rp_utils_progress (progress,"Iterating") 57 59 write(xy,'(E20.12,F13.9,A)') f, E, char(10) 58 60 call rp_lib_put_str (driver, -
trunk/examples/app-fermi/matlab/fermi.m
r521 r665 8 8 % AUTHOR: Michael McLennan, Purdue University 9 9 % AUTHOR: Derrick Kearney, Purdue University 10 % Copyright (c) 2004-200 5Purdue Research Foundation10 % Copyright (c) 2004-2007 Purdue Research Foundation 11 11 % 12 12 % See the file "license.terms" for information on usage and … … 47 47 48 48 for j=1:200 49 rpUtilsProgress((j/200*100),'Iterating'); 49 50 putStr = sprintf('%12g %12g\n', f(j), E(j)); 50 51 % put the data into the xml file -
trunk/examples/app-fermi/octave/fermi.m
r165 r665 42 42 43 43 for j=1:200 44 rpUtilsProgress((j/200*100),'Iterating'); 44 45 putStr = sprintf('%12g %12g\n', f(j), E(j)); 45 46 % put the data into the xml file -
trunk/examples/app-fermi/perl/fermi.pl
r555 r665 41 41 while( $E < $Emax ) { 42 42 $f = 1.0 / ( 1.0 + exp(($E - $Ef) / $kT)); 43 Rappture::Utils::progress((($E-$Emin)/($Emax-$Emin)*100),"Iterating"); 43 44 $driver->put("output.curve(f12).component.xy", "$f $E\n", 1); 44 45 $E = $E + $dE; -
trunk/examples/app-fermi/python/fermi.py
r555 r665 12 12 # ====================================================================== 13 13 import Rappture 14 import Rappture.Units15 14 import sys 16 15 from math import * … … 46 45 f = 1.0/(1.0 + exp((E - Ef)/kT)) 47 46 line = "%g %g\n" % (f, E) 47 Rappture.Utils.progress(((E-Emin)/(Emax-Emin)*100),"Iterating") 48 48 driver.put('output.curve(f12).component.xy', line, append=1) 49 49 E = E + dE -
trunk/examples/app-fermi/tcl/fermi.tcl
r555 r665 6 6 # ====================================================================== 7 7 # AUTHOR: Michael McLennan, Purdue University 8 # Copyright (c) 2004-200 5Purdue Research Foundation8 # Copyright (c) 2004-2007 Purdue Research Foundation 9 9 # 10 10 # See the file "license.terms" for information on usage and … … 37 37 while {$E < $Emax} { 38 38 set f [expr {1.0/(1.0 + exp(($E - $Ef)/$kT))}] 39 set progress [expr {(($E - $Emin)/($Emax - $Emin)*100)}] 40 Rappture::Utils::progress $progress -mesg "Iterating" 39 41 $driver put -append yes output.curve(f12).component.xy "$f $E\n" 40 42 set E [expr {$E + $dE}] -
trunk/perl/Rappture.xs
r605 r665 1 #include "RpLibrary.h" 2 #include "RpUnits.h" 1 #include "rappture.h" 3 2 #include <string> 4 3 … … 86 85 OUTPUT: 87 86 RETVAL 87 88 MODULE = Rappture PACKAGE = Rappture::Utils 89 90 int 91 progress( percent, message ) 92 int percent 93 const char *message 94 CODE: 95 RETVAL = Rappture::Utils::progress(percent,message); 96 OUTPUT: 97 RETVAL -
trunk/python/Rappture/PyRpUnits.cc
r570 r665 498 498 }; 499 499 500 PyDoc_STRVAR(module_doc, "R pUnits Module for Python.");500 PyDoc_STRVAR(module_doc, "Rappture Units Module for Python."); 501 501 502 502 /* Initialization function for the module */ -
trunk/python/Rappture/__init__.py
r535 r665 6 6 import queue as queue 7 7 import tools as tools 8 import Units 9 import Utils -
trunk/python/Rappture/number.py
r115 r665 10 10 # ====================================================================== 11 11 import Rappture 12 import Rappture.Units13 12 14 13 class number: -
trunk/python/Rappture/queue.py
r579 r665 294 294 #PBS -mn 295 295 #PBS -N %s 296 #PBS -V 296 297 cd $PBS_O_WORKDIR 297 298 -
trunk/python/setup.py.in
r548 r665 3 3 rp_install_dir = '@prefix@' 4 4 5 module = Extension('Rappture.Units',5 units_module = Extension('Rappture.Units', 6 6 include_dirs = [rp_install_dir+'/include'], 7 7 sources = [ 'Rappture/PyRpUnits.cc' ], 8 8 library_dirs = [ rp_install_dir+'/lib' ], 9 9 libraries = [ 'rappture', 'scew' ] ) 10 11 utils_module = Extension('Rappture.Utils', 12 include_dirs = [rp_install_dir+'/include'], 13 sources = [ 'Rappture/PyRpUtils.cc' ], 14 library_dirs = [ rp_install_dir+'/lib' ], 15 libraries = [ 'rappture' ] ) 10 16 11 17 setup( name='Rappture', … … 20 26 'Rappture.tools', 21 27 'Rappture.result'], 22 ext_modules=[module] 28 ext_modules=[ units_module, 29 utils_module ] 23 30 ) -
trunk/src/cee/RpUtilsCInterface.cc
r656 r665 20 20 21 21 int 22 rp Progress (int percent, const char* text)22 rpUtilsProgress (int percent, const char* text) 23 23 { 24 return Rappture:: progress(percent,text);24 return Rappture::Utils::progress(percent,text); 25 25 } 26 26 -
trunk/src/cee/RpUtilsCInterface.h
r656 r665 20 20 #endif // ifdef __cplusplus 21 21 22 int rp Progress (int percent, const char* text);22 int rpUtilsProgress (int percent, const char* text); 23 23 24 24 -
trunk/src/core/RpUtils.cc
r656 r665 19 19 #endif // ifdef __cplusplus 20 20 21 using namespace Rappture ;21 using namespace Rappture::Utils; 22 22 23 23 int progress(int percent, const char* text) -
trunk/src/core/RpUtils.h
r656 r665 18 18 extern "C" { 19 19 namespace Rappture { 20 namespace Utils { 20 21 #endif // ifdef __cplusplus 21 22 … … 25 26 26 27 #ifdef __cplusplus 28 } // namespace Utils 27 29 } // namespace Rappture 28 30 } // extern C -
trunk/src/fortran/RpUtilsFInterface.cc
r656 r665 22 22 23 23 /**********************************************************************/ 24 // FUNCTION: rp_ progress(int percent, const char* text, int text_len)24 // FUNCTION: rp_utils_progress(int percent, const char* text, int text_len) 25 25 /// Report the progress of the application. 26 26 /** 27 27 */ 28 28 29 int rp_ progress(int* percent, char* text, int text_len)29 int rp_utils_progress(int* percent, char* text, int text_len) 30 30 { 31 31 int retVal = 1; … … 33 33 inText = null_terminate(text, text_len); 34 34 if (inText != NULL) { 35 retVal = Rappture:: progress(*percent,inText);35 retVal = Rappture::Utils::progress(*percent,inText); 36 36 free((void*)inText); 37 37 } -
trunk/src/fortran/RpUtilsFInterface.h
r656 r665 20 20 #endif // ifdef __cplusplus 21 21 22 int rp_ progress ( int* percent, char* text, int text_len );22 int rp_utils_progress ( int* percent, char* text, int text_len ); 23 23 24 24 -
trunk/src/fortran/RpUtilsFStubs.c
r656 r665 19 19 20 20 int 21 rp_ progress_ ( int* percent, char* text, int text_len ) {22 return rp_ progress (percent,text,text_len);21 rp_utils_progress_ ( int* percent, char* text, int text_len ) { 22 return rp_utils_progress (percent,text,text_len); 23 23 } 24 24 25 25 int 26 rp_ progress__ ( int* percent, char* text, int text_len ) {27 return rp_ progress (percent,text,text_len);26 rp_utils_progress__ ( int* percent, char* text, int text_len ) { 27 return rp_utils_progress (percent,text,text_len); 28 28 } 29 29 30 30 int 31 RP_ PROGRESS ( int* percent, char* text, int text_len ) {32 return rp_ progress (percent,text,text_len);31 RP_UTILS_PROGRESS ( int* percent, char* text, int text_len ) { 32 return rp_utils_progress (percent,text,text_len); 33 33 } 34 34 -
trunk/src/fortran/RpUtilsFStubs.h
r656 r665 20 20 // INTERFACE FUNCTIONS - ONE UNDERSCORE 21 21 22 int rp_ progress_ ( int* percent, char* text, int text_len );22 int rp_utils_progress_ ( int* percent, char* text, int text_len ); 23 23 24 24 … … 26 26 // INTERFACE FUNCTIONS - TWO UNDERSCORES 27 27 28 int rp_ progress__ ( int* percent, char* text, int text_len );28 int rp_utils_progress__ ( int* percent, char* text, int text_len ); 29 29 30 30 … … 32 32 // INTERFACE STUB FUNCTIONS - ALL CAPS 33 33 34 int RP_ PROGRESS ( int* percent, char* text, int text_len );34 int RP_UTILS_PROGRESS ( int* percent, char* text, int text_len ); 35 35 36 36 -
trunk/src/matlab/Makefile.in
r597 r665 76 76 rpUnitsConvertDbl.mexglx \ 77 77 rpUnitsConvertObjDbl.mexglx \ 78 rpAddPresets.mexglx 78 rpAddPresets.mexglx \ 79 rpUtilsProgress.mexglx 79 80 80 81 … … 158 159 rpAddPresets.mexglx: 159 160 $(MEX) rpAddPresets.cc $(MATLAB_COMP_ARGS) 161 rpUtilsProgress.mexglx: 162 $(MEX) rpUtilsProgress.cc $(MATLAB_COMP_ARGS) 160 163 161 164 docs: -
trunk/src/matlab/RpMatlabInterface.h
r511 r665 15 15 #define _Rp_MATLAB_HELPER_H 16 16 17 #include "rappture.h" 17 18 #include "RpBindingsDict.h" 18 // #include "RpLibraryCInterface.h"19 #include "RpUnits.h"20 #include "RpLibrary.h"21 19 22 20 // dont delete this, still working on making it happen -
trunk/src/octave/Makefile.in
r591 r665 39 39 OCTAVE_COMP_ARGS = $(OCT_INCLS) $(LIB_RAPPTURE) $(LIB_SCEW_FLAG) 40 40 RpOctave: rpAddPresets.oct \ 41 rpUtilsProgress.oct \ 41 42 rpLib.oct \ 42 43 rpLibChildrenByType.oct \ … … 69 70 rpUnitsGetExponent.oct \ 70 71 rpUnitsGetUnits.oct \ 71 rpUnitsGetUnitsName.oct \72 rpUnitsGetUnitsName.oct 72 73 73 74 rpAddPresets.oct: 74 75 $(OCT) rpAddPresets.cc $(OCTAVE_COMP_ARGS) 76 rpUtilsProgress.oct: 77 $(OCT) rpUtilsProgress.cc $(OCTAVE_COMP_ARGS) 75 78 rpLib.oct: 76 79 $(OCT) rpLib.cc $(OCTAVE_COMP_ARGS) -
trunk/src/octave/RpOctaveInterface.h
r511 r665 1 1 /* 2 2 * ---------------------------------------------------------------------- 3 * INTERFACE: Rappture- MatlabBindings Header3 * INTERFACE: Rappture-Octave Bindings Header 4 4 * 5 5 * ====================================================================== 6 6 * AUTHOR: Derrick Kearney, Purdue University 7 * Copyright (c) 2005 7 * Copyright (c) 2005-2007 8 8 * Purdue Research Foundation, West Lafayette, IN 9 9 * ====================================================================== … … 13 13 #define _Rp_OCTAVE_HELPER_H 14 14 15 #include "rappture.h" 15 16 #include "RpBindingsDict.h" 16 #include "RpLibrary.h"17 #include "RpUnits.h"18 17 19 // dont delete this, still working on making it happen 20 //#include "rappture.h" 21 22 // include the matlab api header 18 // include the octave api header 23 19 #include "octave/oct.h" 24 20 … … 27 23 #endif 28 24 29 // int getIntInput ( const mxArray* prhs );30 // double getDoubleInput ( const mxArray* prhs );31 // char* getStringInput ( const mxArray* prhs );32 33 25 #ifdef __cplusplus 34 26 } -
trunk/src/tcl/src/RpUtilsTclInterface.cc
r662 r665 53 53 { 54 54 55 Tcl_CreateCommand(interp, "::Rappture:: progress",55 Tcl_CreateCommand(interp, "::Rappture::Utils::progress", 56 56 RpTclUtilsProgress, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL); 57 57 … … 100 100 } 101 101 102 err = Rappture:: progress((int)val,mesg);102 err = Rappture::Utils::progress((int)val,mesg); 103 103 104 104 if (err != 0) { -
trunk/src2/core/RpBuffer.cc
r657 r665 124 124 /** 125 125 * Operator + 126 * @param SimpleBuffer object to add127 126 * @param SimpleBuffer object to add 128 127 */ -
trunk/src2/core/RpNode.h
r657 r665 32 32 virtual int dimensionality() const = 0; 33 33 34 virtual ~Node() ;34 virtual ~Node() {} 35 35 36 36 private: … … 47 47 virtual double x(double newval) { _x = newval; return _x; } 48 48 49 virtual ~Node1D() ;49 virtual ~Node1D() {} 50 50 51 51 private: … … 65 65 virtual double y(double newval) { _y = newval; return _y; } 66 66 67 virtual ~Node2D() ;67 virtual ~Node2D() {} 68 68 69 69 private: … … 86 86 virtual double z(double newval) { _z = newval; return _z; } 87 87 88 virtual ~Node3D() ;88 virtual ~Node3D() {} 89 89 90 90 private:
Note: See TracChangeset
for help on using the changeset viewer.