ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
Revision: 402
Committed: Wed Mar 26 14:55:50 2003 UTC (21 years, 3 months ago) by mmeineke
File size: 1593 byte(s)
Log Message:
fixed an mpi include bug in THermo.cpp

File Contents

# Content
1 #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
23 usePBC = 0;
24 useLJ = 0;
25 useSticky = 0;
26 useDipole = 0;
27 useReactionField = 0;
28 useGB = 0;
29 useEAM = 0;
30
31
32
33 wrapMeSimInfo( this );
34 }
35
36 void SimInfo::refreshSim(){
37
38 simtype fInfo;
39 int isError;
40
41 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 fInfo.rrf = ecr;
48 fInfo.rt = ecr - est;
49 fInfo.dielect = dielectric;
50
51 fInfo.SIM_uses_PBC = usePBC;
52 fInfo.SIM_uses_LJ = useLJ;
53 //fInfo.SIM_uses_sticky = useSticky;
54 fInfo.SIM_uses_sticky = 0;
55 fInfo.SIM_uses_dipoles = useDipole;
56 //fInfo.SIM_uses_dipoles = 0;
57 fInfo.SIM_uses_RF = useReactionField;
58 fInfo.SIM_uses_GB = useGB;
59 fInfo.SIM_uses_EAM = useEAM;
60
61
62 isError = 0;
63
64 fInfo;
65 n_atoms;
66 identArray;
67 n_exclude;
68 excludes;
69 nGlobalExcludes;
70 globalExcludes;
71 isError;
72
73 setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excludes, &nGlobalExcludes, globalExcludes, &isError );
74
75 if( isError ){
76
77 sprintf( painCave.errMsg,
78 "There was an error setting the simulation information in fortran.\n" );
79 painCave.isFatal = 1;
80 simError();
81 }
82
83 #ifdef IS_MPI
84 sprintf( checkPointMsg,
85 "succesfully sent the simulation information to fortran.\n");
86 MPIcheckPoint();
87 #endif // is_mpi
88 }
89