Changeset 24262
- Timestamp:
- 10/21/19 05:13:35 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/bamg.py
r24261 r24262 250 250 251 251 #rift is crossing edge [i1 i2] of the domain 252 #Get coordinate of intersection point (http: / / mathworld.wolfram.com /Line-LineIntersection.html)252 #Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html) 253 253 x3 = domain[0]['x'][i1] 254 254 y3 = domain[0]['y'][i1] … … 510 510 if SegIntersect(np.array([[x1, y1], [x2, y2]]), np.array([[x3, y3], [x4, y4]])): 511 511 512 #Get coordinate of intersection point (http: / / mathworld.wolfram.com /Line-LineIntersection.html)512 #Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html) 513 513 x = np.linalg.det(np.array([np.linalg.det(np.array([[x1, y1], [x2, y2]])), x1 - x2], [np.linalg.det(np.array([[x3, y3], [x4, y4]])), x3 - x4]) / np.linalg.det(np.array([[x1 - x2, y1 - y2], [x3 - x4, y3 - y4]]))) 514 514 y = np.linalg.det(np.array([np.linalg.det(np.array([[x1, y1], [x2, y2]])), y1 - y2], [np.linalg.det(np.array([[x3, y3], [x4, y4]])), y3 - y4]) / np.linalg.det(np.array([[x1 - x2, y1 - y2], [x3 - x4, y3 - y4]]))) -
issm/trunk-jpl/src/m/plot/plotdoc.py
r24213 r24262 141 141 # 'qmudata': " ", 142 142 # 'figposition': " position of figure: 'fullscreen', 'halfright', 'halfleft', 'portrait', 'landscape', ... (hardcoded in applyoptions.m)", 143 # 'offsetaxispos': " offset of current axis position to get more space (ex: [ - 143 # 'offsetaxispos': " offset of current axis position to get more space (ex: [ -0.02 0 0.04 0])", 144 144 # 'axispos': " axis position to get more space", 145 145 # 'hmin': " (numeric, minimum for histogram)", -
issm/trunk-jpl/test/NightlyRun/test1501.py
r24256 r24262 32 32 for i in range(1, 11): 33 33 md = solve(md, 'Masstransport') 34 md.smb.mass_balance = md.smb.mass_balance - ( (md.results.MasstransportSolution.Thickness) - md.geometry.thickness)34 md.smb.mass_balance = md.smb.mass_balance - (np.squeeze(md.results.MasstransportSolution.Thickness) - md.geometry.thickness) 35 35 36 36 #Set up transient … … 38 38 39 39 #tooth= [ [ones(400, 1) * (smb') - 10.]' [ones(400, 1) * (smb')]' ] 40 tooth = np. hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))40 tooth = np.vstack((np.tile(smb - 10., (400, 1)), np.tile(smb, (400, 1)))) 41 41 #smb = [ [ones(399, 1) * (smb')]' smb tooth tooth] 42 smb = np. hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))42 smb = np.vstack((np.tile(smb, (399, 1)), smb, tooth, tooth)).T 43 43 44 44 #md.smb.mass_balance= smb … … 102 102 if printingflag: 103 103 pass 104 105 104 """ 106 105 starttime = 360 … … 136 135 137 136 subplot(5, 9, [28:31 37:40]) 138 set(gca, 'pos', get(gca, 'pos') + [ - 137 set(gca, 'pos', get(gca, 'pos') + [ -0.08 - 0.08 0.07 0.08]) 139 138 field = 'Thickness' 140 139 … … 151 150 152 151 subplot(5, 9, [33:36 42:45]) 153 set(gca, 'pos', get(gca, 'pos') + [ - 152 set(gca, 'pos', get(gca, 'pos') + [ -0.00 - 0.08 0.07 0.08]) 154 153 field = 'Vel' 155 154 … … 167 166 subplot(5, 4, 1:4) 168 167 cla 169 set(gca, 'pos', get(gca, 'pos') + [ - 168 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.03 0.12 0.015]) 170 169 plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4) 171 170 hold on … … 178 177 subplot(5, 4, 5:8) 179 178 cla 180 set(gca, 'pos', get(gca, 'pos') + [ - 179 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.015 0.12 0.015]) 181 180 plot(starttime:endtime, sum(volume) / 1000 / 1000 / 1000, 'LineWidth', 4) 182 181 hold on … … 189 188 subplot(5, 4, 9:12) 190 189 cla 191 set(gca, 'pos', get(gca, 'pos') + [ - 190 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0 0.12 0.015]) 192 191 plot(starttime:endtime, mean(velocity) / 1000, 'LineWidth', 4) 193 192 hold on -
issm/trunk-jpl/test/NightlyRun/test1502.py
r24256 r24262 12 12 printingflag = False 13 13 14 md = triangle(model(), '../Exp/Square.exp', 450000.)14 md = triangle(model(), '../Exp/Square.exp', 350000.) 15 15 md = setmask(md, 'all', '') 16 16 md = parameterize(md, '../Par/SquareShelf.py') … … 33 33 for i in range(1, 11): 34 34 md = solve(md, 'Masstransport') 35 md.smb.mass_balance = md.smb.mass_balance - ( (md.results.MasstransportSolution.Thickness) - md.geometry.thickness)35 md.smb.mass_balance = md.smb.mass_balance - (np.squeeze(md.results.MasstransportSolution.Thickness) - md.geometry.thickness) 36 36 37 37 #Set up transient … … 39 39 40 40 #tooth= [ [ones(400, 1) * (smb') - 10.]' [ones(400, 1) * (smb')]' ] 41 tooth = np. hstack((np.tile(smb - 10., (1, 400)), np.tile(smb, (1, 400))))41 tooth = np.vstack((np.tile(smb - 10., (400, 1)), np.tile(smb, (400, 1)))) 42 42 #smb = [ [ones(399, 1) * (smb')]' smb tooth tooth] 43 smb = np. hstack((np.tile(smb, (1, 399)), smb, tooth, tooth))43 smb = np.vstack((np.tile(smb, (399, 1)), smb, tooth, tooth)).T 44 44 45 45 #md.smb.mass_balance= smb … … 143 143 144 144 subplot(5, 9, [28:31 37:40]) 145 set(gca, 'pos', get(gca, 'pos') + [ - 145 set(gca, 'pos', get(gca, 'pos') + [ -0.08 - 0.08 0.07 0.08]) 146 146 field = 'Thickness' 147 147 … … 158 158 159 159 subplot(5, 9, [33:36 42:45]) 160 set(gca, 'pos', get(gca, 'pos') + [ - 160 set(gca, 'pos', get(gca, 'pos') + [ -0.01 - 0.08 0.07 0.08]) 161 161 field = 'Vel' 162 162 … … 174 174 subplot(5, 4, 1:4) 175 175 cla 176 set(gca, 'pos', get(gca, 'pos') + [ - 176 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.03 0.12 0.015]) 177 177 plot(starttime:endtime, mean(massbal), 'k', 'LineWidth', 4) 178 178 hold on … … 185 185 subplot(5, 4, 5:8) 186 186 cla 187 set(gca, 'pos', get(gca, 'pos') + [ - 187 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0.015 0.12 0.015]) 188 188 plot(starttime:endtime, sum(volume) / 1000 / 1000 / 1000, 'LineWidth', 4) 189 189 hold on … … 196 196 subplot(5, 4, 9:12) 197 197 cla 198 set(gca, 'pos', get(gca, 'pos') + [ - 198 set(gca, 'pos', get(gca, 'pos') + [ -0.07 0 0.12 0.015]) 199 199 plot(starttime:endtime, mean(velocity) / 1000, 'LineWidth', 4) 200 200 hold on
Note:
See TracChangeset
for help on using the changeset viewer.