# How to improve accuracy of enforced integral constraints involving derivatives

**URL:** <https://fenicsproject.discourse.group/t/how-to-improve-accuracy-of-enforced-integral-constraints-involving-derivatives/19266>\
**Category:** General\
**Tags:** dolfinx, variational-form\
**Created:** [January 2, 2026, 9:39pm UTC](https://fenicsproject.discourse.group/t/how-to-improve-accuracy-of-enforced-integral-constraints-involving-derivatives/19266 "2026-01-02T21:39:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Stein](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/stein/32/8751_2.png) [@Stein](https://fenicsproject.discourse.group/u/Stein)\
**Post date:** [January 8, 2026, 7:50am UTC](https://fenicsproject.discourse.group/t/how-to-improve-accuracy-of-enforced-integral-constraints-involving-derivatives/19266/5 "2026-01-08T07:50:46Z")

</div>

This is expected behavior though. With refinement, the integral of `∫∇u⋅n ds` limits to `h`. The fact that this is not an identity relates to the operation ∫∇u⋅n ds is mathematically unbound in the relevant function space H^1, and one should not interpret that integral strongly. Instead, the definition of of the operation ∇\phi⋅n on the interface for any \phi \in H^1 and \Delta \phi \in H^{-1} actually _is_ through intergration by parts:

∫∇u⋅n v ds := ∫∇u⋅∇v d\Omega + ∫\Delta u v d \Omega , which follows precisely from your weak form as = ∫∇u⋅∇v d\Omega + ∫f v d \Omega

There is a nice chapter “Weak normal derivatives, normal and tangential traces, and tangential differential operators on Lipschitz boundaries” by Sayas from 2009 (for which I can’t seem to find a digital link a.t.m.) explaining this. At the bottom of this pdf it is also addressed: [https://www.ltcc.ac.uk/media/london-taught-course-centre/documents/Applied-Computational-Methods---Notes-4.pdf](https://www.ltcc.ac.uk/media/london-taught-course-centre/documents/Applied-Computational-Methods---Notes-4.pdf)

See also this posts [Consistency between displacement-controlled and load-controlled FEAs - #2 by Stein](https://fenicsproject.discourse.group/t/consistency-between-displacement-controlled-and-load-controlled-feas/18414/2)

Summarizing, in FEM, you really should **not** be trying to set ∫∇u^h⋅n in a strong way (it is ill-defined!). You can be perfectly happy with setting the requirement on ∫∇u⋅∇v d\Omega + ∫f v d \Omega instead, which is its mathematically correct definition.

---

_[View the full topic](https://fenicsproject.discourse.group/t/how-to-improve-accuracy-of-enforced-integral-constraints-involving-derivatives/19266)._
