0001
0002
0003
0004
0005
0006 select = struct;
0007 select.style = style;
0008
0009 if curtime == 0,
0010 flag_calc = find(status.equil == 1);
0011 [~,flag_calctimes,flag_external] = intersect(shotimes(flag_calc),external.times);
0012 flag_shotimes = flag_calc(flag_calctimes);
0013
0014 clear flag_calc flag_calctimes
0015 else
0016 flag_external = find(external.times == shotimes(curtime));
0017 flag_shotimes = curtime;
0018 end
0019
0020 external_wave = external.wave(:,flag_external);
0021 nt = size(external_wave,2);
0022
0023 for it = 1:nt,
0024 for iw = 1:size(external_wave,1),
0025 external_wave(iw,it).equil = equils{flag_shotimes(it)};
0026 end
0027 end
0028
0029 clear flag_calc flag_calctimes it nt
0030
0031 if length(flag_shotimes) > 1,
0032
0033 mdce_mode = iselect_jd(dkepath.distprofiles,'Distribution of calc. : ',lukeobj.infopanel.handle,style.distselectstyle,1,'popupmenu') - 1;
0034
0035 if mdce_mode > 2,
0036 mdce_mode = 2 - mdce_mode;
0037 end
0038
0039 dkecluster = clustermode_luke(mdce_mode,'',dkepath);
0040
0041 set(lukeobj.busy.handle,'Visible','on');drawnow;
0042 [flag,launchs] = mdce_run('imake_launch_jd',{dkepath,tokamak,'','',workdir,lukeobj.infopanel.handle,select},4,external_wave,dkecluster);
0043 set(lukeobj.busy.handle,'Visible','off');drawnow;
0044
0045 clear mdce_mode dkecluster flag
0046
0047 elseif length(flag_shotimes) == 1
0048
0049 launchs{1} = imake_launch_jd(dkepath,tokamak,'',external_wave,workdir,lukeobj.infopanel.handle,select);
0050
0051 end
0052
0053 if isfield(launchs,'err'),
0054 lukeobj.infotext.string = {'Error creating structure(s) ''launchs'' : ',launchs.err};
0055 elseif ~isempty(launchs),
0056
0057 iluke_newwavestructs;
0058
0059 end
0060
0061 clear select launchs external_wave flag_shotimes