ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimInfo.cpp (file contents):
Revision 463 by gezelter, Sat Apr 5 03:39:25 2003 UTC vs.
Revision 490 by gezelter, Fri Apr 11 15:16:59 2003 UTC

# Line 9 | Line 9 | SimInfo* currentInfo;
9  
10   #include "fortranWrappers.hpp"
11  
12 + #ifdef IS_MPI
13 + #include "mpiSimulation.hpp"
14 + #endif
15 +
16   SimInfo* currentInfo;
17  
18   SimInfo::SimInfo(){
# Line 128 | Line 132 | void SimInfo::refreshSim(){
132  
133    simtype fInfo;
134    int isError;
135 +  int n_global;
136    int* excl;
137 +  
138 +  fInfo.rrf = 0.0;
139 +  fInfo.rt = 0.0;
140 +  fInfo.dielect = 0.0;
141  
142    fInfo.box[0] = box_x;
143    fInfo.box[1] = box_y;
# Line 136 | Line 145 | void SimInfo::refreshSim(){
145  
146    fInfo.rlist = rList;
147    fInfo.rcut = rCut;
139  fInfo.rrf = ecr;
140  fInfo.rt = ecr - est;
141  fInfo.dielect = dielectric;
148  
149 +  if( useDipole ){
150 +    fInfo.rrf = ecr;
151 +    fInfo.rt = ecr - est;
152 +    if( useReactionField )fInfo.dielect = dielectric;
153 +  }
154 +
155    fInfo.SIM_uses_PBC = usePBC;
156    //fInfo.SIM_uses_LJ = 0;
157    fInfo.SIM_uses_LJ = useLJ;
# Line 154 | Line 166 | void SimInfo::refreshSim(){
166  
167    excl = Exclude::getArray();
168  
169 + #ifdef IS_MPI
170 +  n_global = mpiSim->getTotAtoms();
171 + #else
172 +  n_global = n_atoms;
173 + #endif
174 +
175    isError = 0;
176  
177 < //   fInfo;
178 < //   n_atoms;
179 < //   identArray;
162 < //   n_exclude;
163 < //   excludes;
164 < //   nGlobalExcludes;
165 < //   globalExcludes;
166 < //   isError;
177 >  setFsimulation( &fInfo, &n_global, &n_atoms, identArray, &n_exclude, excl,
178 >                  &nGlobalExcludes, globalExcludes, molMembershipArray,
179 >                  &isError );
180  
168  setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excl,
169                  &nGlobalExcludes, globalExcludes, &isError );
170
181    if( isError ){
182  
183      sprintf( painCave.errMsg,
# Line 182 | Line 192 | void SimInfo::refreshSim(){
192    MPIcheckPoint();
193   #endif // is_mpi
194  
195 <  ndf = this->getNDF();
196 <  ndfRaw = this->getNDFraw();
195 >  this->ndf = this->getNDF();
196 >  this->ndfRaw = this->getNDFraw();
197  
198   }
199  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines