Changeset 8155
- Timestamp:
- 05/05/11 17:27:41 (14 years ago)
- Location:
- issm/trunk/test/NightlyRun
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/NightlyRun/test1102.m
r6308 r8155 4 4 5 5 L_list={5000,10000,20000,40000,80000,160000}; 6 L_list={80000};7 6 results={}; 8 7 minvx=[]; -
issm/trunk/test/NightlyRun/test1110.m
r8039 r8155 1 1 %This test is a test from the ISMP-HOM Intercomparison project 2 2 %TestF 3 L=100000; %in m 4 nx=30; %numberof nodes in x direction 5 ny=30; 6 md=model; 7 md=squaremesh(md,L,L,nx,ny); 8 %md=mesh(md,'../Exp/SquareISMIP.exp',5500); 9 md=geography(md,'',''); %ice sheet test 10 md=parameterize(md,'../Par/ISMIPF.par'); 11 md=extrude(md,3,1); 3 printingflag=false; 12 4 13 md=setelementstype(md,'pattyn','all'); 14 %md=setelementstype(md,'pattyn','all','stokes','all'); 5 for i=1:4, 6 L=100000; %in m 7 nx=30; %numberof nodes in x direction 8 ny=30; 9 md=model; 10 md=squaremesh(md,L,L,nx,ny); 11 %md=mesh(md,'../Exp/SquareISMIP.exp',5500); 12 md=geography(md,'',''); %ice sheet test 13 md=parameterize(md,'../Par/ISMIPF.par'); 14 md=extrude(md,4,1); 15 15 16 md.spcvelocity(:,:)=0; 17 %Create dirichlet on the bed if no slip 18 pos=find(md.gridonbed); 19 md.spcvelocity(pos,1:2)=1; 20 md.spctemperature(:,2)=255; 21 md.spctemperature(:,1)=255; 16 if (i==1 | i==2), 17 md=setelementstype(md,'pattyn','all'); 18 else 19 md=setelementstype(md,'stokes','all'); 20 end 22 21 23 %Create MPCs to have periodic boundary conditions 24 posx=find(md.x==0); 25 posx2=find(md.x==max(md.x)); 22 md.spcvelocity(:,:)=0; 23 if (i==1 | i==3), 24 %Create dirichlet on the bed if no slip 25 pos=find(md.gridonbed); 26 md.spcvelocity(pos,1:3)=1; 27 else 28 pos=find(md.gridonbed & (md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y))); 29 md.spcvelocity(pos,1:3)=1; 30 md.spcvelocity(pos,4)=100; %because we need a dirichlet somewhere 26 31 27 posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times 28 posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x)); 32 end 33 pos=find(~md.gridonbed); 34 md.spctemperature(pos,2)=255; 35 md.spctemperature(pos,1)=1; 29 36 30 md.penalties=[posx,posx2;posy,posy2]; 37 %Create MPCs to have periodic boundary conditions 38 posx=find(md.x==0); 39 posx2=find(md.x==max(md.x)); 31 40 32 md.dt=5;33 md.ndt=50;41 posy=find(md.y==0); 42 posy2=find(md.y==max(md.y)); 34 43 35 %Compute the diagnostic 36 md=SetParallel(md,8); 37 md.verbose=verbose('convergence',true,'solution',true); 38 md=solve(md,'analysis_type',Transient3DSolutionEnum); 44 md.penalties=[posx,posx2;posy,posy2]; 39 45 40 %vx=PatchToVec(md.results.DiagnosticSolution.Vx); 41 %vy=PatchToVec(md.results.DiagnosticSolution.Vy); 42 %vz=PatchToVec(md.results.DiagnosticSolution.Vz); 46 md.dt=3; 47 md.ndt=300; 48 md.output_frequency=50; 49 md.prognostic_DG=0; 50 md.max_nonlinear_iterations=1; 43 51 44 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers) 52 %Compute the diagnostic 53 md=SetParallel(md,8); 54 md.verbose=verbose('convergence',true,'solution',true); 55 md=solve(md,'analysis_type',Transient3DSolutionEnum); 56 57 %save the results 58 results{i}=md.results.Transient3DSolution(end); 59 60 %Now plot vx and delta surface 61 plotmodel(md,'data',PatchToVec(md.results.Transient3DSolution(end).Vx),'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp') 62 if printingflag, 63 set(gcf,'Color','w') 64 if i==1, 65 printmodel('ismipfpattynvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 66 system(['mv ismipfpattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 67 elseif i==2, 68 printmodel('ismipfpattynvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 69 system(['mv ismipfpattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 70 elseif i==3, 71 printmodel('ismipfstokesvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 72 system(['mv ismipfstokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 73 elseif i==4, 74 printmodel('ismipfstokesvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 75 system(['mv ismipfstokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 76 end 77 end 78 79 plotmodel(md,'data',PatchToVec(md.results.Transient3DSolution(end).Surface)-md.surface,'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp') 80 if printingflag, 81 set(gcf,'Color','w') 82 if i==1, 83 printmodel('ismipfpattyndeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 84 system(['mv ismipfpattyndeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 85 elseif i==2, 86 printmodel('ismipfpattyndeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 87 system(['mv ismipfpattyndeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 88 elseif i==3, 89 printmodel('ismipfstokesdeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 90 system(['mv ismipfstokesdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 91 elseif i==4, 92 printmodel('ismipfstokesdeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off'); 93 system(['mv ismipfstokesdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']); 94 end 95 end 96 end 97 98 %Fields and tolerances to track changes 99 field_names ={ ... 100 'VxPattynFrozen','VyPattynFrozen','VzPattynFrozen','SurfacePattynFrozen',... 101 'VxPattynSliding','VyPattynSliding','VzPattynSliding','SurfacePattynSliding',... 102 'VxStokesFrozen','VyStokesFrozen','VzStokesFrozen','SurfaceStokesFrozen',... 103 'VxStokesSliding','VyStokesSliding','VzStokesSliding','SurfaceStokesSliding' 104 }; 105 field_tolerances={... 106 1e-10,1e-09,1e-10,... 107 1e-10,1e-10,1e-10,... 108 1e-10,1e-09,1e-09,... 109 1e-09,1e-09,1e-09... 110 }; 111 field_values={}; 112 for i=1:4, 113 result=results{i}; 114 field_values={field_values{:},... 115 PatchToVec(result.Vx),... 116 PatchToVec(result.Vy),... 117 PatchToVec(result.Vz),... 118 PatchToVec(result.Surface)-md.surface,... 119 }; 120 end
Note:
See TracChangeset
for help on using the changeset viewer.