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 1153 by gezelter, Fri May 7 21:35:05 2004 UTC vs.
Revision 1154 by gezelter, Tue May 11 16:00:22 2004 UTC

# Line 42 | Line 42 | SimInfo::SimInfo(){
42    thermalTime = 0.0;
43    currentTime = 0.0;
44    rCut = 0.0;
45 <  ecr = 0.0;
46 <  est = 0.0;
45 >  rSw = 0.0;
46  
47    haveRcut = 0;
48 <  haveEcr = 0;
48 >  haveRsw = 0;
49    boxIsInit = 0;
50    
51    resetTime = 1e99;
# Line 63 | Line 62 | SimInfo::SimInfo(){
62    useReactionField = 0;
63    useGB = 0;
64    useEAM = 0;
66  useMolecularCutoffs = 0;
65  
66    excludes = Exclude::Instance();
67  
# Line 480 | Line 478 | void SimInfo::setDefaultRcut( double theRcut ){
478    
479    haveRcut = 1;
480    rCut = theRcut;
481 +  rList = rCut + 1.0;
482    
483 <  ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
485 <  
486 <  notifyFortranCutOffs( &rCut, &rList, &ecr, &est );
483 >  notifyFortranCutOffs( &rCut, &rSw, &rList );
484   }
485  
486 < void SimInfo::setDefaultEcr( double theEcr ){
486 > void SimInfo::setDefaultRcut( double theRcut, double theRsw ){
487  
488 <  haveEcr = 1;
489 <  ecr = theEcr;
493 <  
494 <  ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
495 <
496 <  notifyFortranCutOffs( &rCut, &rList, &ecr, &est );
497 < }
498 <
499 < void SimInfo::setDefaultEcr( double theEcr, double theEst ){
500 <
501 <  est = theEst;
502 <  setDefaultEcr( theEcr );
488 >  rSw = theRsw;
489 >  setDefaultRcut( theRcut );
490   }
491  
492  
# Line 511 | Line 498 | void SimInfo::checkCutOffs( void ){
498      
499      if( rCut > maxCutoff ){
500        sprintf( painCave.errMsg,
501 <               "LJrcut is too large for the current periodic box.\n"
502 <               "\tCurrent Value of LJrcut = %G at time %G\n "
501 >               "cutoffRadius is too large for the current periodic box.\n"
502 >               "\tCurrent Value of cutoffRadius = %G at time %G\n "
503                 "\tThis is larger than half of at least one of the\n"
504                 "\tperiodic box vectors.  Right now, the Box matrix is:\n"
505                 "\n"
# Line 525 | Line 512 | void SimInfo::checkCutOffs( void ){
512                 Hmat[2][0], Hmat[2][1], Hmat[2][2]);
513        painCave.isFatal = 1;
514        simError();
515 <    }
529 <    
530 <    if( haveEcr ){
531 <      if( ecr > maxCutoff ){
532 <        sprintf( painCave.errMsg,
533 <                 "electrostaticCutoffRadius is too large for the current\n"
534 <                 "\tperiodic box.\n\n"
535 <                 "\tCurrent Value of ECR = %G at time %G\n "
536 <                 "\tThis is larger than half of at least one of the\n"
537 <                 "\tperiodic box vectors.  Right now, the Box matrix is:\n"
538 <                 "\n"
539 <                 "\t[ %G %G %G ]\n"
540 <                 "\t[ %G %G %G ]\n"
541 <                 "\t[ %G %G %G ]\n",
542 <                 ecr, currentTime,
543 <                 Hmat[0][0], Hmat[0][1], Hmat[0][2],
544 <                 Hmat[1][0], Hmat[1][1], Hmat[1][2],
545 <                 Hmat[2][0], Hmat[2][1], Hmat[2][2]);
546 <        painCave.isFatal = 1;
547 <        simError();
548 <      }
549 <    }
515 >    }    
516    } else {
517      // initialize this stuff before using it, OK?
518      sprintf( painCave.errMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines