Changeset 9223
- Timestamp:
- 08/09/11 14:06:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/NightlyRun/test1201.m
r8824 r9223 4 4 results={}; 5 5 6 for type=1:3;6 for stabilization=1:3; 7 7 %The goal is to test the prognostic model 8 8 md=bamg(model,'domain','../Exp/SquareEISMINT.exp','hmax',3000); … … 16 16 md.vy=-400*ones(md.numberofnodes,1); 17 17 md.vz=zeros(md.numberofnodes,1); 18 md.vel= 400*ones(md.numberofnodes,1); 18 19 19 %analytical test 20 md.spcvx=zeros(md.numberofnodes,1); 21 md.spcvy=zeros(md.numberofnodes,1); 22 md.spcvz=zeros(md.numberofnodes,1); 23 md.spcvx(:)=0; 24 md.spcvy(:)=-400; 25 md.spcvx(1)=0; 26 if type==1, 20 %Stabilization 21 if stabilization==1, 27 22 md.artificial_diffusivity=1; 28 23 md.prognostic_DG=0; 29 elseif type==2,24 elseif stabilization==2, 30 25 md.artificial_diffusivity=0; 31 26 md.prognostic_DG=0; 32 elseif type==3,27 elseif stabilization==3, 33 28 md.prognostic_DG=1; 34 29 end 35 30 36 %Launch many prognostic as we don't really want a transient 37 %FOR NOW: 38 i=0; 39 time=0; 40 md.dummy=struct(); 31 %spc thickness 41 32 pos=find(md.y>199999.9); 42 connectivity=full(sparse(md.elements(:),1,1)); 43 while(time<500), 44 disp(['step ' num2str(i) '/' num2str(500/md.dt)]); 45 i=i+1; 46 time=time+md.dt; 47 md=solve(md,PrognosticSolutionEnum); 48 md.thickness=PatchToVec(md.results.PrognosticSolution.Thickness); 49 md.thickness(pos)=500+100*sin(2*pi*time/200)*ones(size(pos,1),1); 50 md.surface=md.bed+md.thickness; 51 md.dummy(i).thickness=md.thickness; 52 end 53 results{type}=md.thickness; 33 times=0:1:500; 34 md.spcthickness=NaN*ones(md.numberofnodes+1,length(times)); 35 md.spcthickness(end,:)=times; 36 md.spcthickness(pos,:)=repmat(500+100*sin(2*pi*times/200),length(pos),1); 37 38 %solve 39 md.isdiagnostic=0; 40 md.output_frequency=500; %keep only last step 41 md=solve(md,TransientSolutionEnum); 42 results{stabilization}=PatchToVec(md.results.TransientSolution(end).Thickness); 54 43 end 55 44
Note:
See TracChangeset
for help on using the changeset viewer.