(vect, frame)
return outvec
Returns the curl of a vector field computed wrt the coordinate
    symbols of the given frame.

    Parameters
    ==========

    vect : Vector
        The vector operand

    frame : ReferenceFrame
        The reference frame to calculate the curl in

    Examples
    ========

    >>> from sympy.physics.vector import ReferenceFrame
    >>> from sympy.physics.vector import curl
    >>> R = ReferenceFrame('R')
    >>> v1 = R[1]*R[2]*R.x + R[0]*R[2]*R.y + R[0]*R[1]*R.z
    >>> curl(v1, R)
    0
    >>> v2 = R[0]*R[1]*R[2]*R.x
    >>> curl(v2, R)
    R_x*R_y*R.y - R_x*R_z*R.z
Returns the curl of a vector field computed wrt the coordinate
    symbols of the given frame.
Returns the curl of a vector field computed wrt the coordinate symbols of the given frame .
def curl(vect, frame):
    """
    Returns the curl of a vector field computed wrt the coordinate
    symbols of the given frame.

    Parameters
    ==========

    vect : Vector
        The vector operand

    frame : ReferenceFrame
        The reference frame to calculate the curl in

    Examples
    ========

    >>> from sympy.physics.vector import ReferenceFrame
    >>> from sympy.physics.vector import curl
    >>> R = ReferenceFrame('R')
    >>> v1 = R[1]*R[2]*R.x + R[0]*R[2]*R.y + R[0]*R[1]*R.z
    >>> curl(v1, R)
    0
    >>> v2 = R[0]*R[1]*R[2]*R.x
    >>> curl(v2, R)
    R_x*R_y*R.y - R_x*R_z*R.z

    """

    _check_vector(vect)
    if vect == 0:
        return Vector(0)
    vect = express(vect, frame, variables=True)
    #A mechanical approach to avoid looping overheads
    vectx = vect.dot(frame.x)
    vecty = vect.dot(frame.y)
    vectz = vect.dot(frame.z)
    outvec = Vector(0)
    outvec += (diff(vectz, frame[1]) - diff(vecty, frame[2])) * frame.x
    outvec += (diff(vectx, frame[2]) - diff(vectz, frame[0])) * frame.y
    outvec += (diff(vecty, frame[0]) - diff(vectx, frame[1])) * frame.z
    return outvec
def curl ( vect , frame ) : _check_vector ( vect ) if vect == 0 : return Vector ( 0 ) vect = express ( vect , frame , variables = True ) #A mechanical approach to avoid looping overheads vectx = vect . dot ( frame . x ) vecty = vect . dot ( frame . y ) vectz = vect . dot ( frame . z ) outvec = Vector ( 0 ) outvec += ( diff ( vectz , frame [ 1 ] ) - diff ( vecty , frame [ 2 ] ) ) * frame . x outvec += ( diff ( vectx , frame [ 2 ] ) - diff ( vectz , frame [ 0 ] ) ) * frame . y outvec += ( diff ( vecty , frame [ 0 ] ) - diff ( vectx , frame [ 1 ] ) ) * frame . z return outvec