ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimInfo.cpp (file contents):
Revision 660 by tim, Thu Jul 31 19:59:34 2003 UTC vs.
Revision 690 by mmeineke, Tue Aug 12 21:44:06 2003 UTC

# Line 30 | Line 30 | SimInfo::SimInfo(){
30    n_dipoles = 0;
31    ndf = 0;
32    ndfRaw = 0;
33 +  nZconstraints = 0;
34    the_integrator = NULL;
35    setTemp = 0;
36    thermalTime = 0.0;
37    currentTime = 0.0;
38    rCut = 0.0;
39 +  origRcut = -1.0;
40    ecr = 0.0;
41 +  origEcr = -1.0;
42    est = 0.0;
43    oldEcr = 0.0;
44    oldRcut = 0.0;
# Line 54 | Line 57 | SimInfo::SimInfo(){
57    useGB = 0;
58    useEAM = 0;
59  
60 +  myConfiguration = new SimState();
61 +
62    wrapMeSimInfo( this );
63   }
64  
65 +
66   SimInfo::~SimInfo(){
67  
68 +  delete myConfiguration;
69 +
70    map<string, GenericData*>::iterator i;
71    
72    for(i = properties.begin(); i != properties.end(); i++)
73      delete (*i).second;
74 <
67 <  
74 >    
75   }
76  
77   void SimInfo::setBox(double newBox[3]) {
# Line 302 | Line 309 | void SimInfo::calcBoxL( void ){
309    dsq = dx*dx + dy*dy + dz*dz;
310    boxL[2] = sqrt( dsq );
311    if( (0.5 * boxL[2]) < maxCutoff ) maxCutoff = 0.5 * boxL[2];
312 +  
313 +  checkCutOffs();
314  
315   }
316  
# Line 356 | Line 365 | int SimInfo::getNDF(){
365    ndf = ndf_local;
366   #endif
367  
368 <  ndf = ndf - 3;
368 >  ndf = ndf - 3 - nZconstraints;
369  
370    return ndf;
371   }
# Line 468 | Line 477 | void SimInfo::checkCutOffs( void ){
477  
478    int cutChanged = 0;
479  
480 +
481 +
482    if( boxIsInit ){
483      
484      //we need to check cutOffs against the box
485 <    
486 <    if( maxCutoff > rCut ){
485 >  
486 >    if(( maxCutoff > rCut )&&(usePBC)){
487        if( rCut < origRcut ){
488          rCut = origRcut;
489          if (rCut > maxCutoff) rCut = maxCutoff;
# Line 501 | Line 512 | void SimInfo::checkCutOffs( void ){
512      }
513  
514  
515 <    if (rCut > maxCutoff) {
515 >    if ((rCut > maxCutoff)&&(usePBC)) {
516        sprintf( painCave.errMsg,
517                 "New Box size is setting the long range cutoff radius "
518                 "to %lf\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines