Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fluidparticles
MigFlow
Commits
7e8c253a
Commit
7e8c253a
authored
Sep 02, 2021
by
Michel Henry
Browse files
np.bool deprecated -> bool
parent
f1f22f92
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/fluid.py
View file @
7e8c253a
...
...
@@ -107,18 +107,18 @@ def _load_msh(mesh_file_name, lib, dim) :
cbname
=
(
c_char_p
*
len
(
bname
))(
*
(
i
.
encode
()
for
i
in
bname
))
# remove nodes and boundaries not connected to elements
keepnodes
=
np
.
full
(
x
.
shape
[
0
],
False
,
np
.
bool
)
keepnodes
=
np
.
full
(
x
.
shape
[
0
],
False
,
bool
)
keepnodes
[
el
]
=
True
newidx
=
np
.
cumsum
(
keepnodes
)
-
1
el
=
newidx
[
el
]
x
=
x
[
keepnodes
,:]
periodic_nodes
=
newidx
[
periodic_nodes
]
keepbnd
=
np
.
full
(
bnd
.
shape
[
0
],
True
,
np
.
bool
)
keepbnd
=
np
.
full
(
bnd
.
shape
[
0
],
True
,
bool
)
for
i
in
range
(
dim
)
:
keepbnd
=
np
.
logical_and
(
keepbnd
,
keepnodes
[
bnd
[:,
i
]])
bnd
=
newidx
[
bnd
][
keepbnd
,:]
btag
=
btag
[
keepbnd
]
is_parent
=
np
.
full
([
x
.
shape
[
0
]],
True
,
np
.
bool
)
is_parent
=
np
.
full
([
x
.
shape
[
0
]],
True
,
bool
)
is_parent
[
periodic_nodes
[:,
0
]]
=
False
periodic_parent
=
np
.
cumsum
(
is_parent
)
-
1
periodic_parent
[
periodic_nodes
[:,
0
]]
=
periodic_parent
[
periodic_nodes
[:,
1
]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment