saveinputs_jd

PURPOSE ^

SYNOPSIS ^

function saveinputs_jd(lukestruct)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function saveinputs_jd(lukestruct)
0002 %
0003 equil = lukestruct.equil;
0004 %
0005 equilstr = ['EQUIL_',equil.id,'.mat'];
0006 save(equilstr,'equil');
0007 disp(['Equilibrium saved in file ',equilstr]);
0008 %
0009 if isfield(lukestruct,'wavestructs'),
0010     for iw = 1:length(lukestruct.wavestructs),
0011         wavestruct = lukestruct.wavestructs{iw};
0012         wavestr = ['WAVESTRUCT_',equil.id,'_',wavestruct.id,'.mat'];
0013         save(wavestr,'wavestruct');
0014         disp(['Wavestruct # ',num2str(iw),' saved in file ',wavestr]);
0015     end
0016 end
0017 %
0018 if isfield(lukestruct,'waves'),
0019     for iw = 1:length(lukestruct.waves),
0020         wave = lukestruct.waves{iw};
0021         wavestr = ['WAVE_',equil.id,'_',wave.id,'.mat'];
0022         save(wavestr,'wave');
0023         disp(['Wave # ',num2str(iw),' saved in file ',wavestr]);
0024     end
0025 end
0026 %
0027 if isfield(lukestruct,'ohm') && isstruct(lukestruct.ohm) && ~isempty(fieldnames(lukestruct.ohm))
0028     ohm = lukestruct.ohm;
0029     ohmstr = ['OHM_',equil.id,'_',ohm.id,'.mat'];
0030     save(ohmstr,'ohm');
0031     disp(['Ohmic field structure saved in file ',ohmstr]);
0032 end
0033 %
0034 if isfield(lukestruct,'transpfaste') && isstruct(lukestruct.transpfaste) && ~isempty(fieldnames(lukestruct.transpfaste))
0035     transpfaste = lukestruct.transpfaste;
0036     transpfastestr = ['TRANSP_',equil.id,'_',transpfaste.id,'.mat'];
0037     save(transpfastestr,'transpfaste');
0038     disp(['Fast electron transport structure saved in file ',transpfastestr]);
0039 end
0040 %
0041 if isfield(lukestruct,'ripple') && isstruct(lukestruct.ripple) && ~isempty(fieldnames(lukestruct.ripple))
0042     ripple = lukestruct.ripple;
0043     ripplestr = ['RIPPLE_',equil.id,'_',ripple.id,'.mat'];
0044     save(ripplestr,'ripple');
0045     disp(['Ripple structure saved in file ',ripplestr]);
0046 end
0047 %
0048

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.