(mesh, fu, fv)
return C, b
Stokes Flow.
Stokes Flow.
Stokes Flow .
def stokes(mesh, fu, fv):
    """Stokes Flow."""
    mesh.generate_quadratic()
    Au, bu = gradgradform(mesh, f=fu, degree=2)
    Av, bv = gradgradform(mesh, f=fv, degree=2)
    BX, BY = divform(mesh)

    C = sparse.bmat([[Au, None, BX.T],
                     [None, Av, BY.T],
                     [BX, BY, None]])
    b = np.hstack((bu, bv, np.zeros((BX.shape[0],))))

    return C, b
def stokes ( mesh , fu , fv ) : mesh . generate_quadratic ( ) Au , bu = gradgradform ( mesh , f = fu , degree = 2 ) Av , bv = gradgradform ( mesh , f = fv , degree = 2 ) BX , BY = divform ( mesh ) C = sparse . bmat ( [ [ Au , None , BX . T ] , [ None , Av , BY . T ] , [ BX , BY , None ] ] ) b = np . hstack ( ( bu , bv , np . zeros ( ( BX . shape [ 0 ] , ) ) ) ) return C , b