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 790 by mmeineke, Mon Sep 29 21:16:11 2003 UTC vs.
Revision 845 by gezelter, Thu Oct 30 18:59:20 2003 UTC

# Line 1 | Line 1
1 < #include <cstdlib>
2 < #include <cstring>
3 < #include <cmath>
1 > #include <stdlib.h>
2 > #include <string.h>
3 > #include <math.h>
4  
5   #include <iostream>
6   using namespace std;
# Line 515 | Line 515 | void SimInfo::setRcut( double theRcut ){
515  
516   void SimInfo::setRcut( double theRcut ){
517  
518  if( !haveOrigRcut ){
519    haveOrigRcut = 1;
520    origRcut = theRcut;
521  }
522
518    rCut = theRcut;
519    checkCutOffs();
520   }
521  
522 < void SimInfo::setEcr( double theEcr ){
522 > void SimInfo::setDefaultRcut( double theRcut ){
523  
524 <  if( !haveOrigEcr ){
525 <    haveOrigEcr = 1;
526 <    origEcr = theEcr;
527 <  }
524 >  haveOrigRcut = 1;
525 >  origRcut = theRcut;
526 >  rCut = theRcut;
527 >
528 >  ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
529 >
530 >  notifyFortranCutOffs( &rCut, &rList, &ecr, &est );
531 > }
532  
533 + void SimInfo::setEcr( double theEcr ){
534 +
535    ecr = theEcr;
536    checkCutOffs();
537   }
538  
539 + void SimInfo::setDefaultEcr( double theEcr ){
540 +
541 +  haveOrigEcr = 1;
542 +  origEcr = theEcr;
543 +  
544 +  ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
545 +
546 +  ecr = theEcr;
547 +
548 +  notifyFortranCutOffs( &rCut, &rList, &ecr, &est );
549 + }
550 +
551   void SimInfo::setEcr( double theEcr, double theEst ){
552  
553    est = theEst;
554    setEcr( theEcr );
555   }
556  
557 + void SimInfo::setDefaultEcr( double theEcr, double theEst ){
558  
559 +  est = theEst;
560 +  setDefaultEcr( theEcr );
561 + }
562 +
563 +
564   void SimInfo::checkCutOffs( void ){
565  
566    int cutChanged = 0;
# Line 608 | Line 627 | void SimInfo::checkCutOffs( void ){
627      ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0;
628      
629      if( cutChanged ){
611      
630        notifyFortranCutOffs( &rCut, &rList, &ecr, &est );
631      }
632      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines