@@ -150,20 +150,21 @@ with my_pitz.fv_schemes as f:
150150 f[" snGradSchemes" ][" default" ] = " uncorrected"
151151```
152152
153- ### ⏳ Run multiple cases in parallel
154-
155- Outside an [ asyncio] ( https://docs.python.org/3/library/asyncio.html ) context:
153+ ### 🔢 Direct field file access without ` FoamCase `
156154
157155``` python
158- from foamlib import AsyncFoamCase
159-
160- case1 = AsyncFoamCase(" path/to/case1" )
161- case2 = AsyncFoamCase(" path/to/case2" )
156+ import numpy as np
157+ from foamlib import FoamFieldFile
162158
163- AsyncFoamCase.run_all_wait([case1, case2])
159+ # Read field data directly
160+ U = FoamFieldFile(" 0/U" )
161+ print (f " Velocity field shape: { np.shape(U.internal_field)} " )
162+ print (f " Boundaries: { list (U.boundary_field)} " )
164163```
165164
166- Within an asyncio context (e.g. in a [ Jupyter] ( https://jupyter.org/ ) notebook):
165+ ### ⏳ Run multiple cases in parallel
166+
167+ In an ` asyncio ` context (e.g. [ ` asyncio ` ] ( https://docs.python.org/3/library/asyncio.html ) REPL or [ Jupyter] ( https://jupyter.org/ ) notebook):
167168
168169``` python
169170from foamlib import AsyncFoamCase
@@ -174,19 +175,9 @@ case2 = AsyncFoamCase("path/to/case2")
174175await AsyncFoamCase.run_all([case1, case2])
175176```
176177
177- ### 🔢 Direct field file access
178-
179- ``` python
180- import numpy as np
181- from foamlib import FoamFieldFile
182-
183- # Read field data directly
184- U = FoamFieldFile(" 0/U" )
185- print (f " Velocity field shape: { np.shape(U.internal_field)} " )
186- print (f " Boundaries: { list (U.boundary_field)} " )
187- ```
178+ Note: outside of an ` asyncio ` context, you can use [ ` asyncio.run() ` ] ( https://docs.python.org/3/library/asyncio-runner.html#asyncio.run ) .
188179
189- ### 🎯 Optimization with HPC clusters
180+ ### 🎯 Full optimization run on a Slurm-based HPC cluster
190181
191182``` python
192183import os
0 commit comments