Skip to content

Commit

Permalink
[physics] Disable matrix offset by default for make_incompressible()
Browse files Browse the repository at this point in the history
* Fix auxiliary args in masked_laplace()
  • Loading branch information
holl- committed Jul 12, 2024
1 parent a731d0c commit b012609
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phi/physics/fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b012609

Please sign in to comment.