From 62d0a54a3e3dc7c6eea2ff9e9bf305fc0ccb124d Mon Sep 17 00:00:00 2001 From: holl- Date: Fri, 6 Dec 2024 19:45:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tum-pbs/?= =?UTF-8?q?PhiFlow@1a3720d650d3687cdcc7995bc74ef0be4de45336=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cookbook.html | 108 +++++++++--------- FLIP.html | 82 ++++++------- Fluid_Simulation.html | 14 +-- Heightmaps.html | 14 +-- IO_with_Scenes.html | 30 ++--- Math_Introduction.html | 34 +++--- Unstructured.html | 20 ++-- data/sim_000000/batched_noise_data_000000.npz | Bin 9705 -> 9753 bytes data/sim_000000/description.json | 8 +- data/sim_000000/noise_data_000000.npz | Bin 4047 -> 4064 bytes data/sim_000001/batched_noise_data_000000.npz | Bin 4047 -> 4062 bytes data/sim_000001/description.json | 2 +- data/sim_000002/batched_noise_data_000000.npz | Bin 4048 -> 4059 bytes data/sim_000002/description.json | 2 +- data/sim_000003/batched_noise_data_000000.npz | Bin 4050 -> 4059 bytes data/sim_000003/description.json | 2 +- data/sim_000004/batched_noise_data_000000.npz | Bin 4045 -> 4063 bytes data/sim_000004/description.json | 2 +- phi/field/index.html | 2 +- phi/geom/index.html | 61 +++++----- phi/physics/fluid.html | 4 +- 21 files changed, 194 insertions(+), 191 deletions(-) diff --git a/Cookbook.html b/Cookbook.html index 5a81bc5c6..80e8edd35 100644 --- a/Cookbook.html +++ b/Cookbook.html @@ -15157,13 +15157,13 @@

Import for NumPy, TensorFlow @@ -15351,7 +15351,7 @@

Sample Random Values -
(examplesᵇ=10, vectorᶜ=x,y) 0.535 ± 0.272 (5e-02...1e+00)
+
(examplesᵇ=10, vectorᶜ=x,y) 0.341 ± 0.205 (5e-03...8e-01)
@@ -15401,7 +15401,7 @@

Slice a Tensor -
(x=0.516, y=0.882)
+
(x=0.377, y=0.084)
@@ -15450,18 +15450,18 @@

Returns

@property
 def volume(self) -> Tensor:
-    if isinstance(self.elements, CompactSparseTensor) and self.element_rank == 2:
-        if instance(self.vertices).volume > 0:
-            A, B, C, *_ = unstack(self.vertices.center[self.elements._indices], dual)
-            cross_area = vec_length(cross(B - A, C - A))
-            fac = {3: 0.5, 4: 1}[dual(self.elements._indices).size]  # tri, quad, ...
+    if self.element_rank == 2:
+        if instance(self.elements).volume > 0:
+            three_vertices = nonzero(self.elements, 3, list_dims=dual)
+            v1, v2, v3 = unstack(self.vertices.center[{instance: three_vertices}], dual)
+            cross_area = vec_length(cross(v2-v1, v3-v1))
+            vertex_count = math.sum(self.elements, dual)
+            fac = where(vertex_count == 3, 0.5, 1)  # tri, quad, ...
             return fac * cross_area
         else:
             return zeros(instance(self.vertices))  # empty mesh
diff --git a/phi/physics/fluid.html b/phi/physics/fluid.html
index 28a29f8f4..70f17b219 100644
--- a/phi/physics/fluid.html
+++ b/phi/physics/fluid.html
@@ -52,7 +52,7 @@ 

Returns

Velocity of same type as velocity

-def boundary_push(particles: ,
obstacles: tuple,
separation: float = 0.5) ‑> 
+def boundary_push(particles: ,
obstacles: tuple,
separation: float = 0.5) ‑> 

Enforces boundary conditions by correcting possible errors of the advection step and shifting particles out of @@ -104,7 +104,7 @@

Returns

-def make_incompressible(velocity: phi.field._field.Field,
obstacles: Obstacle = (),
solve: phiml.math._optimize.Solve = auto with tolerance None (rel), None (abs), max_iterations=1000,
active:  = None,
order: int = 2,
correct_skew=False,
wide_stencil: bool = None) ‑> Tuple[phi.field._field.Field, phi.field._field.Field]
+def make_incompressible(velocity: phi.field._field.Field,
obstacles: Obstacle = (),
solve: phiml.math._optimize.Solve = auto with tolerance None (rel), None (abs), max_iterations=1000,
active:  = None,
order: int = 2,
correct_skew=False,
wide_stencil: bool = None) ‑> Tuple[phi.field._field.Field, phi.field._field.Field]

Projects the given velocity field by solving for the pressure and subtracting its spatial_gradient.