Skip to content

Commit

Permalink
test also div terminal expr
Browse files Browse the repository at this point in the history
  • Loading branch information
campospinto committed Feb 26, 2025
1 parent 4aeb886 commit 22c89c9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sympde/expr/tests/test_expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1904,14 +1904,17 @@ def test_terminal_expressions_for_navier_stokes():
pe = sin(pi*y)
# ...

# Verify that div(u) = 0
assert (ux.diff(x) + uy.diff(y)).simplify() == 0

# ... Compute right-hand side
a = TerminalExpr(-mu*laplace(ue), domain)
b = TerminalExpr( grad(ue), domain)
c = TerminalExpr( grad(pe), domain)


# Verify that div(u) = 0
assert (ux.diff(x) + uy.diff(y)).simplify() == 0

d = TerminalExpr(div(ue), domain)
assert d.simplify() == 0

f = (a + b.T*ue + c).simplify()

fx = -mu*(ux.diff(x, 2) + ux.diff(y, 2)) + ux*ux.diff(x) + uy*ux.diff(y) + pe.diff(x)
Expand Down

0 comments on commit 22c89c9

Please sign in to comment.