[example][bugfix] Change sign of flux in poisson-mfem
Starting from the Poisson equation -\Delta u = f
and setting \sigma = \nabla u
(or \sigma - \nabla u =0
) we obtain
\nabla \cdot \sigma = -f
. Using partial integration
we obtain the weak form
\int \sigma \cdot \tau + u \nabla \cdot \tau= 0
of the flux equation. Thus the combined weak formulations reads:
\int \sigma \cdot \tau + u \nabla \cdot \tau + (\nabla \cdot \sigma)v = \int -fv
.
So far the example contained a minus sign in front of both
flux-pressure terms. This corresponds to defining \sigma
to be the negative flux \sigma = -\nabla u
. Hence the
essential boundary condition for \sigma
was in fact a negative
flux BC. Maybe this was on purpose but I cannot see any reason
for this.
This MR changes the sign, such that the essential BC
for \sigma
corresponds to a Neumann BC for u
.
It also modifies the boundary values and rhs of the example, because the previous ones where so small that one could not see the sign error.