Changeset 7810
- Timestamp:
- 04/11/11 11:55:54 (14 years ago)
- Location:
- issm/trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/examples/Bumps/Bump1_surface_bed/Square.par
r1 r7810 13 13 14 14 %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()); 20 16 21 17 %statics 22 18 md.lowmem=1; 23 md.eps_rel=0.01; 19 md.eps_res=0.05; 20 md.eps_rel=0.1; 24 21 md.eps_abs=10; %m/yr 25 22 md.penalty_offset=4; … … 36 33 md.artificial_diffusivity=1; 37 34 38 %control39 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/year46 md.epsvel=eps;47 48 49 35 disp(' creating thickness'); 50 36 hmin=500; … … 58 44 %Add bumps to the ice sheet : 59 45 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 bump46 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 61 47 62 48 md.surface=md.bed+md.thickness; %the surface follows the bed so the bump is transmitted to the surface … … 68 54 69 55 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. 72 57 %Take care of iceshelves: no basal drag 73 58 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); 77 62 78 63 disp(' creating temperature'); … … 80 65 81 66 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); 84 69 85 70 disp(' creating accumulation rates'); 86 md.accumulation =ones(md.numberofgrids,1)/md.yts; %1m/a87 md.melting =0*ones(md.numberofgrids,1)/md.yts; %1m/a71 md.accumulation_rate=ones(md.numberofgrids,1)/md.yts; %1m/a 72 md.melting_rate=0*ones(md.numberofgrids,1)/md.yts; %1m/a 88 73 89 74 %Deal with boundary conditions: 90 75 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'); 95 78 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 radiation111 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 radiation116 117 disp(' boundary conditions for thermal model: ');118 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature119 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 1 if 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); 11 else 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) 22 end -
issm/trunk/externalpackages/export_fig/ghostscript.m
r7182 r7810 124 124 125 125 function current_gs_path_str = current_gs_path 126 current_gs_path_str = ' C:\Program Files\gs\gs8.71\bin\gswin32c.exe';126 current_gs_path_str = 'gs'; 127 127 return -
issm/trunk/src/m/utils/Mesh/FixMesh.m
r5028 r7810 15 15 y2=y; 16 16 value2=value; 17 18 17 19 18 %First, look for orphan vertices, and take them out. … … 39 38 end 40 39 41 42 40 %Check all triangles are well oriented. 43 41 aires=GetAreas(index2,x2,y2); -
issm/trunk/src/mex/Test/Test.cpp
r7752 r7810 11 11 char *name = NULL; 12 12 bool logical; 13 double *matrix = NULL; 14 int numel; 13 15 14 16 printf("Parsing options:\n"); … … 24 26 printf("\n value of \"CELL[0,2]\" is %g\n",test); 25 27 26 options->Get(&logical,"logical" );28 options->Get(&logical,"logical",true); 27 29 printf("\n value of \"logical\" is %s\n",logical?"true":"false"); 30 31 options->Get(&matrix,&numel,"matrix"); 32 printarray(matrix,numel); 28 33 29 34 delete options; 30 35 xfree((void**)&name); 36 xfree((void**)&matrix); 31 37 } 32 38
Note:
See TracChangeset
for help on using the changeset viewer.