+
    ik%                        ^ RI t ^ RIHt ^ RIHtHtHt ^ RIHt ^ RI	H
t
HtHtHtHt ^ RIHt ^ RIHt ^ RIHt R	 tR
 t ! R R]4      t ! R R]4      t ! R R]4      tRR ltRR ltRR lt ! R R]4      tR tR# )    N)Expr)sympifySpreorder_traversal)
CoordSys3D)Vector	VectorMul	VectorAddCrossDot)
Derivative)Add)Mulc                     \        V 4      p\        4       pV F<  p\        V\        4      '       g   K  VP	                  V4       VP                  4        K>  	  \        V4      # N)r   set
isinstancer   addskip	frozenset)exprgretis   &   T/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/vector/operators.py_get_coord_systemsr      sJ    4 A
%Ca$$GGAJFFH  S>    c                     \         P                  ! R  4      pV P                   F!  pV\        V4      ;;,          V,          uu&   K#  	  \	        VP                  4       4      # )c                  "    \         P                  # r   )r   One r   r   <lambda>._split_mul_args_wrt_coordsys.<locals>.<lambda>   s    r   )collectionsdefaultdictargsr   listvalues)r   dr   s   &  r   _split_mul_args_wrt_coordsysr*      sG    .AYY	
Q
 A%  
r   c                   0   a  ] tR t^t o RtR tR tRtV tR# )Gradientz
Represents unevaluated Gradient.

Examples
========

>>> from sympy.vector import CoordSys3D, Gradient
>>> R = CoordSys3D('R')
>>> s = R.x*R.y*R.z
>>> Gradient(s)
Gradient(R.x*R.y*R.z)

c                T    \        V4      p\        P                  ! W4      pWn        V# r   r   r   __new___exprclsr   objs   && r   r/   Gradient.__new__+   #    t}ll3%	
r   c                0    \        V P                  R R7      # Tdoit)gradientr0   selfhintss   &,r   r9   Gradient.doit1   s    

..r   r!   N	__name__
__module____qualname____firstlineno____doc__r/   r9   __static_attributes____classdictcell____classdict__s   @r   r,   r,      s     / /r   r,   c                   0   a  ] tR t^5t o RtR tR tRtV tR# )
Divergencez
Represents unevaluated Divergence.

Examples
========

>>> from sympy.vector import CoordSys3D, Divergence
>>> R = CoordSys3D('R')
>>> v = R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k
>>> Divergence(v)
Divergence(R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k)

c                T    \        V4      p\        P                  ! W4      pWn        V# r   r.   r1   s   && r   r/   Divergence.__new__D   r5   r   c                0    \        V P                  R R7      # r7   )
divergencer0   r;   s   &,r   r9   Divergence.doitJ   s    $**400r   r!   Nr?   rG   s   @r   rJ   rJ   5   s     1 1r   rJ   c                   0   a  ] tR t^Nt o RtR tR tRtV tR# )Curlz
Represents unevaluated Curl.

Examples
========

>>> from sympy.vector import CoordSys3D, Curl
>>> R = CoordSys3D('R')
>>> v = R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k
>>> Curl(v)
Curl(R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k)

c                T    \        V4      p\        P                  ! W4      pWn        V# r   r.   r1   s   && r   r/   Curl.__new__]   r5   r   c                0    \        V P                  R R7      # r7   )curlr0   r;   s   &,r   r9   	Curl.doitc   s    DJJT**r   r!   Nr?   rG   s   @r   rQ   rQ   N   s     + +r   rQ   c           	       a \        V 4      p\        V4      ^ 8X  d   \        P                  # \        V4      ^8X  Edw   \	        \        V4      4      pVP                  4       w  r4pVP                  4       w  rgpVP                  4       w  rpV P                  V4      pV P                  V4      pV P                  V4      p\        P                  pV\        W,          V4      \        W,          V4      ,
          V,          W,          ,          ,          pV\        W,          V4      \        W,          V4      ,
          V,          W,          ,          ,          pV\        W,          V4      \        W,          V4      ,
          V,          W,          ,          ,          pS'       d   VP                  4       # V# \        V \        \        34      '       d`   ^ RIHp  \	        \        V4      4      pV P"                   Uu. uF  pV! VVRR7      NK  	  pp\        P&                  ! V3R lV 4       4      # \        V \(        \*        34      '       d   V P"                   Uu. uF(  p\        V\        \,        \.        34      '       g   K&  VNK*  	  up^ ,          p\(        P&                  ! R V P"                   4       4      p\-        \1        V4      V4      P                  4       V\3        VSR7      ,          ,           pS'       d   VP                  4       # V# \        V \,        \4        \.        34      '       d   \5        V 4      # \%        R4      hu upi   \$         d    T P"                  p ELUi ; iu upi )a  
Returns the curl of a vector field computed wrt the base scalars
of the given coordinate system.

Parameters
==========

vect : Vector
    The vector operand

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, curl
>>> R = CoordSys3D('R')
>>> v1 = R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k
>>> curl(v1)
0
>>> v2 = R.x*R.y*R.z*R.i
>>> curl(v2)
R.x*R.y*R.j + (-R.x*R.z)*R.k

expressT	variablesc              3   >   <"   T F  p\        VSR 7      x  K  	  R# 5ir8   N)rU   .0r   r9   s   & r   	<genexpr>curl.<locals>.<genexpr>   s     %G$Qd14&8&8$   c              3   l   "   T F*  p\        V\        \        \        34      '       d   K&  Vx  K,  	  R # 5ir   r   r   r   r,   r_   r   s   & r   r`   ra      $     !gYjVUZ\dLe>f!!Y   #4
4r8   zInvalid argument for curl)r   lenr   zeronextiterbase_vectorsbase_scalarslame_coefficientsdotr   r9   r   r   r
   sympy.vectorrY   r&   
ValueErrorfromiterr   r	   r   r,   r:   rU   rQ   )vectr9   	coord_sysr   jkxyzh1h2h3vectxvectyvectzoutvecrY   csr&   vectorscalarress   &f                    r   rU   rU   g   s   < #4(I
9~{{	Y1	i)	((*a((*a002
:ej!,ej!,-01257W> 	>:ej!,ej!,-01257W> 	>:ej!,ej!,-01257W> 	> ;;= dS),--,!$y/*@D		J	126	J %%%G$%GGGsI.//!%WAjVUH<U.VaaWXYZF\\!gTYY!ggF(&16686$vTXBY;YYCxxz!JudH566:899 K !yy! Xs0   "M
 9MM
 #M(M(M
 
M%$M%c           	       a \        V 4      p\        V4      ^ 8X  d   \        P                  # \        V4      ^8X  Ed3   \	        V \
        \        \        34      '       d   \        V 4      # \        \        V4      4      pVP                  4       w  r4pVP                  4       w  rgpVP                  4       w  rp\        V P                  V4      WjV4      W,          V,          ,          p\        V P                  V4      W{V	4      W,          V,          ,          p\        V P                  V4      WV
4      W,          V,          ,          pW,           V,           pS'       d   VP!                  4       # V# \	        V \"        \$        34      '       d+   \"        P&                  ! V3R lV P(                   4       4      # \	        V \*        \,        34      '       d   V P(                   Uu. uF(  p\	        V\.        \
        \        34      '       g   K&  VNK*  	  up^ ,          p\*        P&                  ! R V P(                   4       4      p\1        V\3        V4      4      V\5        VSR7      ,          ,           pS'       d   VP!                  4       # V# \	        V \
        \        \        34      '       d   \        V 4      # \7        R4      hu upi )a+  
Returns the divergence of a vector field computed wrt the base
scalars of the given coordinate system.

Parameters
==========

vector : Vector
    The vector operand

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, divergence
>>> R = CoordSys3D('R')
>>> v1 = R.x*R.y*R.z * (R.i+R.j+R.k)

>>> divergence(v1)
R.x*R.y + R.x*R.z + R.y*R.z
>>> v2 = 2*R.y*R.z*R.j
>>> divergence(v2)
2*R.z

c              3   >   <"   T F  p\        VSR 7      x  K  	  R# 5ir]   )rN   r^   s   & r   r`   divergence.<locals>.<genexpr>   s     L)Q
14 8 8)rb   c              3   l   "   T F*  p\        V\        \        \        34      '       d   K&  Vx  K,  	  R # 5ir   rd   re   s   & r   r`   r      rf   rg   r8   zInvalid argument for divergence)r   rh   r   Zeror   r   rQ   r,   rJ   rj   rk   rl   rm   rn   _diff_conditionalro   r9   r   r
   rr   r&   r   r	   r   r   r:   rN   rq   )rs   r9   rt   r   ru   rv   rw   rx   ry   rz   r{   r|   vxvyvzr   r   r   s   &f                r   rN   rN      s   < #4(I
9~vv	Y1	dUD(344d##i)	((*a((*a002
txx{A26"txx{A26"txx{A26"gl88:
dS),--<<L$))LLLsI.//!%WAjVUH<U.VaaWXYZF\\!gTYY!ggFfhv./&FQU9V2VVCxxz!JudH566d##>?? Xs    #J>J>c                d  a  \        S 4      p\        V4      ^ 8X  d   \        P                  # \        V4      ^8X  d   \	        \        V4      4      pVP                  4       w  r4pVP                  4       w  rgpVP                  4       w  rp\        S V	4      V,          p\        S V
4      V,          p\        S V4      V,          pV'       d1   W,          W,          ,           W,          ,           P                  4       # W,          W,          ,           W,          ,           # \        S \        \        34      '       d(   \        P                  ! R S P                   4       4      # \        S \         \"        34      '       d,   \%        S 4      p\        P                  ! V 3R lV 4       4      # \'        S 4      # )a_  
Returns the vector gradient of a scalar field computed wrt the
base scalars of the given coordinate system.

Parameters
==========

scalar_field : SymPy Expr
    The scalar field to compute 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, gradient
>>> R = CoordSys3D('R')
>>> s1 = R.x*R.y*R.z
>>> gradient(s1)
R.y*R.z*R.i + R.x*R.z*R.j + R.x*R.y*R.k
>>> s2 = 5*R.x**2*R.z
>>> gradient(s2)
10*R.x*R.z*R.i + 5*R.x**2*R.k

c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   r:   re   s   & r   r`   gradient.<locals>.<genexpr>$  s     %M;Lahqkk;Ls   c              3   V   <"   T F  pSV,          \        V4      ,          x  K   	  R # 5ir   r   )r_   r   scalar_fields   & r   r`   r   '  s"     %PalQ&6!&D&Das   &))r   rh   r   ri   rj   rk   rn   rl   rm   r   r9   r   r   r
   rr   r&   r   r	   r*   r,   )r   r9   rt   rz   r{   r|   r   ru   rv   rw   rx   ry   r   r   r   ss   f&              r   r:   r:      sK   : #<0I
9~{{	Y1	i)	002
((*a((*aa(2-a(2-a(2-FRVObf,2244v''lS)$455%%%M<;L;L%MMMlS)$455,\:A%%%Pa%PPP%%r   c                   0   a  ] tR tRt o RtR tR tRtV tR# )	Laplaciani+  z
Represents unevaluated Laplacian.

Examples
========

>>> from sympy.vector import CoordSys3D, Laplacian
>>> R = CoordSys3D('R')
>>> v = 3*R.x**3*R.y**2*R.z**3
>>> Laplacian(v)
Laplacian(3*R.x**3*R.y**2*R.z**3)

c                T    \        V4      p\        P                  ! W4      pWn        V# r   r.   r1   s   && r   r/   Laplacian.__new__:  r5   r   c                2    ^ RI Hp V! V P                  4      # )r   )	laplacian)sympy.vector.functionsr   r0   )r<   r=   r   s   &, r   r9   Laplacian.doit@  s    4$$r   r!   Nr?   rG   s   @r   r   r   +  s     % %r   r   c                    ^ RI Hp V! WP                  RR7      pW#,          V,          pV'       d   \        Wa4      # \        P
                  # )z
First re-expresses expr in the system that base_scalar belongs to.
If base_scalar appears in the re-expressed form, differentiates
it wrt base_scalar.
Else, returns 0
rX   TrZ   )r   rY   systemr   r   r   )r   base_scalarcoeff_1coeff_2rY   new_exprargs   &&&&   r   r   r   E  s<     /t//4@H

h
&C+.:c':AFF:r   )T)r$   sympy.core.exprr   
sympy.corer   r   r   sympy.vector.coordsysrectr   sympy.vector.vectorr   r	   r
   r   r   sympy.core.functionr   sympy.core.addr   sympy.core.mulr   r   r*   r,   rJ   rQ   rU   rN   r:   r   r   r!   r   r   <module>r      sw       5 5 0 H H *  /t /21 12+4 +2H:V@@F3&l% %4
;r   