% Humboldt University Berlin
% Institute for Mathematics - Dr. Rene Lamour
% *************************************************************
% Program to log the actual parameter status for nlsolve
% *************************************************************
% Name:               log_parameter_nlsolve
%                     ---------------------
% Author:             Sigrid Wehner
% Stand:              1.10.03
% possible
% parameters open
% to user changes:    in nlsolve
%                     ***********
%                     max_of_count
%                     max_of_bigcount
%                     fak_min     = control of speed of iteration
%                     lambda
% -----------------------------------------------------------------------

function [] = log_parameter_nlsolve(logfile)

% first get the original parameters
[max_of_count_orig,max_of_bigcount_orig,fak_min_orig,lambda_orig]...
 = init_para_nlsolve;

% then load the actual user parameters 
load parameter_nlsolve;

load parameter_general print_level;

% log the parameter status

%fparname=logfile;
fparname='_____dummynlsolve';
fpar=fopen(fparname,'a');
fprintf(fpar,' =======================================================\n');
currdat=datestr(clock,0);
fprintf(fpar,'%s \n \n',currdat);
fprintf(fpar,'PARAMETER STATUS in matlab program: nlsolve\n');
fprintf(fpar,'=======================================================\n');
fprintf(fpar,'... user values are (marked if different from default):\n\n');

fprintf(fpar,'    max_of_count = %g ',max_of_count);
if (max_of_count ~= max_of_count_orig)
  fprintf(fpar,'   ***** default = %g ',max_of_count_orig);
  end;
fprintf(fpar,'\n');
  
fprintf(fpar,'    max_of_bigcount = %g ',max_of_bigcount);
if (max_of_bigcount ~= max_of_bigcount_orig)
  fprintf(fpar,' ***** default = %g ',max_of_bigcount_orig);
  end;
fprintf(fpar,'\n');  
  
fprintf(fpar,'    fak_min = %g ',fak_min);
if (fak_min ~= fak_min_orig)
  fprintf(fpar,' ***** default = %g ',fak_min_orig);
  end;
fprintf(fpar,'\n');

fprintf(fpar,'    lambda = %g ',lambda);
if (lambda ~= lambda_orig)
  fprintf(fpar,' ***** default = %g ',lambda_orig);
  end;
fprintf(fpar,'\n');

fprintf(fpar,'=======================================================\n');
fclose(fpar);

if (print_level==2)
    filprepend(logfile,fparname);
end;
delete(fparname);





