
    wgw                     :    d dl mZ d dlmZmZmZ  G d de      Zy)    )Basic)gradient
divergencecurlc                        e Zd ZdZ fdZddZeZej                  e_        ddZeZej                  e_        ddZ	e	Z
e	j                  e
_        d Z xZS )Delz
    Represents the vector differential operator, usually represented in
    mathematical expressions as the 'nabla' symbol.
    c                 4    t         |   |       }d|_        |S )Ndelop)super__new___name)clsobj	__class__s     ]/home/mcse/projects/flask/flask-venv/lib/python3.12/site-packages/sympy/vector/deloperator.pyr   zDel.__new__   s    goc"	
    c                     t        ||      S )a  
        Returns the gradient of the given scalar field, as a
        Vector instance.

        Parameters
        ==========

        scalar_field : SymPy expression
            The scalar field to calculate the gradient of.

        doit : bool
            If True, the result is returned after calling .doit() on
            each component. Else, the returned expression contains
            Derivative instances

        Examples
        ========

        >>> from sympy.vector import CoordSys3D, Del
        >>> C = CoordSys3D('C')
        >>> delop = Del()
        >>> delop.gradient(9)
        0
        >>> delop(C.x*C.y*C.z).doit()
        C.y*C.z*C.i + C.x*C.z*C.j + C.x*C.y*C.k

        doit)r   )selfscalar_fieldr   s      r   r   zDel.gradient   s    : 400r   c                     t        ||      S )a  
        Represents the dot product between this operator and a given
        vector - equal to the divergence of the vector field.

        Parameters
        ==========

        vect : Vector
            The vector whose divergence is to be calculated.

        doit : bool
            If True, the result is returned after calling .doit() on
            each component. Else, the returned expression contains
            Derivative instances

        Examples
        ========

        >>> from sympy.vector import CoordSys3D, Del
        >>> delop = Del()
        >>> C = CoordSys3D('C')
        >>> delop.dot(C.x*C.i)
        Derivative(C.x, C.x)
        >>> v = C.x*C.y*C.z * (C.i + C.j + C.k)
        >>> (delop & v).doit()
        C.x*C.y + C.x*C.z + C.y*C.z

        r   )r   r   vectr   s      r   dotzDel.dot2   s    : $T**r   c                     t        ||      S )a4  
        Represents the cross product between this operator and a given
        vector - equal to the curl of the vector field.

        Parameters
        ==========

        vect : Vector
            The vector whose curl is to be calculated.

        doit : bool
            If True, the result is returned after calling .doit() on
            each component. Else, the returned expression contains
            Derivative instances

        Examples
        ========

        >>> from sympy.vector import CoordSys3D, Del
        >>> C = CoordSys3D('C')
        >>> delop = Del()
        >>> v = C.x*C.y*C.z * (C.i + C.j + C.k)
        >>> delop.cross(v, doit = True)
        (-C.x*C.y + C.x*C.z)*C.i + (C.x*C.y - C.y*C.z)*C.j +
            (-C.x*C.z + C.y*C.z)*C.k
        >>> (delop ^ C.i).doit()
        0

        r   )r   r   s      r   crossz	Del.crossT   s    > Dt$$r   c                     | j                   S )N)r   )r   printers     r   	_sympystrzDel._sympystrx   s    zzr   )F)__name__
__module____qualname____doc__r   r   __call__r   __and__r   __xor__r    __classcell__)r   s   @r   r   r      s[    

1> H''H+> GkkGO%B GmmGOr   r   N)
sympy.corer   sympy.vector.operatorsr   r   r   r    r   r   <module>r,      s     = =t% tr   