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

Norm should accept VectorFunction objects #175

Open
alex-m-h opened this issue Apr 3, 2024 · 1 comment
Open

Norm should accept VectorFunction objects #175

alex-m-h opened this issue Apr 3, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@alex-m-h
Copy link
Contributor

alex-m-h commented Apr 3, 2024

When one tries to compute the L2-norm of a H(curl)-conforming FemField, it has to be done by converting the symbolic field into a SymPy ImmutableDenseMatrix object, e.g.

domain = Cube(name='domain')
V = VectorFunctionSpace(name='V', domain=domain, kind='hcurl')

v = element_of(V, name='v')
l2_norm_sym = Norm(ImmutableDenseMatrix([v[0], v[1], v[2]]), domain=domain, kind='l2')

domain_h = discretize(domain, ncells=[5,5,5], periodic=[False, False, False])
V_h = discretize(V, domain_h, degree=[3,3,3])

l2_norm_discrete = discretize(l2_norm_sym, domain_h, V_h)

If instead the symbolic vector field is used directly to define the norm, i.e.

l2_norm_sym = Norm(v, domain=domain, kind='l2')

SymPy throws the exception
sympy.matrices.common.NonSquareMatrixError.

It would be more intuitive, if the symbolic vector field could be used directly to define the norm.

@yguclu
Copy link
Member

yguclu commented Mar 11, 2025

This appears to be a problem in SymPDE, not Psydac.

@yguclu yguclu transferred this issue from pyccel/psydac Mar 11, 2025
@yguclu yguclu added the help wanted Extra attention is needed label Mar 11, 2025
@yguclu yguclu changed the title Norm of H(curl)-conforming FemField Norms should accept VectorFunction objects Mar 11, 2025
@yguclu yguclu changed the title Norms should accept VectorFunction objects Norm should accept VectorFunction objects Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants