Changeset 172


Ignore:
Timestamp:
05/01/09 14:46:39 (16 years ago)
Author:
Mathieu Morlighem
Message:

Some fixing of control.m (Cielo serial). More to come

Location:
issm/trunk/src/m/solutions/cielo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/solutions/cielo/GradJCompute.m

    r1 r172  
    22
    33%Recover solution for this stiffness and right hand side:
     4if m.parameters.debug
     5        disp('      computing velocities...')
     6end
    47[u_g K_ff0 K_fs0 ]=diagnostic_core_nonlinear(m,inputs);
    58
    69%Buid Du, difference between observed velocity and model velocity.
     10if m.parameters.debug
     11        disp('      computing Du...')
     12end
    713[Du_g]=Du(m.elements,m.nodes,m.loads,m.materials,m.parameters, u_g,u_g_obs,inputs);
    814
     
    1117
    1218%Solve for adjoint vector:
     19if m.parameters.debug
     20        disp('      computing adjoint state...')
     21end
    1322lambda_f=Solver(K_ff0,Du_f,[],m.parameters);
    1423
  • issm/trunk/src/m/solutions/cielo/control.m

    r137 r172  
    3131
    3232                %Update inputs in datasets
    33                 [m.elements,m.nodes, loads,m.materials]=UpdateFromInputs(m.elements,m.nodes, loads,m.materials,inputs);
     33                [m.elements,m.nodes,m.loads,m.materials]=UpdateFromInputs(m.elements,m.nodes,m.loads,m.materials,inputs);
    3434
    3535                disp('      computing gradJ...');
     
    8585        disp('      done.');
    8686       
    87        
    8887        t2=clock;
    8988        disp(['      overall time spent on control code ' num2str(etime(t2,t1)) ' seconds'])
  • issm/trunk/src/m/solutions/cielo/plot_direction.m

    r8 r172  
    1 grad_g=c(n).grad_g;
    2 grad_gx=grad_g(1:2:end);grad_gy=grad_g(2:2:end); grad_g=sqrt(grad_gx.^2+grad_gy.^2);
    3 plotmodel(md,'data',grad_g,'title',['Normalized Direction for ' m.parameters.control_type],'figure',1,'colorbar#all','on'); drawnow;
    4 clear grad_g grad_gx grad_gy
     1plotmodel(md,'data',sqrt(c(n).grad_g(1:2:end).^2+c(n).grad_g(2:2:end).^2),'title',['Normalized Direction for ' m.parameters.control_type],'figure',1,'colorbar#all','on'); drawnow;
  • issm/trunk/src/m/solutions/cielo/plot_newdistribution.m

    r8 r172  
    1 p_gx=p_g(1:2:end);p_gy=p_g(2:2:end); p_g=sqrt(p_gx.^2+p_gy.^2);
    2 plotmodel(md,'data',p_g,'title',['Distribution of ' m.parameters.control_type 'at iteration' num2str(n)],'figure',1,'colorbar#all','on'); drawnow;
    3 clear p_gx p_gy
     1plotmodel(md,'data',p_g(1:2:end),'title',['Distribution of ' m.parameters.control_type ' at iteration ' num2str(n)],'figure',2,'colorbar#all','on'); pause(1);
Note: See TracChangeset for help on using the changeset viewer.