Changeset 15614
- Timestamp:
- 07/25/13 11:22:00 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 added
- 1 deleted
- 18 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/externalpackages/matlab/install.sh
r15336 r15614 1 1 #!/bin/bash 2 set -eu 3 4 if [ ! -h install ]; 5 then 6 echo " ****************************************************************" 7 echo " * *" 8 echo " * you need create a symbolic link from matlab's root directory *" 9 echo " * *" 10 echo " * First, you need to locate matlab's root directory *" 11 echo " * The easiest way to find it is to launch matlab and run the *" 12 echo " * following command: matlabroot *" 13 echo " * Then, create a symbolic link using the command 'ln -s ' the *" 14 echo " * target directory should be named 'install' *" 15 echo " * *" 16 echo " * Examples: *" 17 echo " * ln -s /usr/local/matlab712/ install *" 18 echo " * ln -s /Applications/MATLAB_R2012a.app/ install *" 19 echo " * *" 20 echo " * run ./install.sh again to check that the link is correct *" 21 echo " * *" 22 echo " ****************************************************************" 23 else 24 25 #Read link 26 DIR=$(readlink install) 27 if [ -d $DIR ] 28 then 29 echo "Symbolic link correctly set" 30 else 31 rm -rf install 32 echo "Incorrect symbolic link:" 33 echo "provided target ($DIR) does not exist or is not a directory" 34 fi 35 fi 2 rm -rf install 3 ln -s /usr/local/matlab80/ install -
issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.m
r14529 r15614 27 27 end 28 28 29 %segment on neumann (Ice Front) -> none 30 if (md.mesh.dimension==2) 31 md.diagnostic.icefront=zeros(0,4); 32 else 33 md.diagnostic.icefront=zeros(0,6); 34 end 29 %No ice front: do nothing 35 30 36 31 %Create zeros basal melting rate and surface mass balance if not specified -
issm/trunk-jpl/src/m/boundaryconditions/SetIceSheetBC.py
r14529 r15614 32 32 print " boundary conditions for diagnostic model: spc set as zero" 33 33 34 #segment on neumann (Ice Front) -> none 35 if md.mesh.dimension==2: 36 md.diagnostic.icefront=numpy.zeros((0,4)) 37 else: 38 md.diagnostic.icefront=numpy.zeros((0,6)) 34 #No ice front -> do nothing 39 35 40 36 #Create zeros basal melting rate and surface mass balance if not specified -
issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.m
r15595 r15614 46 46 end 47 47 48 %segment on Ice Front 49 %segment on Neumann (Ice Front) 50 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); 51 if (md.mesh.dimension==2) 52 pressureload=md.mesh.segments(pos,:); 53 elseif md.mesh.dimension==3 54 pressureload_layer1=[md.mesh.segments(pos,1:2) md.mesh.segments(pos,2)+md.mesh.numberofvertices2d md.mesh.segments(pos,1)+md.mesh.numberofvertices2d md.mesh.segments(pos,3)]; 55 pressureload=[]; 56 for i=1:md.mesh.numberoflayers-1, 57 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ]; 58 end 59 end 60 61 %Add water or air enum depending on the element 62 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))]; 63 64 %plug onto model 65 md.diagnostic.icefront=pressureload; 48 %Ice front position 66 49 md.mask.icelevelset(find(nodeonicefront))=0; 67 50 -
issm/trunk-jpl/src/m/boundaryconditions/SetIceShelfBC.py
r15595 r15614 54 54 print " boundary conditions for diagnostic model: spc set as zero" 55 55 56 #segment on Ice Front 57 #segment on Neumann (Ice Front) 58 # pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); 59 pos=numpy.nonzero(numpy.logical_or(nodeonicefront[md.mesh.segments[:,0]-1],nodeonicefront[md.mesh.segments[:,1]-1]))[0] 60 if md.mesh.dimension==2: 61 pressureload=md.mesh.segments[pos,:] 62 elif md.mesh.dimension==3: 63 # pressureload_layer1=[md.mesh.segments(pos,1:2) md.mesh.segments(pos,2)+md.mesh.numberofvertices2d md.mesh.segments(pos,1)+md.mesh.numberofvertices2d md.mesh.segments(pos,3)]; 64 pressureload_layer1=numpy.hstack((md.mesh.segments[pos,0:2],md.mesh.segments[pos,1]+md.mesh.numberofvertices2d,md.mesh.segments[pos,0]+md.mesh.numberofvertices2d,md.mesh.segments[pos,2])) 65 pressureload=numpy.zeros((0,5),int) 66 for i in xrange(1,md.mesh.numberoflayers): 67 # pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ]; 68 pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+(i-1)*md.mesh.numberofvertices2d,pressureload_layer1[:,4]+(i-1)*md.mesh.numberofelements2d)))) 69 70 #Add water or air enum depending on the element 71 # pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))]; 72 pressureload=numpy.hstack((pressureload,1*md.mask.elementonfloatingice[pressureload[:,-1]-1].reshape(-1,1))) 73 74 #plug onto model 75 md.diagnostic.icefront=pressureload 56 #Icefront position 76 57 pos=numpy.nonzero(nodeonicefront)[0] 77 58 md.mask.icelevelset[pos]=0 -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m
r15595 r15614 57 57 md.hydrology.spcwatercolumn(pos,1)=1; 58 58 59 %segment on Neumann (Ice Front) 60 pos=find(vertexonicefront(md.mesh.segments(:,1)) | vertexonicefront(md.mesh.segments(:,2))); 61 if (md.mesh.dimension==2) 62 pressureload=md.mesh.segments(pos,:); 63 elseif md.mesh.dimension==3 64 pressureload_layer1=[md.mesh.segments(pos,1:2) md.mesh.segments(pos,2)+md.mesh.numberofvertices2d md.mesh.segments(pos,1)+md.mesh.numberofvertices2d md.mesh.segments(pos,3)]; 65 pressureload=[]; 66 for i=1:md.mesh.numberoflayers-1, 67 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ]; 68 end 69 end 70 71 %Add water or air enum depending on the element 72 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))+ 0*md.mask.elementongroundedice(pressureload(:,end))]; 73 74 %plug onto model 75 md.diagnostic.icefront=pressureload; 59 %Position of ice front 76 60 md.mask.icelevelset(find(vertexonicefront))=0; 77 61 -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
r15595 r15614 61 61 md.hydrology.spcwatercolumn[pos,0]=1 62 62 63 #segment on Neumann (Ice Front) 64 # pos=find(vertexonicefront(md.mesh.segments(:,1)) | vertexonicefront(md.mesh.segments(:,2))); 65 pos=numpy.nonzero(numpy.logical_or(vertexonicefront[md.mesh.segments[:,0]-1],vertexonicefront[md.mesh.segments[:,1]-1]))[0] 66 if md.mesh.dimension==2: 67 pressureload=md.mesh.segments[pos,:] 68 elif md.mesh.dimension==3: 69 # pressureload_layer1=[md.mesh.segments(pos,1:2) md.mesh.segments(pos,2)+md.mesh.numberofvertices2d md.mesh.segments(pos,1)+md.mesh.numberofvertices2d md.mesh.segments(pos,3)]; 70 pressureload_layer1=numpy.hstack((md.mesh.segments[pos,0:2],md.mesh.segments[pos,1]+md.mesh.numberofvertices2d,md.mesh.segments[pos,0]+md.mesh.numberofvertices2d,md.mesh.segments[pos,2])) 71 pressureload=numpy.zeros((0,5),int) 72 for i in xrange(1,md.mesh.numberoflayers): 73 # pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ]; 74 pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+(i-1)*md.mesh.numberofvertices2d,pressureload_layer1[:,4]+(i-1)*md.mesh.numberofelements2d)))) 75 76 #Add water or air enum depending on the element 77 # pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))+ 0*md.mask.elementongroundedice(pressureload(:,end))]; 78 pressureload=numpy.hstack((pressureload,1*md.mask.elementonfloatingice[pressureload[:,-1]-1].reshape(-1,1)+0*md.mask.elementongroundedice[pressureload[:,-1]-1].reshape(-1,1))) 79 80 #plug onto model 81 md.diagnostic.icefront=pressureload 63 #Position of ice front 82 64 pos=numpy.nonzero(vertexonicefront)[0] 83 65 md.mask.icelevelset[pos]=0 -
issm/trunk-jpl/src/m/classes/model/model.m
r15595 r15614 91 91 disp('Recovering old hydrology class'); 92 92 md.hydrology=hydrologyshreve(md.materials); 93 end 94 %2013 Juli 25th 95 if isa(md.diagnostic,'diagnostic'), 96 disp('Recovering old stressbalance class'); 97 icefront = md.diagnostic.icefront; 98 md.diagnostic=stressbalance(md.diagnostic); 99 100 %Deal with front 101 md.mask.icelevelset=ones(md.mesh.numberofvertices,1); 102 md.mask.icelevelset(icefront(:,1:end-2))=0; 93 103 end 94 104 … … 184 194 md.prognostic.spcthickness=project2d(md,md.prognostic.spcthickness,md.mesh.numberoflayers); 185 195 md.thermal.spctemperature=project2d(md,md.thermal.spctemperature,md.mesh.numberoflayers); 186 187 %Extrusion of Neumann BC188 if ~isnan(md.diagnostic.icefront),189 numberofneumann2d=size(md.diagnostic.icefront,1)/(md.mesh.numberoflayers-1);190 md.diagnostic.icefront=[md.diagnostic.icefront(1:numberofneumann2d,1:2) md.diagnostic.icefront(1:numberofneumann2d,5:6)]; %Add two columns on the first layer191 end192 196 193 197 %materials … … 499 503 end 500 504 501 %Diagnostic502 if ~isnan(md2.diagnostic.icefront)503 md2.diagnostic.icefront(:,1)=Pnode(md1.diagnostic.icefront(:,1));504 md2.diagnostic.icefront(:,2)=Pnode(md1.diagnostic.icefront(:,2));505 md2.diagnostic.icefront(:,end-1)=Pelem(md1.diagnostic.icefront(:,end-1));506 if md1.mesh.dimension==3507 md2.diagnostic.icefront(:,3)=Pnode(md1.diagnostic.icefront(:,3));508 md2.diagnostic.icefront(:,4)=Pnode(md1.diagnostic.icefront(:,4));509 end510 md2.diagnostic.icefront=md2.diagnostic.icefront(find(md2.diagnostic.icefront(:,1) & md2.diagnostic.icefront(:,2) & md2.diagnostic.icefront(:,end)),:);511 end512 513 505 %Results fields 514 506 if isstruct(md1.results), … … 732 724 md.diagnostic.referential=project3d(md,'vector',md.diagnostic.referential,'type','node'); 733 725 md.diagnostic.loadingforce=project3d(md,'vector',md.diagnostic.loadingforce,'type','node'); 734 735 %in 3d, pressureload: [node1 node2 node3 node4 element]736 pressureload_layer1=[md.diagnostic.icefront(:,1:2) md.diagnostic.icefront(:,2)+md.mesh.numberofvertices2d md.diagnostic.icefront(:,1)+md.mesh.numberofvertices2d md.diagnostic.icefront(:,3:4)]; %Add two columns on the first layer737 pressureload=[];738 for i=1:numlayers-1,739 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d pressureload_layer1(:,6)];740 end741 md.diagnostic.icefront=pressureload;742 726 743 727 %connectivity … … 1099 1083 md.cluster = generic(); 1100 1084 md.balancethickness = balancethickness(); 1101 md.diagnostic = diagnostic();1085 md.diagnostic = stressbalance(); 1102 1086 md.hydrology = hydrologyshreve(); 1103 1087 md.prognostic = prognostic(); -
issm/trunk-jpl/src/m/classes/model/model.py
r15603 r15614 72 72 73 73 self.balancethickness = balancethickness() 74 self.diagnostic = diagnostic()74 self.diagnostic = stressbalance() 75 75 self.groundingline = groundingline() 76 76 self.hydrology = hydrologyshreve() … … 392 392 md2.thermal.spctemperature[nodestoflag2,0]=1 393 393 394 #Diagnostic395 if numpy.any(numpy.logical_not(numpy.isnan(md2.diagnostic.icefront))):396 md2.diagnostic.icefront[:,0]=Pnode[md1.diagnostic.icefront[:,0].astype(int)-1]397 md2.diagnostic.icefront[:,1]=Pnode[md1.diagnostic.icefront[:,1].astype(int)-1]398 md2.diagnostic.icefront[:,-2]=Pelem[md1.diagnostic.icefront[:,-2].astype(int)-1]399 if md1.mesh.dimension==3:400 md2.diagnostic.icefront[:,2]=Pnode[md1.diagnostic.icefront[:,2].astype(int)-1]401 md2.diagnostic.icefront[:,3]=Pnode[md1.diagnostic.icefront[:,3].astype(int)-1]402 md2.diagnostic.icefront=md2.diagnostic.icefront[numpy.nonzero(logical_and_n(md2.diagnostic.icefront[:,0],md2.diagnostic.icefront[:,1],md2.diagnostic.icefront[:,-1]))[0],:]403 404 394 #Results fields 405 395 if md1.results: … … 627 617 md.diagnostic.loadingforce=project3d(md,'vector',md.diagnostic.loadingforce,'type','node') 628 618 629 #in 3d, pressureload: [node1 node2 node3 node4 element]630 pressureload_layer1=numpy.hstack((md.diagnostic.icefront[:,0:2],md.diagnostic.icefront[:,1:2]+md.mesh.numberofvertices2d,md.diagnostic.icefront[:,0:1]+md.mesh.numberofvertices2d,md.diagnostic.icefront[:,2:4])) #Add two columns on the first layer631 pressureload=numpy.empty((0,6),int)632 for i in xrange(numlayers-1):633 pressureload=numpy.vstack((pressureload,numpy.hstack((pressureload_layer1[:,0:4]+i*md.mesh.numberofvertices2d,pressureload_layer1[:,4:5]+i*md.mesh.numberofelements2d,pressureload_layer1[:,5:6]))))634 md.diagnostic.icefront=pressureload635 636 619 #connectivity 637 620 md.mesh.elementconnectivity=numpy.tile(md.mesh.elementconnectivity,(numlayers-1,1)) -
issm/trunk-jpl/src/m/classes/stressbalance.py
r15612 r15614 7 7 from WriteData import * 8 8 9 class diagnostic(object):9 class stressbalance(object): 10 10 """ 11 DIAGNOSTICclass definition11 STRESSBALANCE class definition 12 12 13 13 Usage: 14 diagnostic=diagnostic();14 stressbalance=stressbalance(); 15 15 """ 16 16 … … 42 42 def __repr__(self): # {{{ 43 43 44 string=' Diagnosticsolution parameters:'44 string=' StressBalance solution parameters:' 45 45 string="%s\n%s"%(string,' Convergence criteria:') 46 46 string="%s\n%s"%(string,fielddisplay(self,'restol','mechanical equilibrium residual convergence criterion')) … … 90 90 91 91 #coefficient to update the viscosity between each iteration of 92 #a diagnosticaccording to the following formula92 #a stressbalance according to the following formula 93 93 #viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1)) 94 94 self.viscosity_overshoot=0 … … 109 109 if DiagnosticHorizAnalysisEnum() not in analyses: 110 110 return md 111 #if (DiagnosticHorizAnalysisEnum() not in analyses) | (solution==TransientSolutionEnum() and not md.transient.isdiagnostic):112 # return md113 111 114 112 md = checkfield(md,'diagnostic.spcvx','forcing',1) … … 161 159 # }}} 162 160 def marshall(self,md,fid): # {{{ 163 WriteData(fid,'object',self,'fieldname','spcvx','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 164 WriteData(fid,'object',self,'fieldname','spcvy','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 165 WriteData(fid,'object',self,'fieldname','spcvz','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 166 WriteData(fid,'object',self,'fieldname','restol','format','Double') 167 WriteData(fid,'object',self,'fieldname','reltol','format','Double') 168 WriteData(fid,'object',self,'fieldname','abstol','format','Double') 169 WriteData(fid,'object',self,'fieldname','isnewton','format','Integer') 170 WriteData(fid,'object',self,'fieldname','FSreconditioning','format','Double') 171 WriteData(fid,'object',self,'fieldname','viscosity_overshoot','format','Double') 172 WriteData(fid,'object',self,'fieldname','maxiter','format','Integer') 173 WriteData(fid,'object',self,'fieldname','shelf_dampening','format','Integer') 174 WriteData(fid,'object',self,'fieldname','vertex_pairing','format','DoubleMat','mattype',3) 175 WriteData(fid,'object',self,'fieldname','penalty_factor','format','Double') 176 WriteData(fid,'object',self,'fieldname','rift_penalty_lock','format','Integer') 177 WriteData(fid,'object',self,'fieldname','rift_penalty_threshold','format','Integer') 178 WriteData(fid,'object',self,'fieldname','referential','format','DoubleMat','mattype',1) 161 WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvx','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 162 WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvy','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 163 WriteData(fid,'object',self,'class','diagnostic','fieldname','spcvz','format','DoubleMat','mattype',1,'forcinglength',md.mesh.numberofvertices+1) 164 WriteData(fid,'object',self,'class','diagnostic','fieldname','restol','format','Double') 165 WriteData(fid,'object',self,'class','diagnostic','fieldname','reltol','format','Double') 166 WriteData(fid,'object',self,'class','diagnostic','fieldname','abstol','format','Double') 167 WriteData(fid,'object',self,'class','diagnostic','fieldname','isnewton','format','Integer') 168 WriteData(fid,'object',self,'class','diagnostic','fieldname','FSreconditioning','format','Double') 169 WriteData(fid,'object',self,'class','diagnostic','fieldname','viscosity_overshoot','format','Double') 170 WriteData(fid,'object',self,'class','diagnostic','fieldname','maxiter','format','Integer') 171 WriteData(fid,'object',self,'class','diagnostic','fieldname','shelf_dampening','format','Integer') 172 WriteData(fid,'object',self,'class','diagnostic','fieldname','vertex_pairing','format','DoubleMat','mattype',3) 173 WriteData(fid,'object',self,'class','diagnostic','fieldname','penalty_factor','format','Double') 174 WriteData(fid,'object',self,'class','diagnostic','fieldname','rift_penalty_lock','format','Integer') 175 WriteData(fid,'object',self,'class','diagnostic','fieldname','rift_penalty_threshold','format','Integer') 176 WriteData(fid,'object',self,'class','diagnostic','fieldname','referential','format','DoubleMat','mattype',1) 177 WriteData(fid,'object',self,'class','diagnostic','fieldname','requested_outputs','format','DoubleMat','mattype',3) 179 178 WriteData(fid,'data',self.loadingforce[:,0],'format','DoubleMat','mattype',1,'enum',LoadingforceXEnum()) 180 179 WriteData(fid,'data',self.loadingforce[:,1],'format','DoubleMat','mattype',1,'enum',LoadingforceYEnum()) 181 180 WriteData(fid,'data',self.loadingforce[:,2],'format','DoubleMat','mattype',1,'enum',LoadingforceZEnum()) 182 WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3)183 184 #marshall ice front185 data=copy.deepcopy(self.icefront)186 data[numpy.nonzero(data[:,-1]==0),-1]=AirEnum()187 data[numpy.nonzero(data[:,-1]==1),-1]=WaterEnum()188 data[numpy.nonzero(data[:,-1]==2),-1]=IceEnum()189 WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum(),'format','DoubleMat','mattype',3)190 181 # }}} -
issm/trunk-jpl/src/m/consistency/checkfield.m
r12960 r15614 23 23 % Example: 24 24 % md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]); 25 % md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);26 % md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);27 25 28 26 %get options -
issm/trunk-jpl/src/m/consistency/checkfield.py
r13984 r15614 29 29 Example: 30 30 md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]); 31 md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);32 md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);33 31 """ 34 32 -
issm/trunk-jpl/test/NightlyRun/test201.m
r15565 r15614 5 5 md.cluster=generic('name',oshostname(),'np',3); 6 6 md.verbose=verbose('all'); 7 md.mask.icelevelset(find(md.mask.icelevelset==0))=-1; 8 7 9 md=solve(md,DiagnosticSolutionEnum()); 8 10 -
issm/trunk-jpl/test/NightlyRun/test217.m
r15565 r15614 54 54 nodeonicefront=zeros(md.mesh.numberofvertices,1); 55 55 pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1; 56 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:); 57 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))]; 58 md.diagnostic.icefront=diagnostic.icefront; 56 md.mask.icelevelset=1-nodeonicefront; 59 57 60 58 md=solve(md,DiagnosticSolutionEnum()); -
issm/trunk-jpl/test/NightlyRun/test217.py
r15565 r15614 66 66 pos=numpy.nonzero(md.mesh.y==ymax) 67 67 nodeonicefront[pos]=1 68 pos=numpy.nonzero(numpy.logical_or(nodeonicefront[md.mesh.segments[:,0].astype(int)-1],nodeonicefront[md.mesh.segments[:,1].astype(int)-1]))[0] 69 diagnostic.icefront=md.mesh.segments[pos,:] 70 diagnostic.icefront=numpy.hstack((diagnostic.icefront,1.*md.mask.elementonfloatingice[diagnostic.icefront[:,-1].astype(int)-1].reshape(-1,1))) 71 md.diagnostic.icefront=diagnostic.icefront 68 md.mask.icelevelset=1-nodeonicefront 72 69 73 70 md=solve(md,DiagnosticSolutionEnum()) -
issm/trunk-jpl/test/Par/Pig.par
r15552 r15614 47 47 %Boundary conditions: 48 48 md=SetMarineIceSheetBC(md); 49 md.diagnostic.icefront(:,end)=1;50 49 51 50 %Change name so that no test have the same name -
issm/trunk-jpl/test/Par/Pig.py
r15555 r15614 58 58 #Boundary conditions: 59 59 md=SetMarineIceSheetBC(md) 60 md.diagnostic.icefront[:,-1]=161 60 62 61 #Change name so that no test have the same name -
issm/trunk-jpl/test/Par/RoundSheetShelf.par
r15610 r15614 101 101 md.diagnostic.spcvy(pos)=0; 102 102 103 pressureload=md.mesh.segments;104 pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end)) + 0*md.mask.elementongroundedice(pressureload(:,end))];105 md.diagnostic.icefront=pressureload;106 103 md.mask.icelevelset(find(md.mesh.vertexonboundary))=0; 107 104 md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1); -
issm/trunk-jpl/test/Par/RoundSheetShelf.py
r15610 r15614 110 110 md.diagnostic.spcvy[pos]=0 111 111 112 pressureload=copy.deepcopy(md.mesh.segments)113 pressureload=numpy.hstack((pressureload,(1*md.mask.elementonfloatingice[pressureload[:,-1].astype(int)-1] + 0*md.mask.elementongroundedice[pressureload[:,-1].astype(int)-1]).reshape(-1,1)))114 md.diagnostic.icefront=pressureload115 112 pos=numpy.nonzero(md.mesh.vertexonboundary) 116 113 md.mask.icelevelset[pos]=0
Note:
See TracChangeset
for help on using the changeset viewer.