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 658 by tim, Thu Jul 31 15:35:07 2003 UTC vs.
Revision 674 by mmeineke, Mon Aug 11 18:29:46 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;
# Line 54 | Line 55 | SimInfo::SimInfo(){
55    useGB = 0;
56    useEAM = 0;
57  
58 +  myConfiguration = new SimState();
59 +
60    wrapMeSimInfo( this );
61   }
62  
63 +
64 + SimInfo::~SimInfo(){
65 +
66 +  delete myConfiguration;
67 +
68 +  map<string, GenericData*>::iterator i;
69 +  
70 +  for(i = properties.begin(); i != properties.end(); i++)
71 +    delete (*i).second;
72 +    
73 + }
74 +
75   void SimInfo::setBox(double newBox[3]) {
76    
77    int i, j;
# Line 292 | Line 307 | void SimInfo::calcBoxL( void ){
307    dsq = dx*dx + dy*dy + dz*dz;
308    boxL[2] = sqrt( dsq );
309    if( (0.5 * boxL[2]) < maxCutoff ) maxCutoff = 0.5 * boxL[2];
310 +  
311 +  checkCutOffs();
312  
313   }
314  
# Line 346 | Line 363 | int SimInfo::getNDF(){
363    ndf = ndf_local;
364   #endif
365  
366 <  ndf = ndf - 3;
366 >  ndf = ndf - 3 - nZconstraints;
367  
368    return ndf;
369   }
# Line 458 | Line 475 | void SimInfo::checkCutOffs( void ){
475  
476    int cutChanged = 0;
477  
478 +
479 +
480    if( boxIsInit ){
481      
482      //we need to check cutOffs against the box
483 <    
484 <    if( maxCutoff > rCut ){
483 >  
484 >    if(( maxCutoff > rCut )&&(usePBC)){
485        if( rCut < origRcut ){
486          rCut = origRcut;
487          if (rCut > maxCutoff) rCut = maxCutoff;
# Line 491 | Line 510 | void SimInfo::checkCutOffs( void ){
510      }
511  
512  
513 <    if (rCut > maxCutoff) {
513 >    if ((rCut > maxCutoff)&&(usePBC)) {
514        sprintf( painCave.errMsg,
515                 "New Box size is setting the long range cutoff radius "
516                 "to %lf\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines