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
Tom Harke
pystencils
Commits
d6d843fb
Commit
d6d843fb
authored
Jan 20, 2017
by
Martin Bauer
Browse files
Bugfix in equationcollection
parent
791caf42
Changes
2
Hide whitespace changes
Inline
Side-by-side
equationcollection/equationcollection.py
View file @
d6d843fb
...
...
@@ -171,13 +171,15 @@ class EquationCollection:
continue
# exact the same subexpression equation exists already
else
:
# different definition - a new name has to be introduced
newLhs
=
self
.
subexpressionSymbolNameGenerator
(
)
newLhs
=
next
(
self
.
subexpressionSymbolNameGenerator
)
newEq
=
sp
.
Eq
(
newLhs
,
fastSubs
(
otherSubexpressionEq
.
rhs
,
substitutionDict
))
processedOtherSubexpressionEquations
.
append
(
newEq
)
substitutionDict
[
otherSubexpressionEq
.
lhs
]
=
newLhs
else
:
processedOtherSubexpressionEquations
.
append
(
fastSubs
(
otherSubexpressionEq
,
substitutionDict
))
return
self
.
copy
(
self
.
mainEquations
+
other
.
mainEquations
,
processedOtherMainEquations
=
[
fastSubs
(
eq
,
substitutionDict
)
for
eq
in
other
.
mainEquations
]
return
self
.
copy
(
self
.
mainEquations
+
processedOtherMainEquations
,
self
.
subexpressions
+
processedOtherSubexpressionEquations
)
def
getDependentSymbols
(
self
,
symbolSequence
):
...
...
field.py
View file @
d6d843fb
...
...
@@ -236,6 +236,9 @@ class Field:
"Got %d, expected %d"
%
(
len
(
idx
),
self
.
field
.
indexDimensions
))
return
Field
.
Access
(
self
.
field
,
self
.
_offsets
,
idx
)
def
__getitem__
(
self
,
*
idx
):
return
self
.
__call__
(
*
idx
)
@
property
def
field
(
self
):
return
self
.
_field
...
...
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