ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
Revision: 438
Committed: Mon Mar 31 21:50:59 2003 UTC (21 years, 3 months ago) by chuckv
File size: 1680 byte(s)
Log Message:
Fixes in MPI force calc and in Trappe_Ex parsing.

File Contents

# User Rev Content
1 mmeineke 377 #include <cstdlib>
2     #include <cstring>
3    
4    
5     #include "SimInfo.hpp"
6     #define __C
7     #include "fSimulation.h"
8     #include "simError.h"
9    
10     #include "fortranWrappers.hpp"
11    
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 mmeineke 420 rCut = 0.0;
23 mmeineke 377
24     usePBC = 0;
25     useLJ = 0;
26     useSticky = 0;
27     useDipole = 0;
28     useReactionField = 0;
29     useGB = 0;
30     useEAM = 0;
31    
32    
33    
34     wrapMeSimInfo( this );
35     }
36    
37     void SimInfo::refreshSim(){
38    
39     simtype fInfo;
40     int isError;
41 mmeineke 424 int* excl;
42 mmeineke 377
43     fInfo.box[0] = box_x;
44     fInfo.box[1] = box_y;
45     fInfo.box[2] = box_z;
46    
47     fInfo.rlist = rList;
48     fInfo.rcut = rCut;
49 gezelter 394 fInfo.rrf = ecr;
50     fInfo.rt = ecr - est;
51 mmeineke 377 fInfo.dielect = dielectric;
52    
53     fInfo.SIM_uses_PBC = usePBC;
54 chuckv 438 // fInfo.SIM_uses_LJ = useLJ;
55     fInfo.SIM_uses_LJ = 0;
56 gezelter 394 //fInfo.SIM_uses_sticky = useSticky;
57     fInfo.SIM_uses_sticky = 0;
58     fInfo.SIM_uses_dipoles = useDipole;
59 mmeineke 402 //fInfo.SIM_uses_dipoles = 0;
60 gezelter 394 fInfo.SIM_uses_RF = useReactionField;
61 mmeineke 377 fInfo.SIM_uses_GB = useGB;
62     fInfo.SIM_uses_EAM = useEAM;
63    
64 mmeineke 424 excl = Exclude::getArray();
65 mmeineke 377
66     isError = 0;
67    
68     fInfo;
69     n_atoms;
70     identArray;
71     n_exclude;
72     excludes;
73     nGlobalExcludes;
74     globalExcludes;
75     isError;
76    
77 mmeineke 424 setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excl,
78     &nGlobalExcludes, globalExcludes, &isError );
79 mmeineke 377
80     if( isError ){
81    
82     sprintf( painCave.errMsg,
83     "There was an error setting the simulation information in fortran.\n" );
84     painCave.isFatal = 1;
85     simError();
86     }
87    
88     #ifdef IS_MPI
89     sprintf( checkPointMsg,
90     "succesfully sent the simulation information to fortran.\n");
91     MPIcheckPoint();
92     #endif // is_mpi
93     }
94