ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/SimInfo.cpp
Revision: 375
Committed: Fri Mar 21 15:07:14 2003 UTC (21 years, 3 months ago) by chuckv
File size: 1644 byte(s)
Log Message:
more bug fixes...

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 362 usePBC = 0;
24     useLJ = 0;
25     useSticky = 0;
26 mmeineke 365 useDipole = 0;
27 mmeineke 362 useReactionField = 0;
28     useGB = 0;
29     useEAM = 0;
30    
31    
32    
33 mmeineke 294 wrapMeSimInfo( this );
34 mmeineke 270 }
35    
36     void SimInfo::refreshSim(){
37    
38 chuckv 290 simtype fInfo;
39     int isError;
40 chuckv 375 int i;
41 chuckv 290 fInfo.box[0] = box_x;
42     fInfo.box[1] = box_y;
43     fInfo.box[2] = box_z;
44    
45     fInfo.rlist = rList;
46     fInfo.rcut = rCut;
47 mmeineke 370 fInfo.rrf = rRF;
48     fInfo.rt = 0.95 * rRF;
49     fInfo.dielect = dielectric;
50    
51    
52 mmeineke 348 fInfo.SIM_uses_PBC = usePBC;
53 mmeineke 362 fInfo.SIM_uses_LJ = useLJ;
54     fInfo.SIM_uses_sticky = useSticky;
55 mmeineke 365 fInfo.SIM_uses_dipoles = useDipole;
56 mmeineke 362 fInfo.SIM_uses_RF = useReactionField;
57     fInfo.SIM_uses_GB = useGB;
58     fInfo.SIM_uses_EAM = useEAM;
59 chuckv 290
60 mmeineke 362
61 chuckv 290 isError = 0;
62    
63 chuckv 368 fInfo;
64     n_atoms;
65     identArray;
66     n_exclude;
67     excludes;
68     nGlobalExcludes;
69     globalExcludes;
70     isError;
71 chuckv 375 /*
72     for (i=0;i<n_atoms;i++){
73     std::cout << "Ident array in c " << identArray[i] << "\n";
74     }
75     */
76 chuckv 368 setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excludes, &nGlobalExcludes, globalExcludes, &isError );
77    
78 chuckv 290 if( isError ){
79    
80     sprintf( painCave.errMsg,
81     "There was an error setting the simulation information in fortran.\n" );
82     painCave.isFatal = 1;
83     simError();
84     }
85    
86     #ifdef IS_MPI
87     sprintf( checkPointMsg,
88     "succesfully sent the simulation information to fortran.\n");
89     MPIcheckPoint();
90     #endif // is_mpi
91 mmeineke 270 }
92