Skip to content

Commit 36d9334

Browse files
committed
Initial bindings for jigsaw-0.9.12.xx
- Lint: trailing line breaks.
1 parent 46d8d65 commit 36d9334

36 files changed

Lines changed: 51 additions & 150 deletions

example.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,3 @@ def example(IDnumber=0):
6666
args = parser.parse_args()
6767

6868
example(IDnumber=args.IDnumber)
69-
70-
71-

jigsawpy/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,3 @@ def tripod(opts, init, tria, geom=None):
127127
def marche(opts, ffun):
128128

129129
return libsaw.marche(opts, ffun)
130-
131-
132-

jigsawpy/bisect.py

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def bisect(mesh):
6060
quad = np.empty((0, 4), dtype=np.int32)
6161
qmap = mapper()
6262
hexa = np.empty((0, 8), dtype=np.int32)
63-
hmap = mapper()
63+
# hmap = mapper()
6464

6565
if (mesh.edge2 is not None and
6666
mesh.edge2.size != +0):
@@ -73,10 +73,12 @@ def bisect(mesh):
7373
edge = np.concatenate(
7474
(edge, cell[:, (0, 1)]), axis=0)
7575

76+
indx = np.arange(0, ncel)
77+
7678
emap.edge2.index = \
7779
np.empty((ncel, 1), dtype=np.int32)
7880
emap.edge2.index[:, 0] = \
79-
np.arange(0, ncel) + ncel*0 + nedg
81+
indx + ncel * 0 + nedg
8082

8183
if (mesh.tria3 is not None and
8284
mesh.tria3.size != +0):
@@ -93,14 +95,16 @@ def bisect(mesh):
9395
edge = np.concatenate(
9496
(edge, cell[:, (2, 0)]), axis=0)
9597

98+
indx = np.arange(0, ncel)
99+
96100
emap.tria3.index = \
97101
np.empty((ncel, 3), dtype=np.int32)
98102
emap.tria3.index[:, 0] = \
99-
np.arange(0, ncel) + ncel*0 + nedg
103+
indx + ncel * 0 + nedg
100104
emap.tria3.index[:, 1] = \
101-
np.arange(0, ncel) + ncel*1 + nedg
105+
indx + ncel * 1 + nedg
102106
emap.tria3.index[:, 2] = \
103-
np.arange(0, ncel) + ncel*2 + nedg
107+
indx + ncel * 2 + nedg
104108

105109
if (mesh.quad4 is not None and
106110
mesh.quad4.size != +0):
@@ -123,21 +127,23 @@ def bisect(mesh):
123127
edge = np.concatenate(
124128
(edge, cell[:, (3, 0)]), axis=0)
125129

130+
indx = np.arange(0, ncel)
131+
126132
qmap.quad4.index = \
127133
np.empty((ncel, 1), dtype=np.int32)
128134
qmap.quad4.index[:, 0] = \
129-
np.arange(0, ncel) + ncel*0 + nfac
135+
indx + ncel * 0 + nfac
130136

131137
emap.quad4.index = \
132138
np.empty((ncel, 4), dtype=np.int32)
133139
emap.quad4.index[:, 0] = \
134-
np.arange(0, ncel) + ncel*0 + nedg
140+
indx + ncel * 0 + nedg
135141
emap.quad4.index[:, 1] = \
136-
np.arange(0, ncel) + ncel*1 + nedg
142+
indx + ncel * 1 + nedg
137143
emap.quad4.index[:, 2] = \
138-
np.arange(0, ncel) + ncel*2 + nedg
144+
indx + ncel * 2 + nedg
139145
emap.quad4.index[:, 3] = \
140-
np.arange(0, ncel) + ncel*3 + nedg
146+
indx + ncel * 3 + nedg
141147

142148
if (mesh.tria4 is not None and
143149
mesh.tria4.size != +0):
@@ -160,20 +166,22 @@ def bisect(mesh):
160166
edge = np.concatenate(
161167
(edge, cell[:, (2, 3)]), axis=0)
162168

169+
indx = np.arange(0, ncel)
170+
163171
emap.tria4.index = \
164172
np.empty((ncel, 6), dtype=np.int32)
165173
emap.tria4.index[:, 0] = \
166-
np.arange(0, ncel) + ncel*0 + nedg
174+
indx + ncel * 0 + nedg
167175
emap.tria4.index[:, 1] = \
168-
np.arange(0, ncel) + ncel*1 + nedg
176+
indx + ncel * 1 + nedg
169177
emap.tria4.index[:, 2] = \
170-
np.arange(0, ncel) + ncel*2 + nedg
178+
indx + ncel * 2 + nedg
171179
emap.tria4.index[:, 3] = \
172-
np.arange(0, ncel) + ncel*3 + nedg
180+
indx + ncel * 3 + nedg
173181
emap.tria4.index[:, 4] = \
174-
np.arange(0, ncel) + ncel*4 + nedg
182+
indx + ncel * 4 + nedg
175183
emap.tria4.index[:, 5] = \
176-
np.arange(0, ncel) + ncel*5 + nedg
184+
indx + ncel * 5 + nedg
177185

178186
if (mesh.hexa8 is not None and
179187
mesh.hexa8.size != +0):
@@ -351,7 +359,7 @@ def bisect(mesh):
351359
nold = np.size(vert, 0)
352360
nnew = np.size(hmid, 0)
353361

354-
qnew = nold + np.arange(+0, nnew)
362+
hnew = nold + np.arange(+0, nnew)
355363

356364
vnew = np.empty(
357365
nnew, dtype=mesh.point.dtype)
@@ -741,23 +749,18 @@ def bisect(mesh):
741749
mesh.tria4 = np.concatenate(
742750
(tria1, tria2,
743751
tria3, tria4,
744-
# 1st subdiv. of octahedron
745-
triaA[index[:, 2] == 0],
752+
triaA[index[:, 2] == 0], # subdiv. 1
746753
triaB[index[:, 2] == 0],
747754
triaC[index[:, 2] == 0],
748755
triaD[index[:, 2] == 0],
749-
# 2nd subdiv. of octahedron
750-
triaE[index[:, 2] == 1],
756+
triaE[index[:, 2] == 1], # subdiv. 2
751757
triaF[index[:, 2] == 1],
752758
triaG[index[:, 2] == 1],
753759
triaH[index[:, 2] == 1],
754-
# 3rd subdiv. of octahedron
755-
triaI[index[:, 2] == 2],
760+
triaI[index[:, 2] == 2], # subdiv. 3
756761
triaJ[index[:, 2] == 2],
757762
triaK[index[:, 2] == 2],
758-
triaL[index[:, 2] == 2]), axis=0)
763+
triaL[index[:, 2] == 2]
764+
), axis=0)
759765

760766
return
761-
762-
763-

jigsawpy/certify.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,3 @@ def certify(mesh):
280280
raise Exception("Invalid MESH.MSHID tag.")
281281

282282
return
283-
284-
285-

jigsawpy/def_t.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,3 @@ class jigsaw_def_t:
4949

5050
JIGSAW_KERN_ODT_DQDX = +404
5151
JIGSAW_KERN_CVT_DQDX = +405
52-
53-
54-

jigsawpy/extrude.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22
def extrude(mesh):
33

44
return
5-
6-
7-

jigsawpy/jig_l.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,3 @@ class libsaw_jig_t(ct.Structure):
254254
# ations on sub-faces within the optimisation stages.
255255

256256
("optm_div_", indx_t)]
257-
258-
259-

jigsawpy/jig_t.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,3 @@ def __init__(self):
289289
self.optm_div_ = None
290290
self.optm_tria = None
291291
self.optm_dual = None
292-
293-
294-

jigsawpy/jigsaw.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,3 @@ def tetris(opts, nlev, mesh=None):
451451
savemsh(OPTS.init_file, mesh)
452452

453453
return
454-
455-
456-

jigsawpy/libsaw.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,3 @@ def marche(opts, ffun):
806806
"MARCHE returned code: " + str(retv))
807807

808808
return
809-
810-
811-

0 commit comments

Comments
 (0)