get_SETTINGS

PURPOSE ^

function to fetch some information from the gui, as input parameter for

SYNOPSIS ^

function SETTINGS = get_SETTINGS(handles)

DESCRIPTION ^

 function to fetch some information from the gui, as input parameter for
 the function ivp_solve

 input:   o handles...object hanles from the main GUI

 output:  o SETTINGS...struct with parameters for the solve function

 notes:   o

 authors: o Christian Jäkel (University of Technology Dresden)
          o Daniel Klawitter (University of Technology Dresden)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function SETTINGS = get_SETTINGS(handles)
0002 % function to fetch some information from the gui, as input parameter for
0003 % the function ivp_solve
0004 %
0005 % input:   o handles...object hanles from the main GUI
0006 %
0007 % output:  o SETTINGS...struct with parameters for the solve function
0008 %
0009 % notes:   o
0010 %
0011 % authors: o Christian Jäkel (University of Technology Dresden)
0012 %          o Daniel Klawitter (University of Technology Dresden)
0013 
0014 SETTINGS.step = str2double(get(handles.stepsize,'String'));
0015 % select method from listbox
0016 methods = get(handles.methods,'String');
0017 SETTINGS.method = methods(get(handles.methods,'Value'));
0018 SETTINGS.calculate_region_of_stability = 0; % region of stability won't be calculated
0019 
0020 % set function from string as function handle
0021 eval(['SETTINGS.equation = @(x,y)',get(handles.equation,'String'),';']);
0022 if get(handles.exakt_solution_known,'Value')
0023     eval(['SETTINGS.fu_exact = @(x)',get(handles.u_exact,'String'),';']);
0024 end
0025 % startpoint of the interval
0026 SETTINGS.beginvalue = str2num(get(handles.beginvalue,'String'));
0027 % endpoint of the intervall
0028 SETTINGS.endvalue = str2num(get(handles.endvalue,'String'));
0029 % startvalue for the ODE
0030 SETTINGS.startvalue = str2num(get(handles.startvalue,'String'));
0031 
0032 % Runge-Kutta-method or linear multistep method?
0033 switch char(SETTINGS.method)
0034     case {'explicit Euler-method','Heun-Verfahren','Klassisches RKV','Dormand-Prince RKV','implicit Euler-method','Radau II RKV','Gauß RKV','eigenesRKV'}
0035         SETTINGS.isRKV = 1;
0036     otherwise
0037         SETTINGS.isRKV = 0;
0038 end
0039 
0040 if strcmp(SETTINGS.method,'eigenes Verfahren')
0041     % region of stability will be calculated
0042     SETTINGS.calculate_region_of_stability = 1; 
0043     
0044 %     RESULT_USER_DEFINED_METHOD = user_defined_method;
0045     SETTINGS = user_defined_method(SETTINGS);   
0046     
0047     if SETTINGS.isRKV
0048         method_for_region_of_stability = 'eigenesRKV';
0049         stab_a = SETTINGS.c;
0050         stab_c = SETTINGS.B;
0051         stab_B = SETTINGS.a;
0052     else
0053         stab_rho = SETTINGS.rho;
0054         stab_sigma = SETTINGS.sigma;
0055         method_for_region_of_stability = 'eigenesMSV';
0056     end
0057 end

Generated on Wed 01-Jul-2009 16:09:39 by m2html © 2003