  Let $Q$ be a smooth compact orientable 3--manifold with smooth boundary
$\partial Q$. Let $\mathcal{B}$ be the set of exact 2--forms $B\in\Omega^2(Q)$
such that $j_{\partial Q}^*B=0$, where $j_{\partial Q}:{\partial Q}\to Q$ is
the inclusion map. The group $\mathcal{D}=\mathrm{Diff}_0(Q)$ of
self-diffeomorphisms of $Q$ isotopic to the identity acts on the set
$\mathcal{B}$ by $\mathcal{D}\times\mathcal{B}\to\mathcal{B}$, $(h,B)\mapsto
h^*B$. Let $\mathcal{B}^\circ$ be the set of 2--forms $B\in\mathcal{B}$ without
zeros. We prove that every $\mathcal{D}$--invariant functional
$I:\mathcal{B}^\circ\to\mathbb{R}$ having a regular and continuous derivative
with respect to the $C^1$--topology can be locally (and, if $Q=M\times S^1$
with $\partial Q\ne\varnothing$, globally on the set of all 2--forms
$B\in\mathcal{B}^\circ$ admitting a cross-section isotopic to $M\times\{*\}$)
expressed in terms of the helicity.
