  We consider the heat equation on the $N$-dimensional cube $(0,1)^N$ and
impose different classes of integral conditions, instead of usual boundary
ones. Well-posedness results for the heat equation under the condition that the
moments of order 0 and 1 are conserved had been known so far only in the case
of N=1 -- for which such conditions can be easily interpreted as conservation
of mass and barycenter. In this paper we show that in the case of general $N$
the heat equation with such integral conditions is still well-posed, upon
suitably relax the notion of solution.
  Existence and uniqueness of solutions with general initial data in a suitable
space of distibutions over $(0,1)^N$ are proved by introducing two appropriate
realizations of the Laplacian and checking by form methods that they generate
analytic semigroups. The solution thus obtained does however solve the heat
equation only in a certain distributional sense.
  However, it turns out that one of these realizations is tightly related to a
well-known object of operator theory, the Krein--von Neumann extension of the
Laplacian. This connection also establishes well-posedness in a classical
sense, as long as the initial data are $L^2$-functions.
