Skip to content

Commit

Permalink
Deploying to gh-pages from @ 72dd505 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Nov 29, 2024
1 parent fbe5073 commit 5d87266
Show file tree
Hide file tree
Showing 21 changed files with 3,698 additions and 243 deletions.
106 changes: 53 additions & 53 deletions Cookbook.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions FLIP.html

Large diffs are not rendered by default.

3,662 changes: 3,562 additions & 100 deletions Fluid_Simulation.html

Large diffs are not rendered by default.

54 changes: 28 additions & 26 deletions Fluid_Simulation.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Heightmaps.html

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions IO_with_Scenes.html

Large diffs are not rendered by default.

45 changes: 17 additions & 28 deletions Math_Introduction.html

Large diffs are not rendered by default.

Binary file modified data/sim_000000/batched_noise_data_000000.npz
Binary file not shown.
8 changes: 4 additions & 4 deletions data/sim_000000/description.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
null
],
"data": [
0.7377850413322449,
0.02197568118572235,
0.2852073013782501,
0.8647283315658569
0.8807709813117981,
0.30953249335289,
0.5866777300834656,
0.6696330904960632
]
},
"__tensors__": [
Expand Down
Binary file modified data/sim_000000/noise_data_000000.npz
Binary file not shown.
Binary file modified data/sim_000001/batched_noise_data_000000.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion data/sim_000001/description.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"smoothness": 0.7377850413322449
"smoothness": 0.8807709813117981
}
Binary file modified data/sim_000002/batched_noise_data_000000.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion data/sim_000002/description.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"smoothness": 0.02197568118572235
"smoothness": 0.30953249335289
}
Binary file modified data/sim_000003/batched_noise_data_000000.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion data/sim_000003/description.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"smoothness": 0.2852073013782501
"smoothness": 0.5866777300834656
}
Binary file modified data/sim_000004/batched_noise_data_000000.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion data/sim_000004/description.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"smoothness": 0.8647283315658569
"smoothness": 0.6696330904960632
}
10 changes: 6 additions & 4 deletions examples/grids/Wake_Flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -15122,12 +15122,13 @@ <h1 id="Wake-Flow">Wake Flow<a class="anchor-link" href="#Wake-Flow">&#182;</a><
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea">
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[1]:</div>
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[&nbsp;]:</div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-python"><pre><span></span><span class="o">%</span><span class="n">pip</span> <span class="n">install</span> <span class="n">phiflow</span>
<span class="kn">from</span> <span class="nn">phi.jax.flow</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">phi.torch.flow</span> <span class="kn">import</span> <span class="o">*</span>
<span class="c1"># from phi.flow import * # If JAX is not installed. You can use phi.torch or phi.tf as well.</span>
<span class="kn">from</span> <span class="nn">tqdm.notebook</span> <span class="kn">import</span> <span class="n">trange</span>
</pre></div>

</div>
Expand Down Expand Up @@ -15220,7 +15221,7 @@ <h1 id="Wake-Flow">Wake Flow<a class="anchor-link" href="#Wake-Flow">&#182;</a><
<div class="jp-Collapser jp-InputCollapser jp-Cell-inputCollapser">
</div>
<div class="jp-InputArea jp-Cell-inputArea">
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[18]:</div>
<div class="jp-InputPrompt jp-InputArea-prompt">In&nbsp;[&nbsp;]:</div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-python"><pre><span></span><span class="nd">@jit_compile</span>
Expand All @@ -15230,7 +15231,8 @@ <h1 id="Wake-Flow">Wake Flow<a class="anchor-link" href="#Wake-Flow">&#182;</a><

<span class="n">boundary</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;x-&#39;</span><span class="p">:</span> <span class="n">vec</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">z</span><span class="o">=</span><span class="mi">0</span><span class="p">),</span> <span class="s1">&#39;x+&#39;</span><span class="p">:</span> <span class="n">ZERO_GRADIENT</span><span class="p">,</span> <span class="s1">&#39;y&#39;</span><span class="p">:</span> <span class="n">PERIODIC</span><span class="p">,</span> <span class="s1">&#39;z&#39;</span><span class="p">:</span> <span class="n">PERIODIC</span><span class="p">}</span>
<span class="n">v0</span> <span class="o">=</span> <span class="n">StaggeredGrid</span><span class="p">((</span><span class="mf">8.</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">boundary</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">64</span><span class="p">,</span> <span class="n">z</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span> <span class="n">bounds</span><span class="o">=</span><span class="n">Box</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">z</span><span class="o">=</span><span class="mi">5</span><span class="p">))</span>
<span class="n">v_trj</span><span class="p">,</span> <span class="n">p_trj</span> <span class="o">=</span> <span class="n">iterate</span><span class="p">(</span><span class="n">step</span><span class="p">,</span> <span class="n">batch</span><span class="p">(</span><span class="n">time</span><span class="o">=</span><span class="mi">200</span><span class="p">),</span> <span class="n">v0</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">v0</span><span class="p">,</span> <span class="n">p0</span> <span class="o">=</span> <span class="n">fluid</span><span class="o">.</span><span class="n">make_incompressible</span><span class="p">(</span><span class="n">v0</span><span class="p">,</span> <span class="n">cylinder</span><span class="p">,</span> <span class="n">Solve</span><span class="p">(</span><span class="s1">&#39;scipy-direct&#39;</span><span class="p">))</span>
<span class="n">v_trj</span><span class="p">,</span> <span class="n">p_trj</span> <span class="o">=</span> <span class="n">iterate</span><span class="p">(</span><span class="n">step</span><span class="p">,</span> <span class="n">batch</span><span class="p">(</span><span class="n">time</span><span class="o">=</span><span class="mi">200</span><span class="p">),</span> <span class="n">v0</span><span class="p">,</span> <span class="n">p0</span><span class="p">,</span> <span class="nb">range</span><span class="o">=</span><span class="n">trange</span><span class="p">)</span>
</pre></div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion phi/field/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ <h2 id="args">Args</h2>
</dl></div>
</dd>
<dt id="phi.field.divergence"><code class="name flex">
<span>def <span class="ident">divergence</span></span>(<span>field: phi.field._field.Field,<br>order=2,<br>implicit: phiml.math._optimize.Solve = None,<br>upwind: phi.field._field.Field = None,<br>implicitness: int = None) ‑> <function <a title="phi.field.CenteredGrid" href="#phi.field.CenteredGrid">CenteredGrid()</a> at 0x7fc178113380></span>
<span>def <span class="ident">divergence</span></span>(<span>field: phi.field._field.Field,<br>order=2,<br>implicit: phiml.math._optimize.Solve = None,<br>upwind: phi.field._field.Field = None,<br>implicitness: int = None) ‑> <function <a title="phi.field.CenteredGrid" href="#phi.field.CenteredGrid">CenteredGrid()</a> at 0x7f5988b632e0></span>
</code></dt>
<dd>
<div class="desc"><p>Computes the divergence of a grid using finite differences.</p>
Expand Down
4 changes: 2 additions & 2 deletions phi/physics/fluid.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2 id="returns">Returns</h2>
<p>Velocity of same type as <code>velocity</code></p></div>
</dd>
<dt id="phi.physics.fluid.boundary_push"><code class="name flex">
<span>def <span class="ident">boundary_push</span></span>(<span>particles: <function PointCloud at 0x7fc1780dc540>,<br>obstacles: tuple,<br>separation: float = 0.5) ‑> <function PointCloud at 0x7fc1780dc540></span>
<span>def <span class="ident">boundary_push</span></span>(<span>particles: <function PointCloud at 0x7f5988b2c4a0>,<br>obstacles: tuple,<br>separation: float = 0.5) ‑> <function PointCloud at 0x7f5988b2c4a0></span>
</code></dt>
<dd>
<div class="desc"><p>Enforces boundary conditions by correcting possible errors of the advection step and shifting particles out of
Expand Down Expand Up @@ -104,7 +104,7 @@ <h2 id="returns">Returns</h2>
</dl></div>
</dd>
<dt id="phi.physics.fluid.make_incompressible"><code class="name flex">
<span>def <span class="ident">make_incompressible</span></span>(<span>velocity: phi.field._field.Field,<br>obstacles: <a title="phi.physics.fluid.Obstacle" href="#phi.physics.fluid.Obstacle">Obstacle</a> = (),<br>solve: phiml.math._optimize.Solve = auto with tolerance None (rel), None (abs), max_iterations=1000,<br>active: <function CenteredGrid at 0x7fc178113380> = None,<br>order: int = 2,<br>correct_skew=False,<br>wide_stencil: bool = None) ‑> Tuple[phi.field._field.Field, phi.field._field.Field]</span>
<span>def <span class="ident">make_incompressible</span></span>(<span>velocity: phi.field._field.Field,<br>obstacles: <a title="phi.physics.fluid.Obstacle" href="#phi.physics.fluid.Obstacle">Obstacle</a> = (),<br>solve: phiml.math._optimize.Solve = auto with tolerance None (rel), None (abs), max_iterations=1000,<br>active: <function CenteredGrid at 0x7f5988b632e0> = None,<br>order: int = 2,<br>correct_skew=False,<br>wide_stencil: bool = None) ‑> Tuple[phi.field._field.Field, phi.field._field.Field]</span>
</code></dt>
<dd>
<div class="desc"><p>Projects the given velocity field by solving for the pressure and subtracting its spatial_gradient.</p>
Expand Down

0 comments on commit 5d87266

Please sign in to comment.