ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/ripple/dp1.c
(Generate patch)

Comparing trunk/ripple/dp1.c (file contents):
Revision 1189 by xsun, Fri May 21 20:07:10 2004 UTC vs.
Revision 1190 by xsun, Mon May 24 16:42:34 2004 UTC

# Line 37 | Line 37 | struct system {
37    double kz;               // force constant for z displacement
38    double kr;               // force constant for z displacement
39    double ktheta;           // force constant for theta displacement
40 +  double t;                // the temperature of the system
41    int    nCycles;          // How many cycles to do in total
42    int    iCycle;           // How many cycles have we done?
43    int    nMoves;           // How many MC moves in each cycle
# Line 137 | Line 138 | int main(argc, argv)
138    state->dtheta = 0.3;
139    state->deltaz = 1.0;
140    state->deltaphi = 0.5;
141 <  state->beta = 1.0 / (kb * 950.0);
141 >  state->t = 300;
142 >  state->beta = 1.0 / (kb * state->t);
143  
144    // these three should really be given as command line arguments, but we'll
145    // set defaults here just in case:
# Line 243 | Line 245 | int main(argc, argv)
245            // -q mu set the strength of the dipole
246            i++;
247            state->strength =  atof( argv[i] );
248 +          done = 1;
249 +          break;
250 +
251 +        case 't':
252 +          // -t set the temperature of the system
253 +          i++;
254 +          state->t =  atof( argv[i] );
255 +          state->beta = 1.0 / (kb * state->t);
256            done = 1;
257            break;
258  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines