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 767 by tim, Tue Sep 16 20:02:11 2003 UTC vs.
Revision 770 by gezelter, Fri Sep 19 14:55:41 2003 UTC

# Line 493 | Line 493 | void SimInfo::checkCutOffs( void ){
493   void SimInfo::checkCutOffs( void ){
494  
495    int cutChanged = 0;
496 <
497 <
498 <
496 >  
497    if( boxIsInit ){
498      
499      //we need to check cutOffs against the box
500 <  
500 >    
501      if(( maxCutoff > rCut )&&(usePBC)){
502        if( rCut < origRcut ){
503          rCut = origRcut;
# Line 507 | Line 505 | void SimInfo::checkCutOffs( void ){
505          
506          sprintf( painCave.errMsg,
507                   "New Box size is setting the long range cutoff radius "
508 <                 "to %lf\n",
509 <                 rCut );
508 >                 "to %lf at time %lf\n",
509 >                 rCut, currentTime );
510          painCave.isFatal = 0;
511          simError();
512        }
513      }
514 <
514 >    
515      if( maxCutoff > ecr ){
516        if( ecr < origEcr ){
517          ecr = origEcr;
# Line 521 | Line 519 | void SimInfo::checkCutOffs( void ){
519          
520          sprintf( painCave.errMsg,
521                   "New Box size is setting the electrostaticCutoffRadius "
522 <                 "to %lf\n",
523 <                 ecr );
522 >                 "to %lf at time %lf\n",
523 >                 ecr, currentTime );
524          painCave.isFatal = 0;
525          simError();
526        }
527      }
528 <
529 <
528 >    
529 >    
530      if ((rCut > maxCutoff)&&(usePBC)) {
531        sprintf( painCave.errMsg,
532                 "New Box size is setting the long range cutoff radius "
533 <               "to %lf\n",
534 <               maxCutoff );
533 >               "to %lf at time %lf\n",
534 >               maxCutoff, currentTime );
535        painCave.isFatal = 0;
536        simError();
537        rCut = maxCutoff;
538      }
539 <
539 >    
540      if( ecr > maxCutoff){
541        sprintf( painCave.errMsg,
542                 "New Box size is setting the electrostaticCutoffRadius "
543 <               "to %lf\n",
544 <               maxCutoff  );
543 >               "to %lf at time %lf\n",
544 >               maxCutoff, currentTime  );
545        painCave.isFatal = 0;
546        simError();      
547        ecr = maxCutoff;
548      }
549  
552
550      if( (oldEcr != ecr) || ( oldRcut != rCut ) ) cutChanged = 1;
551 <
551 >    
552      // rlist is the 1.0 plus max( rcut, ecr )
553      
554      ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
# Line 563 | Line 560 | void SimInfo::checkCutOffs( void ){
560      
561      oldEcr = ecr;
562      oldRcut = rCut;
563 <
563 >    
564    } else {
565      // initialize this stuff before using it, OK?
566 <      sprintf( painCave.errMsg,
567 <               "Trying to check cutoffs without a box. Be smarter.\n" );
568 <      painCave.isFatal = 1;
569 <      simError();      
566 >    sprintf( painCave.errMsg,
567 >             "Trying to check cutoffs without a box. Be smarter.\n" );
568 >    painCave.isFatal = 1;
569 >    simError();      
570    }
571 <
571 >  
572   }
573  
574   void SimInfo::addProperty(GenericData* prop){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines