Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curl of scalar function in 2D should be vector #152

Open
yguclu opened this issue Apr 12, 2024 · 0 comments
Open

Curl of scalar function in 2D should be vector #152

yguclu opened this issue Apr 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yguclu
Copy link
Member

yguclu commented Apr 12, 2024

When taking the curl of a scalar function in 2D, this should be interpreted as the vector Curl operator, whose result is a vector with two components.

SymPDE thinks instead that the result is scalar, as can be checked with this code:

from sympde.topology import Square, ScalarFunctionSpace, element_of
from sympde.calculus import curl

domain  = Square('Omega')
V = ScalarFunctionSpace('V', domain)
u = element_of(V, name='u')
expr = curl(u)

print(expr.is_scalar)

This incorrectly prints True to terminal, instead of False.

The correct result is obtained by replacing curl with rot.

@yguclu yguclu added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant