Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
ecb9390a
Commit
ecb9390a
authored
Apr 18, 2018
by
Martin Bauer
Browse files
Fixed bug in lbmpy boundary plot
- boundaries with same name have not been displayed correctly
parent
26f855cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
boundaries/boundaryhandling.py
View file @
ecb9390a
...
...
@@ -76,11 +76,6 @@ class BoundaryHandling:
def
flag_array_name
(
self
):
return
self
.
flag_interface
.
flag_field_name
def
get_boundary_name_to_flag_dict
(
self
):
result
=
{
b_obj
.
name
:
b_info
.
flag
for
b_obj
,
b_info
in
self
.
_boundary_object_to_boundary_info
.
items
()}
result
[
'domain'
]
=
self
.
flag_interface
.
domain_flag
return
result
def
get_mask
(
self
,
slice_obj
,
boundary_obj
,
inverse
=
False
):
if
isinstance
(
boundary_obj
,
str
)
and
boundary_obj
.
lower
()
==
'domain'
:
flag
=
self
.
flag_interface
.
domain_flag
...
...
plot2d.py
View file @
ecb9390a
...
...
@@ -196,8 +196,9 @@ def vector_field_animation(run_function, step=2, rescale=True, plot_setup_functi
if
rescale
:
max_norm
=
np
.
max
(
norm
(
field
,
axis
=
2
,
ord
=
2
))
field
=
field
/
max_norm
if
'scale'
not
in
kwargs
:
kwargs
[
'scale'
]
=
1.0
kwargs
.
setdefault
(
'scale'
,
1
/
step
)
kwargs
.
setdefault
(
'angles'
,
'xy'
)
kwargs
.
setdefault
(
'scale_units'
,
'xy'
)
quiver_plot
=
vector_field
(
field
,
step
=
step
,
**
kwargs
)
plot_setup_function
(
quiver_plot
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment