Changeset 23526
- Timestamp:
- 12/10/18 03:54:56 (6 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/flowequation.py ¶
r22267 r23526 16 16 17 17 def __init__(self): # {{{ 18 18 19 19 self.isSIA = 0 20 20 self.isSSA = 0 … … 49 49 string="%s\n%s"%(string,fielddisplay(self,'isFS',"are the Full-FS (FS) equations used ?")) 50 50 string="%s\n%s"%(string,fielddisplay(self,'fe_SSA',"Finite Element for SSA: 'P1', 'P1bubble' 'P1bubblecondensed' 'P2'")) 51 string="%s\n%s"%(string,fielddisplay(self,'fe_HO' ,"Finite Element for HO: 'P1' 'P1bubble' 'P1bubblecondensed' 'P1xP2' 'P2xP1' 'P2'"))51 string="%s\n%s"%(string,fielddisplay(self,'fe_HO' ,"Finite Element for HO: 'P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P2bubble','P1xP3','P2xP4'")) 52 52 string="%s\n%s"%(string,fielddisplay(self,'fe_FS' ,"Finite Element for FS: 'P1P1' (debugging only) 'P1P1GLS' 'MINIcondensed' 'MINI' 'TaylorHood' 'LATaylorHood' 'XTaylorHood'")) 53 53 string="%s\n%s"%(string,fielddisplay(self,'vertex_equation',"flow equation for each vertex")) -
TabularUnified issm/trunk-jpl/src/m/classes/friction.py ¶
r22875 r23526 29 29 string="%s\n%s"%(string,fielddisplay(self,"p","p exponent")) 30 30 string="%s\n%s"%(string,fielddisplay(self,"q","q exponent")) 31 31 string="%s\n%s"%(string,fielddisplay(self,'coupling','Coupling flag 0: uniform sheet (negative pressure ok, default), 1: ice pressure only, 2: water pressure assuming uniform sheet (no negative pressure), 3: use provided effective_pressure, 4: used coupled model (not implemented yet)')) 32 32 string="%s\n%s"%(string,fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]')) 33 33 return string -
TabularUnified issm/trunk-jpl/src/m/classes/frictionhydro.py ¶
r23422 r23526 26 26 def __repr__(self): # {{{ 27 27 string='Effective Pressure based friction law described in Gagliardini 2007' 28 string="%s\n%s"%(string,fielddisplay(self,'coupling','Coupling flag : 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)'))28 string="%s\n%s"%(string,fielddisplay(self,'coupling','Coupling flag 0: uniform sheet (negative pressure ok, default), 1: ice pressure only, 2: water pressure assuming uniform sheet (no negative pressure), 3: use provided effective_pressure, 4: used coupled model (not implemented yet)')) 29 29 string="%s\n%s"%(string,fielddisplay(self,'q','friction law exponent q>=1')) 30 30 string="%s\n%s"%(string,fielddisplay(self,'C','friction law max value (Iken bound)')) … … 39 39 self.C=project3d(md,'vector',self.C,'type','element') 40 40 self.As=project3d(md,'vector',self.As,'type','element') 41 if self.coupling ==1:41 if self.coupling in[3,4]: 42 42 self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1) 43 elif self.coupling==2: 44 raise ValueError('coupling not supported yet') 45 elif self.coupling > 2: 46 raise ValueError('md.friction.coupling larger than 2, not supported yet') 43 elif self.coupling > 4: 44 raise ValueError('md.friction.coupling larger than 4, not supported yet') 47 45 return self 48 46 # }}} … … 62 60 return md 63 61 64 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0,1,2 ])62 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0,1,2,3,4]) 65 63 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 66 64 md = checkfield(md,'fieldname','friction.C','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 67 65 md = checkfield(md,'fieldname','friction.As','NaN',1,'Inf',1,'size',[md.mesh.numberofelements]) 68 if self.coupling== 1:66 if self.coupling==3: 69 67 md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1) 70 elif self.coupling==2: 71 raise ValueError('coupling not supported yet') 72 elif self.coupling > 2: 73 raise ValueError('md.friction.coupling larger than 2, not supported yet') 68 elif self.coupling > 4: 69 raise ValueError('md.friction.coupling larger than 4, not supported yet') 74 70 # }}} 75 71 … … 80 76 WriteData(fid,prefix,'class','friction','object',self,'fieldname','C','format','DoubleMat','mattype',2) 81 77 WriteData(fid,prefix,'class','friction','object',self,'fieldname','As','format','DoubleMat','mattype',2) 82 if self.coupling ==1:78 if self.coupling in[3,4]: 83 79 WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) 84 elif self.coupling==2: 85 raise ValueError('coupling not supported yet') 86 elif self.coupling > 2: 87 raise ValueError('md.friction.coupling larger than 2, not supported yet') 80 elif self.coupling > 4: 81 raise ValueError('md.friction.coupling larger than 4, not supported yet') 88 82 #}}} -
TabularUnified issm/trunk-jpl/src/m/contrib/defleurian/paraview/enveloppeVTK.py ¶
r23365 r23526 124 124 125 125 #getting the fields in the solution 126 if( np.size(res_struct.__dict__[sol])>1):126 if(type(res_struct.__dict__[sol])==list): 127 127 fieldnames=dict.keys(res_struct.__dict__[sol].__getitem__(timestep).__dict__) 128 128 else: … … 130 130 #check which field is a real result and print 131 131 for field in fieldnames: 132 if( np.size(res_struct.__dict__[sol])>1):132 if(type(res_struct.__dict__[sol])==list): 133 133 fieldstruct=res_struct.__dict__[sol].__getitem__(timestep).__dict__[field] 134 134 else:
Note:
See TracChangeset
for help on using the changeset viewer.