Changeset 332


Ignore:
Timestamp:
05/11/09 09:44:14 (16 years ago)
Author:
Mathieu Morlighem
Message:

use displaystring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m

    r112 r332  
    5555converged=0;
    5656       
    57 if debug,
    58         disp(sprintf('%s','   starting direct shooting method'));
    59 end
    60 
     57displaystring(debug,'\n%s',['   starting direct shooting method']);
    6158while(~converged),
    6259
     
    105102        % Solve
    106103        u_f=Solver(K_ff,p_f,solver_type);
    107         if debug,
    108                 disp(sprintf('%s%g','      condition number of stiffness matrix: ',condest(K_ff)));
    109         end
     104        displaystring(debug,'%s%g','      condition number of stiffness matrix: ',condest(K_ff));
    110105   
    111106        %increment index
     
    120115                %compute relative velocity difference for this step.
    121116                relative_change=norm(soln(count).u_g-soln(count-1).u_g,2)/norm(soln(count-1).u_g,2);
    122 
    123117                if relative_change<eps_rel,
    124                         if debug, disp(sprintf('%s %g %s %g','      convergence criterion: norm(du)/norm(u)=',relative_change,' < ',eps_rel)); end
     118                        displaystring(debug,'%s%g%s%g','      convergence criterion: norm(du)/norm(u)=',relative_change,' < ',eps_rel);
    125119                        converged=1;
    126120                else
    127                         if debug, disp(sprintf('%s %g %s %g','      convergence criterion: norm(du)/norm(u)=',relative_change,' > ',eps_rel)); end
     121                        displaystring(debug,'%s%g%s%g','      convergence criterion: norm(du)/norm(u)=',relative_change,' > ',eps_rel);
    128122                        converged=0;
    129123                end
     
    134128
    135129                        if change<eps_abs,
    136                                 if debug, disp(sprintf('%s %g %s %g %s','      convergence criterion: max(du)=',change,' < ',eps_abs,'m/yr')); end
     130                                displaystring(debug,'%s%g%s%g','      convergence criterion: max(du)=',change,' < ',eps_abs,'m/yr');
    137131                        else
    138                                 if debug, disp(sprintf('%s %g %s %g %s','      convergence criterion: max(du)=',change,' > ',eps_abs,'m/yr')); end
     132                                displaystring(debug,'%s%g%s%g','      convergence criterion: max(du)=',change,' > ',eps_abs,'m/yr');
    139133                                converged=0;
    140134                        end
Note: See TracChangeset for help on using the changeset viewer.