ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/SimInfo.cpp
Revision: 348
Committed: Fri Mar 14 21:33:10 2003 UTC (21 years, 5 months ago) by mmeineke
File size: 947 byte(s)
Log Message:
mostly compiles. interface twixt c and fortran is broken. (c needs to be brought up to date with fortran.)

File Contents

# User Rev Content
1 mmeineke 270 #include <cstdlib>
2 chuckv 290 #include <cstring>
3 mmeineke 270
4 chuckv 290
5 mmeineke 270 #include "SimInfo.hpp"
6 mmeineke 285 #define __C
7     #include "fSimulation.h"
8 chuckv 290 #include "simError.h"
9    
10 mmeineke 294 #include <fortranWrappers.hpp>
11 mmeineke 270
12     SimInfo* currentInfo;
13    
14     SimInfo::SimInfo(){
15     excludes = NULL;
16     n_constraints = 0;
17     n_oriented = 0;
18     n_dipoles = 0;
19     the_integrator = NULL;
20     setTemp = 0;
21     thermalTime = 0.0;
22    
23 mmeineke 294 wrapMeSimInfo( this );
24 mmeineke 270 }
25    
26     void SimInfo::refreshSim(){
27    
28 chuckv 290 simtype fInfo;
29     int isError;
30 mmeineke 285
31 chuckv 290 fInfo.box[0] = box_x;
32     fInfo.box[1] = box_y;
33     fInfo.box[2] = box_z;
34    
35     fInfo.rlist = rList;
36     fInfo.rcut = rCut;
37 mmeineke 348 fInfo.SIM_uses_PBC = usePBC;
38 chuckv 290
39     isError = 0;
40     setFsimulation( &fInfo, &isError );
41    
42     if( isError ){
43    
44     sprintf( painCave.errMsg,
45     "There was an error setting the simulation information in fortran.\n" );
46     painCave.isFatal = 1;
47     simError();
48     }
49    
50     #ifdef IS_MPI
51     sprintf( checkPointMsg,
52     "succesfully sent the simulation information to fortran.\n");
53     MPIcheckPoint();
54     #endif // is_mpi
55 mmeineke 270 }
56