def bilinf(u, p, v, q, w): from skfem.helpers import grad, ddot, div return (ddot(grad(u), grad(v)) - div(u) * q - div(v) * p - 1e-2 * p * q)
def bilinf(sigma, u, tau, v, w): return dot(sigma, tau) + div(sigma) * v + div(tau) * u
def phipsi_load3(u, v, w): ''' for 5.7b $(div_phi, p)$ ''' return div(u) * v
def divu(u, v, w): return div(u) * v
def phiq_load(u, v, w): ''' for 5.7c $(div_phi, q)$ ''' return div(u) * v