ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/TraPPE_ExFF.cpp
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/TraPPE_ExFF.cpp (file contents):
Revision 293 by mmeineke, Thu Mar 6 16:07:57 2003 UTC vs.
Revision 294 by mmeineke, Thu Mar 6 17:04:09 2003 UTC

# Line 9 | Line 9 | using namespace std;
9   #include "SRI.hpp"
10   #include "simError.h"
11  
12 + #include <fortranWrappers.hpp>
13 +
14   #ifdef IS_MPI
15   #include "mpiForceField.h"
16   #endif // is_mpi
# Line 83 | Line 85 | namespace TPE {  // restrict the access of the folowin
85   #endif
86  
87   } // namespace
86
87
88 // declaration of functions needed to wrap the fortran module
89
90
88  
92 TraPPE_ExFF* currentTPEwrap;
93
89   using namespace TPE;
90  
91  
# Line 108 | Line 103 | TraPPE_ExFF::TraPPE_ExFF(){
103    char errMsg[1000];
104  
105    // do the funtion wrapping
106 <  currentTPEwrap = this;
112 <  wrapMe();
106 >  wrapMeFF( this );
107  
108  
109   #ifdef IS_MPI
# Line 276 | Line 270 | void TraPPE_ExFF::wrapMe( void ){
270   }
271  
272  
279 void TraPPE_ExFF::wrapMe( void ){
280  
281  char* currentFF = "TraPPE_Ex";
282  int isError = 0;
283  
284  forcefactory_( currentFF, &isError, TPEfunctionWrapper, strlen(currentFF) );
285
286  if( isError ){
287    
288    sprintf( painCave.errMsg,
289             "TraPPE_ExFF error: an error was returned from fortran when the "
290             "the functions were being wrapped.\n" );
291    painCave.isFatal = 1;
292    simError();
293  }
294
295 #ifdef IS_MPI
296  sprintf( checkPointMsg, "TraPPE_ExFF functions succesfully wrapped." );
297  MPIcheckPoint();
298 #endif // is_mpi
299 }
300  
301
302 void TPEfunctionWrapper( void (*p1)( int* ident, double* mass, double* epslon,
303                                     double* sigma, int* isDipole,
304                                     int* isSSD, double* dipole, double* w0,
305                                     double* v0, int* isError ),
306                         void (*p2)( int*, int*, int* ),
307                         void (*p3)( double*,double*,double*,double*,
308                                     short int*, int* ) ){
309  
310  
311  newTPEtype = p1;
312  initTPEfortran = p2;
313  currentTPEwrap->setTPEfortran( p3 );
314 }
315
316
317
273   void TraPPE_ExFF::initializeAtoms( void ){
274    
275    class LinkedType {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines