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
Stephan Seitz
pystencils
Commits
706c5257
Commit
706c5257
authored
Mar 22, 2018
by
Martin Bauer
Browse files
Added notebook with LES Smagorinsky model
parent
327acffd
Changes
2
Hide whitespace changes
Inline
Side-by-side
equationcollection/equationcollection.py
View file @
706c5257
...
...
@@ -225,6 +225,21 @@ class EquationCollection(object):
allLhs
=
[
eq
.
lhs
for
eq
in
self
.
mainEquations
]
return
self
.
extract
(
allLhs
)
def
appendToSubexpressions
(
self
,
rhs
,
lhs
=
None
,
topologicalSort
=
True
):
if
lhs
is
None
:
lhs
=
sp
.
Dummy
()
eq
=
sp
.
Eq
(
lhs
,
rhs
)
self
.
subexpressions
.
append
(
eq
)
if
topologicalSort
:
self
.
topologicalSort
(
subexpressions
=
True
,
mainEquations
=
False
)
return
lhs
def
topologicalSort
(
self
,
subexpressions
=
True
,
mainEquations
=
True
):
if
subexpressions
:
self
.
subexpressions
=
sortEquationsTopologically
(
self
.
subexpressions
)
if
mainEquations
:
self
.
mainEquations
=
sortEquationsTopologically
(
self
.
mainEquations
)
def
insertSubexpression
(
self
,
symbol
):
newSubexpressions
=
[]
subsDict
=
None
...
...
parallel/blockiteration.py
View file @
706c5257
...
...
@@ -4,8 +4,11 @@ These function simplify the iteration over rectangular slices, managing the mapp
global coordinates.
"""
import
numpy
as
np
import
waLBerla
as
wlb
from
pystencils.slicing
import
normalizeSlice
try
:
import
waLBerla
as
wlb
except
ImportError
:
wlb
=
None
def
blockIteration
(
blocks
,
ghostLayers
,
dim
=
3
,
accessPrefix
=
''
):
...
...
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