11 |
|
#include <fortranWrappers.hpp> |
12 |
|
|
13 |
|
|
14 |
< |
void ForceFields::doForces( int calcPot ){ |
14 |
> |
void ForceFields::doForces( int calcPot, int calcStress ){ |
15 |
|
|
16 |
|
int i, isError; |
17 |
|
double* frc; |
19 |
|
double* trq; |
20 |
|
double* tau; |
21 |
|
double* A; |
22 |
– |
double* mu; |
22 |
|
double* u_l; |
23 |
|
|
24 |
|
short int passedCalcPot = (short int)calcPot; |
25 |
+ |
short int passedCalcStress = (short int)calcStress; |
26 |
|
|
27 |
|
// forces are zeroed here, before any are acumulated. |
28 |
|
// NOTE: do not rezero the forces in Fortran. |
35 |
|
pos = Atom::getPosArray(); |
36 |
|
trq = Atom::getTrqArray(); |
37 |
|
A = Atom::getAmatArray(); |
38 |
– |
mu = Atom::getMuArray(); |
38 |
|
u_l = Atom::getUlArray(); |
39 |
|
|
40 |
|
tau = entry_plug->tau; |
41 |
|
|
42 |
|
isError = 0; |
43 |
< |
fortranForceLoop( pos, A, mu, u_l, frc, trq, tau, &(entry_plug->lrPot), |
44 |
< |
&passedCalcPot, &isError ); |
43 |
> |
fortranForceLoop( pos, |
44 |
> |
A, |
45 |
> |
u_l, |
46 |
> |
frc, |
47 |
> |
trq, |
48 |
> |
tau, |
49 |
> |
&(entry_plug->lrPot), |
50 |
> |
&passedCalcPot, |
51 |
> |
&passedCalcStress, |
52 |
> |
&isError ); |
53 |
|
|
54 |
|
|
55 |
|
if( isError ){ |