From b0126099a52120f0b11a90234493de62e8ecf897 Mon Sep 17 00:00:00 2001 From: Philipp Holl Date: Fri, 12 Jul 2024 18:36:39 +0200 Subject: [PATCH] [physics] Disable matrix offset by default for make_incompressible() * Fix auxiliary args in masked_laplace() --- phi/physics/fluid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phi/physics/fluid.py b/phi/physics/fluid.py index 7d226639c..df4414d29 100644 --- a/phi/physics/fluid.py +++ b/phi/physics/fluid.py @@ -93,7 +93,7 @@ def _get_obstacles_for(obstacles, space: Field) -> List[Obstacle]: def make_incompressible(velocity: Field, obstacles: Obstacle or Geometry or tuple or list = (), - solve: Solve = Solve(), + solve: Solve = Solve(rank_deficiency=0), # we take care of singular matrices for 2nd-order using _balance_divergence() active: CenteredGrid = None, order: int = 2, correct_skew=False, @@ -160,7 +160,7 @@ def make_incompressible(velocity: Field, return velocity, pressure -@math.jit_compile_linear(auxiliary_args='hard_bcs,active,order,implicit', forget_traces=True) # jit compilation is required for boundary conditions that add a constant offset solving Ax + b = y +@math.jit_compile_linear(forget_traces=True) def masked_laplace(pressure: Field, v_boundary: Extrapolation, hard_bcs: Field,