Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
gmsh
Commits
f3191d09
Commit
f3191d09
authored
1 year ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix when numpy is not available
parent
f5468675
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#10968
passed
1 year ago
Stage: test
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/api/mirror_mesh.py
+4
-4
4 additions, 4 deletions
examples/api/mirror_mesh.py
with
4 additions
and
4 deletions
examples/api/mirror_mesh.py
+
4
−
4
View file @
f3191d09
...
...
@@ -29,7 +29,7 @@ def transform(m, offset_entity, offset_node, offset_element, tx, ty, tz):
for
e
in
sorted
(
m
):
gmsh
.
model
.
addDiscreteEntity
(
e
[
0
],
e
[
1
]
+
offset_entity
,
[(
abs
(
b
[
1
])
+
offset_entity
)
*
math
.
copysign
(
1
,
b
[
1
])
for
b
in
m
[
e
][
0
]])
[(
abs
(
b
[
1
])
+
offset_entity
)
*
int
(
math
.
copysign
(
1
,
b
[
1
])
)
for
b
in
m
[
e
][
0
]])
coord
=
[]
for
i
in
range
(
0
,
len
(
m
[
e
][
1
][
1
]),
3
):
x
=
m
[
e
][
1
][
1
][
i
]
*
tx
...
...
@@ -39,10 +39,10 @@ def transform(m, offset_entity, offset_node, offset_element, tx, ty, tz):
coord
.
append
(
y
)
coord
.
append
(
z
)
gmsh
.
model
.
mesh
.
addNodes
(
e
[
0
],
e
[
1
]
+
offset_entity
,
m
[
e
][
1
][
0
]
+
offset_node
,
coord
)
[
n
+
offset_node
for
n
in
m
[
e
][
1
][
0
]]
,
coord
)
gmsh
.
model
.
mesh
.
addElements
(
e
[
0
],
e
[
1
]
+
offset_entity
,
m
[
e
][
2
][
0
],
[
t
+
offset_element
for
t
in
m
[
e
][
2
][
1
]],
[
n
+
offset_node
for
n
in
m
[
e
][
2
][
2
]])
[
[
t
+
offset_element
for
t
in
typ
]
for
typ
in
m
[
e
][
2
][
1
]],
[
[
n
+
offset_node
for
n
in
typ
]
for
typ
in
m
[
e
][
2
][
2
]])
if
(
tx
*
ty
*
tz
)
<
0
:
# reverse the orientation
gmsh
.
model
.
mesh
.
reverse
([(
e
[
0
],
e
[
1
]
+
offset_entity
)])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment