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
Mischa Dombrowski
lbmweights
Commits
7d804116
Commit
7d804116
authored
Sep 10, 2019
by
MischaD
Browse files
c_s_sq property
parent
c6566fe4
Changes
2
Hide whitespace changes
Inline
Side-by-side
cli.py
View file @
7d804116
...
...
@@ -30,14 +30,13 @@ def benchmark(x=10):
)
@
click
.
option
(
"--seed"
,
type
=
int
,
help
=
"Random number to be used as seed"
)
def
lbmweights
(
dimension
,
order
,
shells
,
seed
):
#shell_list = [int(x) for x in re.findall(u"\d+", shells)]
#lattice = Lattice(
# dimension=dimension, order=order, shell_list=shell_list, seed=seed
#)
lattice
=
Lattice
.
from_name
(
"D2Q9"
)
# benchmark(10)
print
(
lattice
.
velocity_set
())
if
__name__
==
"__main__"
:
...
...
lbmweights/lattice.py
View file @
7d804116
...
...
@@ -176,6 +176,12 @@ class Lattice:
return
self
.
_weights
return
self
.
calculate_weights
()
@
property
def
c_s_sq
(
self
):
if
self
.
_c_s_sq
:
return
self
.
_c_s_sq
return
self
.
velocity_set
()[
0
]
def
shell_from_type
(
self
,
type
):
for
shell
in
self
.
_shells
:
if
shell
.
type
==
type
:
...
...
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