@@ -40,65 +40,57 @@ Resources
40
40
.. _Video : https://www.youtube.com/watch?v=7nVCuuZDCYA
41
41
.. _Code : https://github.com/lettucecfd/lettuce-paper
42
42
43
-
44
- Resources
45
- ---------
46
-
47
- - `Documentation `_
48
- - Presentation at CFDML2021 - `Preprint `_ | `Slides `_ | `Video `_ | `Code `_
49
-
50
- .. _Documentation : https://lettuceboltzmann.readthedocs.io
51
- .. _Preprint : https://arxiv.org/pdf/2106.12929.pdf
52
- .. _Slides : https://drive.google.com/file/d/1jyJFKgmRBTXhPvTfrwFs292S4MC3Fqh8/view
53
- .. _Video : https://www.youtube.com/watch?v=7nVCuuZDCYA
54
- .. _Code : https://github.com/lettucecfd/lettuce-paper
55
-
56
43
Getting Started
57
44
---------------
58
45
59
- The following Python code will run a two-dimensional Taylor-Green vortex on a GPU:
46
+ To find some very simple examples of how to use lettuce, please have a look
47
+ at the examples _. These will guide you through lettuce's main features.
60
48
61
- .. code :: python
49
+ Please ensure you have Jupyter installed to run the Jupyter notebooks.
62
50
63
- import torch
64
- import lettuce as lt
51
+ .. _examples : https://github.com/lettucecfd/lettuce/tree/master/examples
65
52
66
- lattice = lt.Lattice(lt.D2Q9 , device = ' cuda' , dtype = torch.float64, use_native = False ) # for running on cpu: device='cpu'
67
- flow = lt.TaylorGreenVortex2D(resolution = 128 , reynolds_number = 100 , mach_number = 0.05 , lattice = lattice)
68
- collision = lt.BGKCollision(lattice, tau = flow.units.relaxation_parameter_lu)
69
- streaming = lt.StandardStreaming(lattice)
70
- simulation = lt.Simulation(flow = flow, lattice = lattice, collision = collision, streaming = streaming)
71
- mlups = simulation.step(num_steps = 1000 )
72
- print (" Performance in MLUPS:" , mlups)
53
+ Installation
54
+ ------------
73
55
74
- More advanced examples _ are available as jupyter notebooks.
56
+ * Install the anaconda or miniconda package manager from www.anaconda.org
57
+ * Create a new conda environment and activate it::
75
58
76
- Please ensure you have Jupyter installed to run these notebooks.
59
+ conda create -n lettuce
60
+ conda activate lettuce
77
61
78
- .. _examples : https://github.com/lettucecfd/lettuce/tree/master/examples
62
+ * Follow the recommendations at https://pytorch.org/get-started/locally/ to
63
+ install pytorch based on your GPU's CUDA version. You may need to install
64
+ the nvidia toolkit. You may follow the instructions at https://developer
65
+ .nvidia.com/cuda-downloads. You may need to check the compatibility of your
66
+ NVIDIA driver with the desired CUDA version:
67
+ https://docs.nvidia.com/deploy/cuda-compatibility/. To get your CUDA version,
68
+ run::
79
69
80
- Installation
81
- ------------
70
+ nvcc --version
82
71
83
- * Install the anaconda package manager from www.anaconda.org
84
- * Create a new conda environment and install PyTorch::
72
+ * For CUDA 12.1 (if supported by your GPU) use::
85
73
86
- conda create -n lettuce -c pytorch -c nvidia pytorch pytorch-cuda=12.1
74
+ conda install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia
87
75
88
- * Activate the conda environment ::
76
+ * Install the remaining dependencies ::
89
77
90
78
conda activate lettuce
79
+ conda install -c pytorch -c conda-forge matplotlib pytest click pyevtk mmh3 h5py scipy pandas numpy
91
80
92
- * Install all requirements ::
81
+ * Clone this repository from github and change to it ::
93
82
94
- conda install -c conda-forge -c anaconda matplotlib pytest click pyevtk h5py mmh3
83
+ git clone https://github.com/lettucecfd/lettuce
84
+ cd lettuce
95
85
96
- * Clone this repository from github
97
- * Change into the cloned directory
98
- * Run the install script::
86
+ * If you want to only **USE ** lettuce, run the install script::
99
87
100
88
python setup.py install
101
89
90
+ * If you are a **developer **, do this to update the lettuce package when running a script::
91
+
92
+ python setup.py develop
93
+
102
94
* Run the test cases::
103
95
104
96
python setup.py test
@@ -107,15 +99,14 @@ Installation
107
99
108
100
lettuce --no-cuda convergence
109
101
110
- * For running a CUDA-driven LBM simulation on one GPU omit the `--no-cuda `. If CUDA is not found,
111
- make sure that cuda drivers are installed and compatible with the installed cudatoolkit
112
- (see conda install command above).
102
+ * For running a CUDA-driven LBM simulation on one GPU omit the `--no-cuda `.
103
+ If CUDA is not found, make sure that cuda drivers are installed and
104
+ compatible with the installed cudatoolkit (see conda install command above).
113
105
114
106
* Check out the performance, running on GPU::
115
107
116
108
lettuce benchmark
117
109
118
-
119
110
Citation
120
111
--------
121
112
If you use Lettuce in your research, please cite the following paper::
@@ -128,7 +119,6 @@ If you use Lettuce in your research, please cite the following paper::
128
119
organization={Springer Nature}
129
120
}
130
121
131
-
132
122
Credits
133
123
-------
134
124
We use the following third-party packages:
0 commit comments