Index: /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.m
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.m	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.m	(revision 14126)
@@ -0,0 +1,40 @@
+%Create model
+md=model;
+
+%Create mesh
+...
+
+%Define mask
+...
+
+%Parameterize model
+...
+
+%Extrude to have a 3d model
+...
+
+%Choose flow approximation
+...
+
+%Create dirichlet conditions
+md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+%Zero velocity on bed
+...
+
+%Create MPCs to have periodic boundary conditions
+posx=find(md.mesh.x==0);
+posx2=find(md.mesh.x==max(md.mesh.x));
+posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same grids two times
+posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
+md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
+
+%Set cluster 
+...
+
+%Print messages in verbose
+...
+
+%Solve 
+...
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.par
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.par	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPA.par	(revision 14126)
@@ -0,0 +1,20 @@
+%Create geometry: bed, thickness and surface
+disp('      creating thickness');
+md.geometry.surface=
+md.geometry.bed=
+md.geometry.thickness=
+
+%Create drag parameters (won't be used as ice is frozen on the bed)
+disp('      creating drag');
+md.friction.coefficient=
+md.friction.p=ones(md.mesh.numberofvertices,1);
+md.friction.q=ones(md.mesh.numberofvertices,1);
+
+%Create materials parameters: rheology parameters
+disp('      creating flow law paramter');
+md.materials.rheology_B=
+md.materials.rheology_n=
+
+%Create generic boundary conditions
+disp('      boundary conditions for diagnostic model');
+...
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.m
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.m	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.m	(revision 14126)
@@ -0,0 +1,41 @@
+%Create model
+md=model;
+
+%Create mesh
+...
+
+%Set mask
+...
+
+%Parameterize
+...
+
+%Extrude
+...
+
+%Set flow equation
+...
+
+%Boundary conditions 
+md.diagnostic.spcvx(:)=NaN;
+md.diagnostic.spcvy(:)=NaN;
+md.diagnostic.spcvz(:)=NaN;
+%Create dirichlet on the bed if no slip
+...
+
+%Create MPCs to have periodic boundary conditions
+posx=find(md.mesh.x==0);
+posx2=find(md.mesh.x==max(md.mesh.x));
+posy=find(md.mesh.y==0); %Don't take the same grids two times
+posy2=find(md.mesh.y==max(md.mesh.y));
+md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
+md.prognostic.vertex_pairing=[posx,posx2;posy,posy2];
+
+%Transient parameters in md.timestepping and md.transient
+
+%Compute the diagnostic
+md.cluster=generic('name',oshostname(),'np',2);
+md.verbose=verbose('convergence',true,'solution',true);
+
+%Solve
+...
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.par
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.par	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/ISMIPF.par	(revision 14126)
@@ -0,0 +1,22 @@
+disp('      creating geometry');
+md.geometry.surface=
+md.geometry.bed=
+md.geometry.thickness=
+
+disp('      creating drag');
+md.friction.coefficient=
+md.friction.p=ones(md.mesh.numberofelements,1);
+md.friction.q=zeros(md.mesh.numberofelements,1);
+
+disp('      creating flow law paramter');
+md.materials.rheology_B=(1/(2.140373*10^-7/(365.25*24*3600)))*ones(md.mesh.numberofvertices,1);
+md.materials.rheology_n=1*ones(md.mesh.numberofelements,1);
+
+disp('      boundary conditions for diagnostic model');
+md=SetIceSheetBC(md);
+
+%Field initialization
+md.initialization.vx=zeros(md.mesh.numberofvertices,1);
+md.initialization.vy=zeros(md.mesh.numberofvertices,1);
+md.initialization.vz=zeros(md.mesh.numberofvertices,1);
+md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip.par
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip.par	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip.par	(revision 14126)
@@ -0,0 +1,53 @@
+%Ok, start defining model parameters here
+
+disp('      creating geometry');
+md.geometry.bathymetry=
+md.geometry.bed=
+md.geometry.thickness=
+md.geometry.surface=
+
+disp('      creating drag');
+md.friction.coefficient=
+md.friction.p=
+md.friction.q=
+
+disp('      creating flow law paramter');
+md.materials.rheology_B=
+md.materials.rheology_n=
+md.materials.rheology_law='None';
+
+disp('      boundary conditions for diagnostic model');
+%Create node on boundary fist (because we cannot use mesh)
+md=SetIceShelfBC(md,'MismipFront.exp');
+md.diagnostic.icefront(:,end)=1;
+md.diagnostic.spcvx(:)=NaN;
+md.diagnostic.spcvy(:)=NaN;
+pos=find((md.mesh.y<50000.1 & md.mesh.y>49999.9) | (md.mesh.y<0.1 & md.mesh.y>-0.1));
+md.diagnostic.spcvy(pos)=0;
+pos2=find(md.mesh.x<0.1 & md.mesh.x>-0.1);
+md.diagnostic.spcvx(pos2)=0;
+md.diagnostic.spcvz(pos2)=0;
+
+disp('      forcing conditions');
+md.surfaceforcings.mass_balance=
+md.basalforcings.geothermalflux=
+
+md.thermal.spctemperature=NaN*ones(md.mesh.numberofvertices,1);
+md.groundingline.migration='AgressiveMigration';
+
+%Parameters
+md.materials.rho_ice=
+md.materials.rho_water=
+md.constants.g=
+md.constants.yts=
+md.transient.isthermal=
+md.transient.isgroundingline=
+md.diagnostic.isnewton=
+
+%Initialization
+md.initialization.vx=ones(md.mesh.numberofvertices,1);
+md.initialization.vy=ones(md.mesh.numberofvertices,1);
+md.initialization.vz=ones(md.mesh.numberofvertices,1);
+md.initialization.vel=sqrt(2)*ones(md.mesh.numberofvertices,1);
+md.initialization.pressure=md.constants.g*md.materials.rho_ice*md.geometry.thickness;
+md.initialization.temperature=273*ones(md.mesh.numberofvertices,1);
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip3d.m
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip3d.m	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/Mismip3d.m	(revision 14126)
@@ -0,0 +1,8 @@
+md=triangle(model,'MismipDomain.exp',10000);
+md=setmask(md,'','');
+md=parameterize(md,'Mismip.par');
+md=setflowequation(md,'macayeal','all');
+md.transient.isgroundingline=1;
+md.timestepping.time_step=100;
+md.timestepping.final_time=1000;
+md=solve(md,TransientSolutionEnum);
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/MismipDomain.exp
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/MismipDomain.exp	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/MismipDomain.exp	(revision 14126)
@@ -0,0 +1,10 @@
+## Name:domainoutline
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+0 0
+800000 0
+800000 50000
+0 50000
+0 0
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/MismipFront.exp
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/MismipFront.exp	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/MismipFront.exp	(revision 14126)
@@ -0,0 +1,10 @@
+## Name:front
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+800001 1
+799999 1
+799999 49999
+800001 49999
+800001 1
Index: /issm/workshop/2012/Talks/11_ISMIP/Files/Profile.exp
===================================================================
--- /issm/workshop/2012/Talks/11_ISMIP/Files/Profile.exp	(revision 14126)
+++ /issm/workshop/2012/Talks/11_ISMIP/Files/Profile.exp	(revision 14126)
@@ -0,0 +1,7 @@
+## Name:icefront
+## Icon:0
+# Points Count  Value
+2 1.
+# X pos Y pos
+0 50000
+100000 50000
