Question: Curious behavior the convert( V, VectorCalculus) and convert (V,PhysicsVector) functions

Converting a VectorCalculus vector to a PhysicsVectors vector and reconverting it back
to VectorCalculus vector do not return the same result !
is this a bug ? Any clue ?

with(plots):
with(VectorCalculus):
with(Physics[Vectors]):
with(inttrans):
Setup(mathematicalnotation = true):

SetCoordinates('spherical'[r, phi, theta]);
E_[1]:=Vector(<r,phi,theta>);
'VectorCalculus(E_[1])'=type(E_,Vector);
'PhysicsVectors(E_[1])'=type(E_,PhysicsVectors);

Ev_[1]:=convert(E_[1],PhysicsVectors);
'VectorCalculus(Ev_[1])'=type(Ev_,Vector);
'PhysicsVectors(Ev_[1])'=type(Ev_,PhysicsVectors);

E_[2]:=convert(Ev_[1],VectorCalculus);
'E_[2]'<>'E_[1] !';

spherical[r, phi, theta]

 

`#mover(mi("E"),mo("&rarr;"))`[1] := Vector(3, {(1) = r, (2) = phi, (3) = theta}, attributes = [coords = spherical[r, phi, theta]])

 

VectorCalculus(E_[1]) = true

 

PhysicsVectors(E_[1]) = false

 

_phi*phi+_r*r+_theta*theta

 

VectorCalculus(Ev_[1]) = false

 

PhysicsVectors(Ev_[1]) = true

 

`#mover(mi("E"),mo("&rarr;"))`[2] := Vector[row](3, {(1) = r, (2) = theta, (3) = phi}, attributes = [vectorfield, coords = spherical[r, phi, theta]])

 

E_[2] <> factorial(E_[1])

(1)

 


 

Download BugConversion.mw

Please Wait...