source: issm/oecreview/Archive/23390-24306/ISSM-24249-24250.diff@ 24307

Last change on this file since 24307 was 24307, checked in by Mathieu Morlighem, 5 years ago

NEW: adding Archive/23390-24306

File size: 3.5 KB
RevLine 
[24307]1Index: ../trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py
2===================================================================
3--- ../trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py (revision 24249)
4+++ ../trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py (revision 24250)
5@@ -7,9 +7,9 @@
6
7
8 def gmshplanet(* varargin):
9- #GMSHPLANET - mesh generation for a sphere. Very specific code for gmsh. From demo / sphere.geo
10+ #GMSHPLANET - mesh generation for a sphere. Very specific code for gmsh. From demo/sphere.geo
11 #
12- # Available options (for more details see ISSM website http: / / issm.jpl.nasa.gov / ):
13+ # Available options (for more details see ISSM website http://issm.jpl.nasa.gov/):
14 #
15 # - radius: radius of the planet in km
16 # - resolution: resolution in km
17@@ -48,12 +48,12 @@
18 fid.write('Point(2) = {radius, 0.0, 0.0, resolution};\n')
19 fid.write('Point(3) = {0, radius, 0.0, resolution};\n')
20 fid.write('Circle(1) = {2, 1, 3};\n')
21- fid.write('Point(4) = { - radius, 0, 0.0, resolution};\n')
22- fid.write('Point(5) = {0, - radius, 0.0, resolution};\n')
23+ fid.write('Point(4) = { -radius, 0, 0.0, resolution};\n')
24+ fid.write('Point(5) = {0, -radius, 0.0, resolution};\n')
25 fid.write('Circle(2) = {3, 1, 4};\n')
26 fid.write('Circle(3) = {4, 1, 5};\n')
27 fid.write('Circle(4) = {5, 1, 2};\n')
28- fid.write('Point(6) = {0, 0, - radius, resolution};\n')
29+ fid.write('Point(6) = {0, 0, -radius, resolution};\n')
30 fid.write('Point(7) = {0, 0, radius, resolution};\n')
31 fid.write('Circle(5) = {3, 1, 6};\n')
32 fid.write('Circle(6) = {6, 1, 5};\n')
33@@ -63,21 +63,21 @@
34 fid.write('Circle(10) = {7, 1, 4};\n')
35 fid.write('Circle(11) = {4, 1, 6};\n')
36 fid.write('Circle(12) = {6, 1, 2};\n')
37- fid.write('Line Loop(13) = {2, 8, - 10};\n')
38+ fid.write('Line Loop(13) = {2, 8, -10};\n')
39 fid.write('Surface(14) = {13};\n')
40 fid.write('Line Loop(15) = {10, 3, 7};\n')
41 fid.write('Surface(16) = {15};\n')
42- fid.write('Line Loop(17) = { - 8, - 9, 1};\n')
43+ fid.write('Line Loop(17) = { -8, -9, 1};\n')
44 fid.write('Surface(18) = {17};\n')
45- fid.write('Line Loop(19) = { - 11, - 2, 5};\n')
46+ fid.write('Line Loop(19) = { -11, -2, 5};\n')
47 fid.write('Surface(20) = {19};\n')
48- fid.write('Line Loop(21) = { - 5, - 12, - 1};\n')
49+ fid.write('Line Loop(21) = { -5, -12, -1};\n')
50 fid.write('Surface(22) = {21};\n')
51- fid.write('Line Loop(23) = { - 3, 11, 6};\n')
52+ fid.write('Line Loop(23) = { -3, 11, 6};\n')
53 fid.write('Surface(24) = {23};\n')
54- fid.write('Line Loop(25) = { - 7, 4, 9};\n')
55+ fid.write('Line Loop(25) = { -7, 4, 9};\n')
56 fid.write('Surface(26) = {25};\n')
57- fid.write('Line Loop(27) = { - 4, 12, - 6};\n')
58+ fid.write('Line Loop(27) = { -4, 12, -6};\n')
59 fid.write('Surface(28) = {27};\n')
60 fid.write('Surface Loop(29) = {28, 26, 16, 14, 20, 24, 22, 18};\n')
61 fid.write('Volume(30) = {29};\n')
62@@ -106,10 +106,10 @@
63
64 #call gmsh
65 if options.exist('refine'):
66- subprocess.call('gmsh - tol 1e-8 - 2 sphere.geo - bgm sphere.pos', shell=True)
67+ subprocess.call('gmsh -tol 1e-8 -2 sphere.geo -bgm sphere.pos', shell=True)
68 else:
69 #call gmsh
70- subprocess.call('gmsh - tol 1e-8 - 2 sphere.geo', shell=True)
71+ subprocess.call('gmsh -tol 1e-8 -2 sphere.geo', shell=True)
72
73 #import mesh: {{{
74 fid = open('sphere.msh', 'r')
Note: See TracBrowser for help on using the repository browser.