o
    ohw                     @   s4   d dl mZ d dlmZmZmZ G dd deZdS )    )Basic)gradient
divergencecurlc                       sj   e Zd ZdZ fddZdddZeZeje_dddZeZeje_dd	d
Z	e	Z
e	je
_dd Z  ZS )Delz
    Represents the vector differential operator, usually represented in
    mathematical expressions as the 'nabla' symbol.
    c                    s   t  | }d|_|S )Ndelop)super__new___name)clsobj	__class__ l/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/sympy/vector/deloperator.pyr	      s   zDel.__new__Fc                 C      t ||d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   r   r   r   r         zDel.gradientc                 C   r   )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   r   r   r   dot2   r   zDel.dotc                 C   r   )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   r   r   r   crossT   s   z	Del.crossc                 C   s   | j S )N)r
   )r   printerr   r   r   	_sympystrx   s   zDel._sympystr)F)__name__
__module____qualname____doc__r	   r   __call__r   __and__r   __xor__r   __classcell__r   r   r   r   r      s    


!r   N)
sympy.corer   sympy.vector.operatorsr   r   r   r   r   r   r   r   <module>   s    