Skip to content

Commit 1a0e887

Browse files
committed
Fixes toward OPENACC support
1 parent 4df27fd commit 1a0e887

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

mcstas-comps/examples/Prototypes/ODIN_MCPL_TOF_train4/DiskChopper.comp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ TRACE
170170
} else {
171171

172172
// Check whether each t_offset carried by the ray make it through
173-
double weight_update = p/p_last_time_manipulation;
174-
p_last_time_manipulation = 0;
173+
double weight_update = p/P_last_time_manipulation;
174+
P_last_time_manipulation = 0;
175175

176176
int train_index;
177177
int one_did_hit = 0;
@@ -193,13 +193,13 @@ TRACE
193193
// T_TRANSMIT
194194
one_did_hit = 1;
195195
p_trains[train_index] *= weight_update;
196-
p_last_time_manipulation += p_trains[train_index];
196+
P_last_time_manipulation += p_trains[train_index];
197197
}
198198

199199
}
200200
if (!one_did_hit || all_dead) ABSORB;
201201

202-
p = p_last_time_manipulation;
202+
p = P_last_time_manipulation;
203203

204204
}
205205
SCATTER;

mcstas-comps/examples/Prototypes/ODIN_MCPL_TOF_train4/ESS_butterfly.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,11 @@ TRACE
604604

605605
t_offset[train_index] = t;
606606
p_trains[train_index] = p/adaptive_N;
607-
p_last_time_manipulation += p_trains[train_index];
607+
P_last_time_manipulation += p_trains[train_index];
608608
}
609609
// Set base particle t and p, now p will be decoupled from the source intensity.
610610
t=0;
611-
p=p_last_time_manipulation;
611+
p=P_last_time_manipulation;
612612

613613
SCATTER;
614614
%}

mcstas-comps/examples/Prototypes/ODIN_MCPL_TOF_train4/Monitor_nD.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ TRACE
571571

572572
int train_index;
573573
double p_original = p;
574-
double p_factor = p/p_last_time_manipulation;
574+
double p_factor = p/P_last_time_manipulation;
575575

576576
if (adaptive_target) {
577577
#pragma acc atomic

mcstas-comps/examples/Prototypes/ODIN_MCPL_TOF_train4/MultiDiskChopper.comp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ TRACE
281281
} else {
282282

283283
// Check whether each t_offset carried by the ray make it through
284-
double weight_update = p/p_last_time_manipulation;
285-
p_last_time_manipulation = 0;
284+
double weight_update = p/P_last_time_manipulation;
285+
P_last_time_manipulation = 0;
286286

287287
int train_index;
288288
int one_did_hit = 0;
@@ -312,13 +312,13 @@ TRACE
312312
else {
313313
one_did_hit = 1;
314314
p_trains[train_index] *= weight_update;
315-
p_last_time_manipulation += p_trains[train_index];
315+
P_last_time_manipulation += p_trains[train_index];
316316
}
317317
}
318318
// if not a single t_offset made it through a slit, absorb this ray
319319
if (!one_did_hit || all_dead) ABSORB;
320320

321-
p = p_last_time_manipulation;
321+
p = P_last_time_manipulation;
322322
}
323323
}
324324
%}

mcstas-comps/examples/Prototypes/ODIN_MCPL_TOF_train4/ODIN_MCPL_TOF_train4.instr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ COMPONENT vinROT1 = Arm()
228228
AT(0,0,0) RELATIVE PREVIOUS
229229
ROTATED (-90,0,0) RELATIVE PREVIOUS
230230

231-
COMPONENT vin = MCPL_input_once(filename=MCPLfile,verbose=1,v_smear=v_smear,pos_smear=pos_smear,dir_smear=dir_smear)
232-
//COMPONENT vin = MCPL_input(filename=MCPLfile,verbose=1,repeat_count=repeat,v_smear=v_smear,pos_smear=pos_smear,dir_smear=dir_smear)
231+
//COMPONENT vin = MCPL_input_once(filename=MCPLfile,verbose=1,v_smear=v_smear,pos_smear=pos_smear,dir_smear=dir_smear)
232+
COMPONENT vin = MCPL_input(filename=MCPLfile,verbose=1,repeat_count=repeat,v_smear=v_smear,pos_smear=pos_smear,dir_smear=dir_smear)
233233
AT(0,0,0) RELATIVE PREVIOUS
234234
EXTEND %{
235235
SCATTER;
@@ -327,11 +327,11 @@ EXTEND %{
327327

328328
t_offset[train_index] = t;
329329
p_trains[train_index] = p/adaptive_N;
330-
p_last_time_manipulation += p_trains[train_index];
330+
P_last_time_manipulation += p_trains[train_index];
331331
}
332332
// Set base particle t and p, now p will be decoupled from the source intensity.
333333
t=0;
334-
p=p_last_time_manipulation;
334+
p=P_last_time_manipulation;
335335

336336
%}
337337

mcstas-comps/examples/Prototypes/ODIN_TOF_train3/ODIN_TOF_train3.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ USERVARS
111111
%{
112112
double *t_offset;
113113
double *p_trains;
114-
double p_last_time_manipulation;
114+
double P_last_time_manipulation;
115115
//int allocated;
116116
int adaptive_N;
117117
long total_arrived;

mcstas-comps/examples/Prototypes/ODIN_TOF_train4/DiskChopper.comp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ TRACE
170170
} else {
171171

172172
// Check whether each t_offset carried by the ray make it through
173-
double weight_update = p/p_last_time_manipulation;
174-
p_last_time_manipulation = 0;
173+
double weight_update = p/P_last_time_manipulation;
174+
P_last_time_manipulation = 0;
175175

176176
int train_index;
177177
int one_did_hit = 0;
@@ -193,13 +193,13 @@ TRACE
193193
// T_TRANSMIT
194194
one_did_hit = 1;
195195
p_trains[train_index] *= weight_update;
196-
p_last_time_manipulation += p_trains[train_index];
196+
P_last_time_manipulation += p_trains[train_index];
197197
}
198198

199199
}
200200
if (!one_did_hit || all_dead) ABSORB;
201201

202-
p = p_last_time_manipulation;
202+
p = P_last_time_manipulation;
203203

204204
}
205205
SCATTER;

mcstas-comps/examples/Prototypes/ODIN_TOF_train4/ESS_butterfly.comp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,11 @@ TRACE
604604

605605
t_offset[train_index] = t;
606606
p_trains[train_index] = p/adaptive_N;
607-
p_last_time_manipulation += p_trains[train_index];
607+
P_last_time_manipulation += p_trains[train_index];
608608
}
609609
// Set base particle t and p, now p will be decoupled from the source intensity.
610610
t=0;
611-
p=p_last_time_manipulation;
611+
p=P_last_time_manipulation;
612612

613613
SCATTER;
614614
%}

mcstas-comps/examples/Prototypes/ODIN_TOF_train4/Monitor_nD.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ TRACE
571571

572572
int train_index;
573573
double p_original = p;
574-
double p_factor = p/p_last_time_manipulation;
574+
double p_factor = p/P_last_time_manipulation;
575575

576576
if (adaptive_target) {
577577
#pragma acc atomic

mcstas-comps/examples/Prototypes/ODIN_TOF_train4/MultiDiskChopper.comp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ TRACE
281281
} else {
282282

283283
// Check whether each t_offset carried by the ray make it through
284-
double weight_update = p/p_last_time_manipulation;
285-
p_last_time_manipulation = 0;
284+
double weight_update = p/P_last_time_manipulation;
285+
P_last_time_manipulation = 0;
286286

287287
int train_index;
288288
int one_did_hit = 0;
@@ -312,13 +312,13 @@ TRACE
312312
else {
313313
one_did_hit = 1;
314314
p_trains[train_index] *= weight_update;
315-
p_last_time_manipulation += p_trains[train_index];
315+
P_last_time_manipulation += p_trains[train_index];
316316
}
317317
}
318318
// if not a single t_offset made it through a slit, absorb this ray
319319
if (!one_did_hit || all_dead) ABSORB;
320320

321-
p = p_last_time_manipulation;
321+
p = P_last_time_manipulation;
322322
}
323323
}
324324
%}

0 commit comments

Comments
 (0)