K iw :ddlmZddlmZmZmZGddeZy))Basic)gradient divergencecurlceZdZdZfdZddZeZeje_ddZeZeje_ddZ e Z e je _dZ xZ S)Delz Represents the vector differential operator, usually represented in mathematical expressions as the 'nabla' symbol. c4t||}d|_|S)Ndelop)super__new___name)clsobj __class__s ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/vector/deloperator.pyr z Del.__new__ sgoc"  ct||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_fieldrs rrz Del.gradients: 400rct||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)rrvectrs rdotzDel.dot2s:$T**rct||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)rrs rcrossz Del.crossTs>Dt$$rc|jS)N)r )rprinters r _sympystrz Del._sympystrxs zzr)F) __name__ __module__ __qualname____doc__r r__call__r__and__r__xor__r __classcell__)rs@rrrs[  1>H''H+>GkkGO%BGmmGOrrN) sympy.corersympy.vector.operatorsrrrrrrr,s==t%tr