ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/AllLong.cpp
(Generate patch)

Comparing trunk/mdtools/md_code/AllLong.cpp (file contents):
Revision 11 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
Revision 248 by chuckv, Mon Jan 27 19:28:21 2003 UTC

# Line 2 | Line 2
2   #include <cstdlib>
3  
4   #include "LRI.hpp"
5 + #include "simError.h"
6  
6
7   extern "C" {
8    
9    
# Line 186 | Line 186 | AllLong::AllLong( SimInfo* entry_plug ){
186      if( isLJ[i] && isVDW[i+1] ) error = 1;
187  
188      if( error ){
189 <      std::cerr << "longRange force error: You cannot mix Lenard-Jones and"
190 <                << " \"Exp - r^6\" type interactions\n";
191 <      exit(8);
189 >      sprintf(painCave.errMsg,
190 >              "longRange force error: You cannot mix Lenard-Jones and"
191 >              " \"Exp - r^6\" type interactions\n");
192 >      painCave.isFatal = 1;
193 >      simError();
194      }
195    }
196  
197 <  /* a little routine to set the rCut, should not exceed half of any
197 >  /* a little routine to set the rCut, should not exrListceed half of any
198       box length */
199  
200    rCut = 0.0;
# Line 233 | Line 235 | AllLong::AllLong( SimInfo* entry_plug ){
235  
236    if( entry_plug->longRange != NULL ) delete entry_plug->longRange;
237    entry_plug->longRange = this;
238 +
239   }
240  
241   AllLong::~AllLong(){
# Line 303 | Line 306 | void AllLong::calc_forces( void ){
306      if( isDipole[i] ){
307  
308        if( !(atoms[i]->isDirectional()) ){
309 <        std::cerr << "Something went Horribly wrong!!!!\n"
310 <                  << "We're all gonna die in here!!!!!!!\n"
311 <                  << "Oh yeah, by the way, atom " << i
312 <                  << " somehow thinks it has a dipole,\n"
313 <                  << "but it isn't a directional atom type.\n";
314 <        exit(8);
309 >        sprintf( painCave.errMsg,
310 >                 "Something went Horribly wrong!!!!\n"
311 >                 "We're all gonna die in here!!!!!!!\n"
312 >                 "Oh yeah, by the way, atom %d"
313 >                 " somehow thinks it has a dipole,\n"
314 >                 "but it isn't a directional atom type.\n", i);
315 >        painCave.isFatal = 1;
316 >        simError();
317        }
318                
319        dAtom = ( DirectionalAtom* )atoms[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines