def bilin_mortar(u, v, w): ju = (-1.)**j * dot(u, w.n) jv = (-1.)**i * dot(v, w.n) nxn = prod(w.n, w.n) mu = .5 * ddot(nxn, C(sym_grad(u))) mv = .5 * ddot(nxn, C(sym_grad(v))) return ((1. / (alpha * w.h) * ju * jv - mu * jv - mv * ju) * (np.abs(w.x[1]) <= limit))
def lin_mortar(v, w): jv = (-1.)**i * dot(v, w.n) mv = .5 * ddot(prod(w.n, w.n), C(sym_grad(v))) return ((1. / (alpha * w.h) * gap(w.x) * jv - gap(w.x) * mv) * (np.abs(w.x[1]) <= limit))
def bilinf_A(sigma, tau, w): from skfem.models.helpers import dot return dot(sigma, tau)