# Implementing a potential problem with a current condition

**URL:** <https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491>\
**Category:** variational formulation\
**Created:** [April 30, 2024, 3:35pm UTC](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491 "2024-04-30T15:35:41Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Daniel.Baker](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Daniel.Baker](https://fenicsproject.discourse.group/u/Daniel.Baker)\
**Post date:** [May 1, 2024, 3:44pm UTC](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491/7 "2024-05-01T15:44:34Z")

</div>

I agree entirely with your observation. Having said that, it is perhaps worth being more explicit about the second constraint. Let’s choose an arbitrary point x\_0 in Gamma\_2. Then the second constraint says that the difference u(x)-u(x\_0)=0 for every point x in Gamma\_2. Thus, if there are N DOFs for u in Gamma\_2, there will be N-1 constraints of the second type and the integral constraint is also a single constraint. So the total number of constraints is N, the number of DOFs for u in Gamma2. Thus the problem is well defined.

In [Issues Solving Pure Neumann Problems in dolfinx](https://fenicsproject.discourse.group/t/issues-solving-pure-neumann-problems-in-dolfinx/10468/7) one can also choose an arbitrary point x\_0 on the boundary of the region and stipulate a Dirichlet condition at x\_0. Everywhere else is Neumann boundary conditions. The value of the Dirichlet condition is then determined by the integral constraint on u over the entire domain. In this regard, the two problems are very similar.

---

_[View the full topic](https://fenicsproject.discourse.group/t/implementing-a-potential-problem-with-a-current-condition/14491)._
