We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0983874 commit ef9830bCopy full SHA for ef9830b
examples/00_simplest_TGV.py
@@ -0,0 +1,21 @@
1
+"""
2
+This file showcases the simplicity of the lettuce code.
3
+The following code will run a two-dimensional Taylor-Green vortex on GPU.
4
5
+
6
+import torch
7
+import lettuce as lt
8
9
+flow = lt.TaylorGreenVortex(
10
+ lt.Context(dtype=torch.float64), # for running on cpu: device='cpu'
11
+ resolution=128,
12
+ reynolds_number=100,
13
+ mach_number=0.05,
14
+ stencil=lt.D2Q9
15
+)
16
+simulation = lt.Simulation(
17
+ flow=flow,
18
+ collision=lt.BGKCollision(tau=flow.units.relaxation_parameter_lu),
19
+ reporter=[])
20
+mlups = simulation(num_steps=1000)
21
+print("Performance in MLUPS:", mlups)
0 commit comments