Changeset 9223


Ignore:
Timestamp:
08/09/11 14:06:28 (14 years ago)
Author:
Mathieu Morlighem
Message:

better test 1201 EISMINT to be debugged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/NightlyRun/test1201.m

    r8824 r9223  
    44results={};
    55
    6 for type=1:3;
     6for stabilization=1:3;
    77        %The goal is to test the prognostic model
    88        md=bamg(model,'domain','../Exp/SquareEISMINT.exp','hmax',3000);
     
    1616        md.vy=-400*ones(md.numberofnodes,1);
    1717        md.vz=zeros(md.numberofnodes,1);
     18        md.vel= 400*ones(md.numberofnodes,1);
    1819
    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,
    2722                md.artificial_diffusivity=1;
    2823                md.prognostic_DG=0;
    29         elseif type==2,
     24        elseif stabilization==2,
    3025                md.artificial_diffusivity=0;
    3126                md.prognostic_DG=0;
    32         elseif type==3,
     27        elseif stabilization==3,
    3328                md.prognostic_DG=1;
    3429        end
    3530
    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
    4132        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);
    5443end
    5544
Note: See TracChangeset for help on using the changeset viewer.