Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
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
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
pycodegen
lbmpy
Commits
054e4ea3
Commit
054e4ea3
authored
3 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Minor clean up
parent
3be3644d
No related branches found
No related tags found
1 merge request
!116
Adapted to SymPy 1.10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/methods/momentbased/momentbasedsimplifications.py
+3
-2
3 additions, 2 deletions
lbmpy/methods/momentbased/momentbasedsimplifications.py
with
3 additions
and
2 deletions
lbmpy/methods/momentbased/momentbasedsimplifications.py
+
3
−
2
View file @
054e4ea3
...
...
@@ -140,6 +140,7 @@ def replace_common_quadratic_and_constant_term(cr: LbmCollisionRule):
return
cr
# TODO: This solution is from https://github.com/sympy/sympy/issues/23297. Can be removed if in SymPy master
def
find_subadd
(
exprs
,
replacement_symbol_generator
):
exprs
=
sp
.
Tuple
(
*
exprs
)
adds
=
sp
.
Tuple
(
*
exprs
.
atoms
(
sp
.
Add
))
...
...
@@ -281,8 +282,8 @@ def substitute_moments_in_conserved_quantity_equations(ac: AssignmentCollection)
for
cq_sym
,
moment_sym
in
cq_symbols_to_moments
.
items
():
moment_eq
=
reduced_assignments
[
moment_sym
]
assert
moment_eq
.
count
(
cq_sym
)
==
0
,
"
Expressing conserved quantity
"
\
f
"
{
cq_sym
}
using moment
{
moment_sym
}
would introduce a circular dependency.
"
assert
moment_eq
.
count
(
cq_sym
)
==
0
,
f
"
Expressing conserved quantity
{
cq_sym
}
using moment
{
moment_sym
}
"
\
"
would introduce a circular dependency.
"
cq_eq
=
subs_additive
(
reduced_assignments
[
cq_sym
],
moment_sym
,
moment_eq
)
if
cq_sym
in
main_asm_dict
:
main_asm_dict
[
cq_sym
]
=
cq_eq
...
...
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