In the following program I define the piecewise constant function v which is equal to 1 on
(0, 1/2) and to 0 on (1/2, 1), and then I print out v('+'), v('-'), and jump(v) at the point x = 1/2. In common usage these should be 0., 1., and -1., respectively. But FEniCS reports 1., 0.0, 1.0. It seems that FEniCS reports the value from the left for v('+') and the value from the right for
v('-'), opposite of the normal thing. Then the jump, which is v('+') - v('-') has the wrong sign.
Have I misunderstood, or is this a bug (Dolfin version 1.4.0)?
from dolfin import *
from numpy import array
mesh = UnitIntervalMesh(2)
V = FunctionSpace(mesh, 'DG', 0)
v = Function(V)
v.vector()[:] = array([1., 0.])
F = v('+')*dS
print ( assemble( v('+')*dS ) , assemble( v('-')*dS ) , assemble( jump(v)*dS ) )