Skip to content

Commit 40c29fe

Browse files
authored
Update WakeFieldPass.c
for(int i=0, etc) does not work in C → compilation fails in LINUX I have made the correction twice. Best regards, Laurent.
1 parent 1e7ca9f commit 40c29fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

atintegrators/WakeFieldPass.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ ExportMode struct elem *trackFunction(const atElem *ElemData,struct elem *Elem,
9797
{
9898
if (!Elem) {
9999
long nslice,nelem,nturns;
100+
int i;
100101
double num_charges, wakefact;
101102
static double lnf[3];
102103
double *normfact;
@@ -130,7 +131,7 @@ ExportMode struct elem *trackFunction(const atElem *ElemData,struct elem *Elem,
130131
Elem->nslice=nslice;
131132
Elem->nelem=nelem;
132133
Elem->nturns=nturns;
133-
for(int i=0;i<3;i++){
134+
for (i=0;i<3;i++){
134135
lnf[i]=normfact[i]*num_charges*wakefact;
135136
}
136137
Elem->normfact=lnf;
@@ -159,6 +160,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
159160
double *r_in;
160161
const mxArray *ElemData = prhs[0];
161162
int num_particles = mxGetN(prhs[1]);
163+
int i;
162164
struct elem El, *Elem=&El;
163165

164166
long nslice,nelem,nturns;
@@ -192,7 +194,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
192194
Elem->nslice=nslice;
193195
Elem->nelem=nelem;
194196
Elem->nturns=nturns;
195-
for(int i=0;i<3;i++){
197+
for (i=0;i<3;i++){
196198
normfact[i]*=num_charges*wakefact;
197199
}
198200
Elem->normfact=normfact;

0 commit comments

Comments
 (0)