#include "sgn.icc"
form inertia_upw (field w, trial u, test v, 
  quadrature_option_type qopt = quadrature_option_type())
{
  return integrate ("internal_sides",
     0.5*abs(dot(average(w),normal()))*dot(jump(u),jump(v)));
}
form d_inertia_upw (field w, trial dw, field u, test v, 
  quadrature_option_type qopt = quadrature_option_type())
{
  return integrate ("internal_sides",
     0.5*compose (sgn, dot(average(w),normal()))
         *dot(average(dw),normal())*dot(jump(u),jump(v)));
}
