Changeset 7810


Ignore:
Timestamp:
04/11/11 11:55:54 (14 years ago)
Author:
Mathieu Morlighem
Message:

Added TEST for permissions

Location:
issm/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/examples/Bumps/Bump1_surface_bed/Square.par

    r1 r7810  
    1313
    1414%Solution parameters
    15         %parallelization
    16         md.cluster='none';
    17         md.np=2;
    18         md.time=1;
    19         md.exclusive=0;
     15        md.cluster=eval(oshostname());
    2016
    2117        %statics
    2218        md.lowmem=1;
    23         md.eps_rel=0.01;
     19        md.eps_res=0.05;
     20        md.eps_rel=0.1;
    2421        md.eps_abs=10; %m/yr
    2522        md.penalty_offset=4;
     
    3633        md.artificial_diffusivity=1;
    3734
    38         %control
    39         md.control_type={'drag'}; %'drag', 'B'
    40         md.nsteps=5;
    41         md.tolx=10^-4;
    42         md.maxiter=20;
    43         md.optscal=10;
    44         md.fit='logarithmic'; %'absolute','relative','logarithmic'
    45         md.meanvel=1000/md.yts; %1000 meters/year
    46         md.epsvel=eps;
    47 
    48 
    4935        disp('      creating thickness');
    5036        hmin=500;
     
    5844        %Add bumps to the ice sheet :
    5945        pos=find(sqrt((md.x-500000).^2+(md.y-500000).^2)<100000); %for a cicular bump
    60         md.bed(pos)=md.bed(pos)+150*cos(pi/200000*(sqrt((md.y(pos)-500000).^2+(md.x(pos)-500000).^2))); %for a circular bump
     46        md.bed(pos)=md.bed(pos)+30*cos(pi/200000*(sqrt((md.y(pos)-500000).^2+(md.x(pos)-500000).^2))); %for a circular bump
    6147
    6248        md.surface=md.bed+md.thickness; %the surface follows the bed so the bump is transmitted to the surface
     
    6854       
    6955        disp('      creating drag');
    70         md.drag_type=2; %0 none 1 plastic 2 viscous
    71         md.drag=200*ones(md.numberofgrids,1); %q=1.
     56        md.drag_coefficient=200*ones(md.numberofgrids,1); %q=1.
    7257        %Take care of iceshelves: no basal drag
    7358        pos=find(md.elementoniceshelf);
    74         md.drag(md.elements(pos,:))=0;
    75         md.p=ones(md.numberofelements,1);
    76         md.q=ones(md.numberofelements,1);
     59        md.drag_coefficient(md.elements(pos,:))=0;
     60        md.drag_p=ones(md.numberofelements,1);
     61        md.drag_q=ones(md.numberofelements,1);
    7762
    7863        disp('      creating temperature');
     
    8065
    8166        disp('      creating flow law paramter');
    82         md.B=paterson(md.observed_temperature);
    83         md.n=3*ones(md.numberofelements,1);
     67        md.rheology_B=paterson(md.observed_temperature);
     68        md.rheology_n=3*ones(md.numberofelements,1);
    8469
    8570        disp('      creating accumulation rates');
    86         md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a
    87         md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a
     71        md.accumulation_rate=ones(md.numberofgrids,1)/md.yts; %1m/a
     72        md.melting_rate=0*ones(md.numberofgrids,1)/md.yts; %1m/a
    8873
    8974        %Deal with boundary conditions:
    9075       
    91         disp('      boundary conditions for diagnostic model: ');
    92         %Build gridonicefront, array of boundary grids belonging to the icefront:
    93         gridinsideicefront=ArgusContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2);
    94         gridonicefront=double(md.gridonboundary & gridinsideicefront);
     76        disp('      boundary conditions');
     77        md=SetIceShelfBC(md,'Front.exp');
    9578
    96         md.gridondirichlet_diag=zeros(md.numberofgrids,1);
    97         pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1;
    98         md.dirichletvalues_diag=100*ones(md.numberofgrids,2)*[0,0;0,1];
    99 
    100         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    101         md.segmentonneumann_diag=md.segments(pos,:);
    102         md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
    103 
    104         disp('      boundary conditions for prognostic model: ');
    105         md.gridondirichlet_prog=zeros(md.numberofgrids,1);
    106         md.dirichletvalues_prog=zeros(md.numberofgrids,1);
    107         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    108         md.segmentonneumann_prog=md.segments(pos,:);
    109         md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1);
    110         md.neumannvalues_prog(:)=NaN; %free radiation
    111        
    112         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    113         md.segmentonneumann_prog2=md.segments(pos,:);
    114         md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1);
    115         md.neumannvalues_prog2(:)=NaN; %free radiation
    116        
    117         disp('      boundary conditions for thermal model: ');
    118         md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature
    119         md.dirichletvalues_thermal=md.observed_temperature;
    120         md.geothermalflux=zeros(md.numberofgrids,1);
    121 
    122 
    123 % Some Cielo code, ignore.
    124 if strcmp(md.cluster,'yes')
    125         ServerDisconnect;
    126 end   
  • issm/trunk/examples/Bumps/Bump1_surface_bed/runme.m

    r1 r7810  
    1 % This file can be run to see the response to a bump on the bed of an ice sheet. The bump is not
    2 % transmitted to the surface of the ice. The results of the three models are saved in order to be
    3 % compared. The geometry is square and the ice sheet is flat. The velocity of the icesheet is
    4 % 100 m/yr in one particular direction on every border. Just run this file in Matlab, i
    5 % with a properly setup Ice code.
    6 % Take care to have the same density and number of layers to compare the results easily.
    7 
    8 % Create macayeal model;
    9 
    10 mdm=model;
    11 mdm=mesh(mdm,'DomainOutline.exp',150000);
    12 mdm=geography(mdm,'','');
    13 mdm=parameterize(mdm,'Square.par');
    14 mdm=extrude(mdm,6,3);
    15 mdm=setelementstype(mdm,'macayeal','all');
    16 
    17 %Compute solution with Ice model
    18 mdm=solve(mdm,'diagnostic','ice');
    19 
    20 save modelmacayeal mdm
    21 
    22 % Create pattyn model;
    23 
    24 mdp=model;
    25 mdp=mesh(mdp,'DomainOutline.exp',150000);
    26 mdp=geography(mdp,'','');
    27 mdp=parameterize(mdp,'Square.par');
    28 mdp=extrude(mdp,6,3);
    29 mdp=setelementstype(mdp,'pattyn','all');
    30 
    31 %Compute solution with Ice model
    32 mdp=solve(mdp,'diagnostic','ice');
    33 
    34 save modelpattyn mdp
    35 
    36 % Create stokes model;
    37 
    38 mds=model;
    39 mds=mesh(mds,'DomainOutline.exp',150000);
    40 mds=geography(mds,'','');
    41 mds=parameterize(mds,'Square.par');
    42 mds=extrude(mds,6,3);
    43 mds=setelementstype(mds,'pattyn','all','stokes','all');
    44 
    45 %Compute solution with Ice model
    46 mds=solve(mds,'diagnostic','ice');
    47 
    48 save modelstokes mds
     1if 0,
     2        md=mesh(model,'DomainOutline.exp',15000);
     3        md=geography(md,'','');
     4        md=parameterize(md,'Square.par');
     5        md=extrude(md,2,3);
     6        md=setelementstype(md,'stokes','all');
     7        md.cluster.np=14;
     8        md.verbose.convergence=1;
     9        md.spcvelocity(:,5)=1000;
     10        md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     11else
     12        md.vx=PatchToVec(md.results.DiagnosticSolution.Vx);
     13        md.vy=PatchToVec(md.results.DiagnosticSolution.Vy);
     14        md.accumulation_rate(:)=0;
     15        md.melting_rate(:)=0;
     16        md.thickness(:)=1;
     17        md.bed=md.surface-md.thickness;
     18        md.dt=1;
     19        md=solve(md,'analysis_type',PrognosticSolutionEnum);
     20        beep;pause(0.2);beep;
     21        plotmodel(md,'data',PatchToVec(md.results.PrognosticSolution.Thickness)-md.thickness)
     22end
  • issm/trunk/externalpackages/export_fig/ghostscript.m

    r7182 r7810  
    124124
    125125function current_gs_path_str = current_gs_path
    126 current_gs_path_str = 'C:\Program Files\gs\gs8.71\bin\gswin32c.exe';
     126current_gs_path_str = 'gs';
    127127return
  • issm/trunk/src/m/utils/Mesh/FixMesh.m

    r5028 r7810  
    1515y2=y;
    1616value2=value;
    17 
    1817
    1918%First, look for orphan vertices, and take them out.
     
    3938end
    4039
    41 
    4240%Check all triangles are well oriented.
    4341aires=GetAreas(index2,x2,y2);
  • issm/trunk/src/mex/Test/Test.cpp

    r7752 r7810  
    1111        char    *name    = NULL;
    1212        bool     logical;
     13        double  *matrix    = NULL;
     14        int      numel;
    1315
    1416        printf("Parsing options:\n");
     
    2426        printf("\n value of \"CELL[0,2]\" is %g\n",test);
    2527
    26         options->Get(&logical,"logical");
     28        options->Get(&logical,"logical",true);
    2729        printf("\n value of \"logical\" is %s\n",logical?"true":"false");
     30
     31        options->Get(&matrix,&numel,"matrix");
     32        printarray(matrix,numel);
    2833
    2934        delete options;
    3035        xfree((void**)&name);
     36        xfree((void**)&matrix);
    3137}
    3238
Note: See TracChangeset for help on using the changeset viewer.