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

Double derivative of Facet normal broken for higher order meshes #353

Open
jorgensd opened this issue Feb 25, 2025 · 1 comment
Open

Double derivative of Facet normal broken for higher order meshes #353

jorgensd opened this issue Feb 25, 2025 · 1 comment

Comments

@jorgensd
Copy link
Member

First referenced:
https://fenicsproject.discourse.group/t/ulf-issue-for-higher-order-derivatives-on-quadratic-elements/17075/2

Minimal reproducible example

from ufl import (
    Mesh,
    tetrahedron,
    FacetNormal,
    ds,
)
from ufl.algorithms import compute_form_data
from ufl.finiteelement import FiniteElement
from ufl.pullback import identity_pullback
from ufl.sobolevspace import H1

domain = Mesh(FiniteElement("Lagrange", tetrahedron, 2, (3,), identity_pullback, H1))

# Define the facet normal
n = FacetNormal(domain)

# Define the boundary integral
c = n[0].dx(0).dx(0) * ds


A = compute_form_data(c)
@jorgensd
Copy link
Member Author

It seems like for the expression at hand, one has to apply geometry lowering prior to computing derivatives, i.e.

form = ufl.algorithms.apply_algebra_lowering.apply_algebra_lowering(c)
form = ufl.algorithms.remove_complex_nodes.remove_complex_nodes(form)
form = ufl.algorithms.apply_geometry_lowering.apply_geometry_lowering(form)
form = ufl.algorithms.apply_derivatives.apply_derivatives(form)

Does anyone have an idea of how we could work around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant