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 161 by mmeineke, Tue Jul 9 18:40:59 2002 UTC vs.
Revision 162 by mmeineke, Thu Oct 31 21:20:49 2002 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  
# Line 303 | Line 305 | void AllLong::calc_forces( void ){
305      if( isDipole[i] ){
306  
307        if( !(atoms[i]->isDirectional()) ){
308 <        std::cerr << "Something went Horribly wrong!!!!\n"
309 <                  << "We're all gonna die in here!!!!!!!\n"
310 <                  << "Oh yeah, by the way, atom " << i
311 <                  << " somehow thinks it has a dipole,\n"
312 <                  << "but it isn't a directional atom type.\n";
313 <        exit(8);
308 >        sprintf( painCave.errMsg,
309 >                 "Something went Horribly wrong!!!!\n"
310 >                 "We're all gonna die in here!!!!!!!\n"
311 >                 "Oh yeah, by the way, atom %d"
312 >                 " somehow thinks it has a dipole,\n"
313 >                 "but it isn't a directional atom type.\n", i);
314 >        painCave.isFatal = 1;
315 >        simError();
316        }
317                
318        dAtom = ( DirectionalAtom* )atoms[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines