Changeset 25519
- Timestamp:
- 09/02/20 19:30:52 (5 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/flowequation.m
r25514 r25519 143 143 disp(sprintf(' flow equation parameters:')); 144 144 145 fielddisplay(self,'isSIA','is the Shallow Ice Approximation (SIA) used 146 fielddisplay(self,'isSSA','is the Shelfy-Stream Approximation (SSA) used 147 fielddisplay(self,'isL1L2','is the L1L2 approximation used 148 fielddisplay(self,'isHO','is the Higher-Order (HO) approximation used 149 fielddisplay(self,'isFS','are the Full-FS (FS) equations used 145 fielddisplay(self,'isSIA','is the Shallow Ice Approximation (SIA) used?'); 146 fielddisplay(self,'isSSA','is the Shelfy-Stream Approximation (SSA) used?'); 147 fielddisplay(self,'isL1L2','is the L1L2 approximation used?'); 148 fielddisplay(self,'isHO','is the Higher-Order (HO) approximation used?'); 149 fielddisplay(self,'isFS','are the Full-FS (FS) equations used?'); 150 150 fielddisplay(self,'isNitscheBC','is weakly imposed condition used?'); 151 fielddisplay(self,'FSNitscheGamma','Gamma value for the Nitsche term , by default gamma=1e6?');151 fielddisplay(self,'FSNitscheGamma','Gamma value for the Nitsche term (default: 1e6)'); 152 152 fielddisplay(self,'fe_SSA','Finite Element for SSA ''P1'', ''P1bubble'' ''P1bubblecondensed'' ''P2'''); 153 153 fielddisplay(self,'fe_HO', 'Finite Element for HO ''P1'' ''P1bubble'' ''P1bubblecondensed'' ''P1xP2'' ''P2xP1'' ''P2'''); -
issm/trunk-jpl/src/m/classes/flowequation.py
r24861 r25519 1 1 import numpy as np 2 3 from checkfield import checkfield 4 from fielddisplay import fielddisplay 5 import MatlabFuncs as m 2 6 from project3d import project3d 3 from fielddisplay import fielddisplay4 from checkfield import checkfield5 7 from WriteData import WriteData 6 import MatlabFuncs as m7 8 8 9 9 10 class flowequation(object): 10 """ 11 FLOWEQUATION class definition 11 """FLOWEQUATION class definition 12 12 13 14 13 Usage: 14 flowequation = flowequation() 15 15 """ 16 16 17 17 def __init__(self): # {{{ 18 19 18 self.isSIA = 0 20 19 self.isSSA = 0 … … 22 21 self.isHO = 0 23 22 self.isFS = 0 23 self.isNitscheBC = 0 24 self.FSNitscheGamma = 1e-6 24 25 self.fe_SSA = '' 25 26 self.fe_HO = '' … … 42 43 43 44 def __repr__(self): # {{{ 44 string = ' flow equation parameters:' 45 s = ' flow equation parameters:\n' 46 s += "{}\n".format(fielddisplay(self, 'isSIA', "is the Shallow Ice Approximation (SIA) used?")) 47 s += "{}\n".format(fielddisplay(self, 'isSSA', "is the Shelfy-Stream Approximation (SSA) used?")) 48 s += "{}\n".format(fielddisplay(self, 'isL1L2', "are L1L2 equations used?")) 49 s += "{}\n".format(fielddisplay(self, 'isHO', "is the Higher-Order (HO) approximation used?")) 50 s += "{}\n".format(fielddisplay(self, 'isFS', "are the Full-FS (FS) equations used?")) 51 s += "{}\n".format(fielddisplay(self, 'isNitscheBC', "is weakly imposed condition used?")) 52 s += "{}\n".format(fielddisplay(self, 'FSNitscheGamma', "Gamma value for the Nitsche term (default: 1e6)")) 53 s += "{}\n".format(fielddisplay(self, 'fe_SSA', "Finite Element for SSA: 'P1', 'P1bubble' 'P1bubblecondensed' 'P2'")) 54 s += "{}\n".format(fielddisplay(self, 'fe_HO', "Finite Element for HO: 'P1', 'P1bubble', 'P1bubblecondensed', 'P1xP2', 'P2xP1', 'P2', 'P2bubble', 'P1xP3', 'P2xP4'")) 55 s += "{}\n".format(fielddisplay(self, 'fe_FS', "Finite Element for FS: 'P1P1' (debugging only) 'P1P1GLS' 'MINIcondensed' 'MINI' 'TaylorHood' 'LATaylorHood' 'XTaylorHood'")) 56 s += "{}\n".format(fielddisplay(self, 'vertex_equation', "flow equation for each vertex")) 57 s += "{}\n".format(fielddisplay(self, 'element_equation', "flow equation for each element")) 58 s += "{}\n".format(fielddisplay(self, 'borderSSA', "vertices on SSA's border (for tiling)")) 59 s += "{}\n".format(fielddisplay(self, 'borderHO', "vertices on HO's border (for tiling)")) 60 s += "{}".format(fielddisplay(self, 'borderFS', "vertices on FS' border (for tiling)")) 45 61 46 string = "%s\n%s" % (string, fielddisplay(self, 'isSIA', "is the Shallow Ice Approximation (SIA) used ?")) 47 string = "%s\n%s" % (string, fielddisplay(self, 'isSSA', "is the Shelfy - Stream Approximation (SSA) used ?")) 48 string = "%s\n%s" % (string, fielddisplay(self, 'isL1L2', "are L1L2 equations used ?")) 49 string = "%s\n%s" % (string, fielddisplay(self, 'isHO', "is the Higher - Order (HO) approximation used ?")) 50 string = "%s\n%s" % (string, fielddisplay(self, 'isFS', "are the Full - FS (FS) equations used ?")) 51 string = "%s\n%s" % (string, fielddisplay(self, 'fe_SSA', "Finite Element for SSA: 'P1', 'P1bubble' 'P1bubblecondensed' 'P2'")) 52 string = "%s\n%s" % (string, fielddisplay(self, 'fe_HO', "Finite Element for HO: 'P1', 'P1bubble', 'P1bubblecondensed', 'P1xP2', 'P2xP1', 'P2', 'P2bubble', 'P1xP3', 'P2xP4'")) 53 string = "%s\n%s" % (string, fielddisplay(self, 'fe_FS', "Finite Element for FS: 'P1P1' (debugging only) 'P1P1GLS' 'MINIcondensed' 'MINI' 'TaylorHood' 'LATaylorHood' 'XTaylorHood'")) 54 string = "%s\n%s" % (string, fielddisplay(self, 'vertex_equation', "flow equation for each vertex")) 55 string = "%s\n%s" % (string, fielddisplay(self, 'element_equation', "flow equation for each element")) 56 string = "%s\n%s" % (string, fielddisplay(self, 'borderSSA', "vertices on SSA's border (for tiling)")) 57 string = "%s\n%s" % (string, fielddisplay(self, 'borderHO', "vertices on HO's border (for tiling)")) 58 string = "%s\n%s" % (string, fielddisplay(self, 'borderFS', "vertices on FS' border (for tiling)")) 59 return string 62 return s 60 63 #}}} 61 64 … … 93 96 md = checkfield(md, 'fieldname', 'flowequation.isHO', 'numel', [1], 'values', [0, 1]) 94 97 md = checkfield(md, 'fieldname', 'flowequation.isFS', 'numel', [1], 'values', [0, 1]) 98 md = checkfield(md, 'fieldname', 'flowequation.isNitscheBC', 'numel', [1], 'values', [0, 1]) 99 md = checkfield(md, 'fieldname', 'flowequation.FSNitscheGamma', 'numel', [1], '>=', 0.) 95 100 md = checkfield(md, 'fieldname', 'flowequation.fe_SSA', 'values', ['P1', 'P1bubble', 'P1bubblecondensed', 'P2', 'P2bubble']) 96 101 md = checkfield(md, 'fieldname', 'flowequation.fe_HO', 'values', ['P1', 'P1bubble', 'P1bubblecondensed', 'P1xP2', 'P2xP1', 'P2', 'P2bubble', 'P1xP3', 'P2xP4']) … … 132 137 WriteData(fid, prefix, 'object', self, 'fieldname', 'isHO', 'format', 'Boolean') 133 138 WriteData(fid, prefix, 'object', self, 'fieldname', 'isFS', 'format', 'Boolean') 134 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_SSA', 'data', self.fe_SSA, 'format', 'String') 135 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_HO', 'data', self.fe_HO, 'format', 'String') 136 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_FS', 'data', self.fe_FS, 'format', 'String') 139 WriteData(fid, prefix, 'object', self, 'fieldname', 'isNitscheBC', 'format', 'Boolean') 140 WriteData(fid, prefix, 'object', self, 'fieldname', 'FSNitscheGamma', 'format', 'Double') 141 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_SSA', 'data', self.fe_SSA, 'format', 's') 142 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_HO', 'data', self.fe_HO, 'format', 's') 143 WriteData(fid, prefix, 'object', self, 'fieldname', 'fe_FS', 'data', self.fe_FS, 'format', 's') 137 144 WriteData(fid, prefix, 'object', self, 'fieldname', 'augmented_lagrangian_r', 'format', 'Double') 138 145 WriteData(fid, prefix, 'object', self, 'fieldname', 'augmented_lagrangian_rhop', 'format', 'Double')
Note:
See TracChangeset
for help on using the changeset viewer.