Changeset 4875


Ignore:
Timestamp:
07/29/10 10:09:21 (15 years ago)
Author:
seroussi
Message:

Validation tests PattynStokes

Location:
issm/trunk/test/Validation/PattynStokes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/Validation/PattynStokes/test1_iceshelf/runme.m

    r899 r4875  
    1111md=setelementstype(md,'Pattyn','all');
    1212
    13 md=solve(md,'analysis_type','diagnostic','package','ice');
    14 vel_pattyn=md.results.diagnostic.vel;
    15 vx_pattyn=md.results.diagnostic.vx;
    16 vy_pattyn=md.results.diagnostic.vy;
    17 vz_pattyn=md.results.diagnostic.vz;
    18 pressure_pattyn=md.results.diagnostic.pressure;
     13md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     14vel_pattyn=zeros(md.numberofgrids,1);
     15vel_pattyn(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     16vx_pattyn=zeros(md.numberofgrids,1);
     17vx_pattyn(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     18vy_pattyn=zeros(md.numberofgrids,1);
     19vy_pattyn(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     20vz_pattyn=zeros(md.numberofgrids,1);
     21vz_pattyn(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     22pressure_pattyn=zeros(md.numberofgrids,1);
     23pressure_pattyn(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    1924
    2025mdpattyn=md;
     
    2934md=setelementstype(md,'Stokes','all','Pattyn','all');
    3035
    31 md=solve(md,'analysis_type','diagnostic','package','ice');
    32 vel_stokes=md.vel;
    33 vx_stokes=md.vx;
    34 vy_stokes=md.vy;
    35 vz_stokes=md.vz;
    36 pressure_stokes=md.pressure;
     36md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     37vel_stokes=zeros(md.numberofgrids,1);
     38vel_stokes(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     39vx_stokes=zeros(md.numberofgrids,1);
     40vx_stokes(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     41vy_stokes=zeros(md.numberofgrids,1);
     42vy_stokes(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     43vz_stokes=zeros(md.numberofgrids,1);
     44vz_stokes(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     45pressure_stokes=zeros(md.numberofgrids,1);
     46pressure_stokes(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    3747
    3848mdstokes=md;
    39 save modelstokes mdstokes;
     49save modelstokes mdstokes
     50
     51%plot the two velocities
     52plotmodel(md,'data',vel_pattyn,'data',vel_stokes,'data',abs((vel_pattyn-vel_stokes)./vel_pattyn)*100,'data',vel_pattyn-vel_stokes,'title','Pattyn velocity','title','Stokes velocity','title','Relative difference','title','Absolute difference','view#all',2)
  • issm/trunk/test/Validation/PattynStokes/test2_icesheet/Square.par

    r3768 r4875  
    3434md.np=3;
    3535md.time=50;
    36 md.waitonlock=1;
     36md.waitonlock=10;
  • issm/trunk/test/Validation/PattynStokes/test2_icesheet/runme.m

    r911 r4875  
    1111md=setelementstype(md,'Pattyn','all');
    1212
    13 md=solve(md,'analysis_type','diagnostic','package','ice');
    14 vel_pattyn=md.results.diagnostic.vel;
    15 vx_pattyn=md.results.diagnostic.vx;
    16 vy_pattyn=md.results.diagnostic.vy;
    17 vz_pattyn=md.results.diagnostic.vz;
    18 pressure_pattyn=md.results.diagnostic.pressure;
     13md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     14vel_pattyn=zeros(md.numberofgrids,1);
     15vel_pattyn(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     16vx_pattyn=zeros(md.numberofgrids,1);
     17vx_pattyn(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     18vy_pattyn=zeros(md.numberofgrids,1);
     19vy_pattyn(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     20vz_pattyn=zeros(md.numberofgrids,1);
     21vz_pattyn(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     22pressure_pattyn=zeros(md.numberofgrids,1);
     23pressure_pattyn(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    1924
    2025mdpattyn=md;
     
    2934md=setelementstype(md,'Pattyn','all','Stokes','all');
    3035
    31 md=solve(md,'analysis_type','diagnostic','package','ice');
    32 vel_stokes=md.results.diagnostic.vel;
    33 vx_stokes=md.results.diagnostic.vx;
    34 vy_stokes=md.results.diagnostic.vy;
    35 vz_stokes=md.results.diagnostic.vz;
    36 pressure_stokes=md.results.diagnostic.pressure;
     36md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     37vel_stokes=zeros(md.numberofgrids,1);
     38vel_stokes(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     39vx_stokes=zeros(md.numberofgrids,1);
     40vx_stokes(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     41vy_stokes=zeros(md.numberofgrids,1);
     42vy_stokes(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     43vz_stokes=zeros(md.numberofgrids,1);
     44vz_stokes(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     45pressure_stokes=zeros(md.numberofgrids,1);
     46pressure_stokes(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    3747
    3848mdstokes=md;
    3949save modelstokes mdstokes;
    4050
     51%plot the two velocities
     52plotmodel(md,'data',vel_pattyn,'data',vel_stokes,'data',abs((vel_pattyn-vel_stokes)./vel_pattyn)*100,'data',vel_pattyn-vel_stokes,'title','Pattyn velocity','title','Stokes velocity','title','Relative difference','title','Absolute difference','view#all',2)
  • issm/trunk/test/Validation/PattynStokes/test3_icesheet_iceshelf/Square.par

    r3768 r4875  
    3434md.np=3;
    3535md.time=50;
    36 md.waitonlock=1;
     36md.waitonlock=10;
  • issm/trunk/test/Validation/PattynStokes/test3_icesheet_iceshelf/runme.m

    r899 r4875  
    1111md=setelementstype(md,'Pattyn','all');
    1212
    13 md=solve(md,'analysis_type','diagnostic','package','ice');
    14 vel_pattyn=md.results.diagnostic.vel;
    15 vx_pattyn=md.results.diagnostic.vx;
    16 vy_pattyn=md.results.diagnostic.vy;
    17 vz_pattyn=md.results.diagnostic.vz;
    18 pressure_pattyn=md.results.diagnostic.pressure;
     13md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     14vel_pattyn=zeros(md.numberofgrids,1);
     15vel_pattyn(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     16vx_pattyn=zeros(md.numberofgrids,1);
     17vx_pattyn(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     18vy_pattyn=zeros(md.numberofgrids,1);
     19vy_pattyn(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     20vz_pattyn=zeros(md.numberofgrids,1);
     21vz_pattyn(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     22pressure_pattyn=zeros(md.numberofgrids,1);
     23pressure_pattyn(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    1924
    2025mdpattyn=md;
     
    2934md=setelementstype(md,'Pattyn','all','Stokes','all');
    3035
    31 md=solve(md,'analysis_type','diagnostic','package','ice');
    32 vel_stokes=md.results.diagnostic.vel;
    33 vx_stokes=md.results.diagnostic.vx;
    34 vy_stokes=md.results.diagnostic.vy;
    35 vz_stokes=md.results.diagnostic.vz;
    36 pressure_stokes=md.results.diagnostic.pressure;
     36md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     37vel_stokes=zeros(md.numberofgrids,1);
     38vel_stokes(md.results.DiagnosticSolution.Vel.index)=md.results.DiagnosticSolution.Vel.value;
     39vx_stokes=zeros(md.numberofgrids,1);
     40vx_stokes(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     41vy_stokes=zeros(md.numberofgrids,1);
     42vy_stokes(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     43vz_stokes=zeros(md.numberofgrids,1);
     44vz_stokes(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
     45pressure_stokes=zeros(md.numberofgrids,1);
     46pressure_stokes(md.results.DiagnosticSolution.Pressure.index)=md.results.DiagnosticSolution.Pressure.value;
    3747
    3848mdstokes=md;
    3949save modelstokes mdstokes;
     50
     51%plot the two velocities
     52plotmodel(md,'data',vel_pattyn,'data',vel_stokes,'data',abs((vel_pattyn-vel_stokes)./vel_pattyn)*100,'data',vel_pattyn-vel_stokes,'title','Pattyn velocity','title','Stokes velocity','title','Relative difference','title','Absolute difference','view#all',2)
Note: See TracChangeset for help on using the changeset viewer.