Commit 7d804116 authored by MischaD's avatar MischaD
Browse files

c_s_sq property

parent c6566fe4
......@@ -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__":
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment