9 |
|
|
10 |
|
#include "fortranWrappers.hpp" |
11 |
|
|
12 |
+ |
#ifdef IS_MPI |
13 |
+ |
#include "mpiSimulation.hpp" |
14 |
+ |
#endif |
15 |
+ |
|
16 |
|
SimInfo* currentInfo; |
17 |
|
|
18 |
|
SimInfo::SimInfo(){ |
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; |
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; |
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, |
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 |
|
|