Blockquote
sqrt(int1d(Th)(hTriangle*((dx(phi))^2+(dy(phi))^2))+intalledges(Th)((lenEdge*((jump(dx(phi)))^2+(jump(dy(phi)))^2))/nTonEdge*(nTonEdge-1)))
Blockquote
Is It Correct ???.
just do that in 2 times: one for the numerator etaK ; divide by a constant real cnst = 1 ;
and after compute the constant cnst = max(etaK[]); and the get the correct result if etaK is a P0 finite element.