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
itischler
lbmpy
Commits
24239a5f
Commit
24239a5f
authored
Jul 14, 2021
by
itischler
Browse files
fixed getter issue of the second momentum
parent
1b59eef1
Pipeline
#33244
failed with stages
in 11 minutes and 56 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
lbmpy/methods/conservedquantitycomputation.py
View file @
24239a5f
...
...
@@ -227,9 +227,12 @@ class DensityVelocityComputation(AbstractConservedQuantityComputation):
main_assignments
.
extend
([
Assignment
(
lhs
,
sum
(
d
[
i
]
*
pdf
for
d
,
pdf
in
zip
(
self
.
_stencil
,
pdfs
)))
for
i
,
lhs
in
enumerate
(
moment1_output_symbol
)])
if
'moment2'
in
output_quantity_names_to_symbols
:
for
p_i
in
self
.
_symbolsOrder2
:
main_assignments
.
append
(
Assignment
(
p_i
,
eqs
[
p_i
]))
del
eqs
[
p_i
]
moment2_output_symbol
=
output_quantity_names_to_symbols
[
'moment2'
]
if
isinstance
(
moment2_output_symbol
,
Field
):
moment2_output_symbol
=
moment2_output_symbol
.
center_vector
for
i
,
p
in
enumerate
(
moment2_output_symbol
):
main_assignments
.
append
(
Assignment
(
p
,
eqs
[
self
.
_symbolsOrder2
[
i
]]))
del
eqs
[
self
.
_symbolsOrder2
[
i
]]
ac
=
ac
.
copy
(
main_assignments
,
[
Assignment
(
a
,
b
)
for
a
,
b
in
eqs
.
items
()])
return
ac
.
new_without_unused_subexpressions
()
...
...
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