Question: Error, unterminated loop

Hello,

How me can write a code for teh determination of Laplacian in a new form dat is introduced in teh maple code (First line).

Thank you.

FOR2.mw
 

``

"L:=(∑)`e__i`/(`h__i`)*(∂)/(∂ `xi__i`).((∑)(∑)`e__k`/(`h__k`)((∂)/(∂ `xi__k`)`U__j`*`e__j`+`U__j`(∂)/( `xi__k`)`U__j`)):"

restart; with(VectorCalculus); with(LinearAlgebra); h__1 := VectorCalculus:-`*`(a, 1/cosh(r)); h__2 := VectorCalculus:-`*`(a, 1/cosh(r)); h__3 := VectorCalculus:-`*`(sinh(r), 1/cos(theta)); U__1 := u__r; U__2 := `u__θ`; U__3 := `u__φ`

"for i from 1 to 3 do  for j from 1 to 3 do  for k  from 1 to 3 do     if i=1 then   `h__i`:=a/(cosh(r)-cos(theta)); `U__i`:=`u__r`;`e__i`:=`e__r`:`xi__i`:=r:     else  if i=2 then  `h__i`:=a/(cosh(r)-cos(theta));`U__i`:=`u__theta`;`e__i`:=`e__theta`:`xi__i`:=theta:  else ;   `h__i`:=a/(cosh(r)-cos(theta));`U__i`:=`u__phi`;`e__i`:=`e__phi`:`xi__i`:=phi:  end if;          if  j=1 then ;  `h__j`:=a/(cosh(r)-cos(theta)); `U__j`:=`u__r`;`e__j`:=`e__r`:`xi__j`:=r:   else if  j=2 then;  `h__j`:=a/(cosh(r)-cos(theta));`U__j`:=`u__theta`;`e__j`:=`e__theta`:`xi__j`:=theta:  else ;   `h__j`:=a/(cosh(r)-cos(theta));`U__j`:=`u__phi`;`e__j`:=`e__phi`:`xi__j`:=phi:  end if;       if k=1 then   `h__k`:=a/(cosh(r)-cos(theta)); `U__k`:=`u__r`;`e__k`:=`e__r`:`xi__k`:=r:   else if i=2 then  `h__k`:=a/(cosh(r)-cos(theta));`U__k`:=`u__theta`;`e__k`:=`e__theta`:`xi__k`:=theta:  else     `h__k`:=a/(cosh(r)-cos(theta));`U__k`:=`u__phi`;`e__k`:=`e__phi`:`xi__k`:=phi:  end if;                   end ;  end ;         end ;               "

Error, unterminated loop

"for i from 1 to 3 do  for j from 1 to 3 do  for k  from 1 to 3 do    if i=1 then `h__i`:=a/(cosh(r)-cos(theta)); `U__i`:=`u__r`;`e__i`:=`e__r`:xi__i:=r:     else  if i=2 then  `h__i`:=a/(cosh(r)-cos(theta));`U__i`:=`u__theta`;`e__i`:=`e__theta`:xi__i:=theta:  else ;   `h__i`:=a/(cosh(r)-cos(theta));`U__i`:=`u__phi`;`e__i`:=`e__phi`:xi__i:=phi:  end if;       if j=1 then ;  `h__j`:=a/(cosh(r)-cos(theta)); `U__j`:=`u__r`;`e__j`:=`e__r`:xi__j:=r:   else if j=2 then;  `h__j`:=a/(cosh(r)-cos(theta));`U__j`:=`u__theta`;`e__j`:=`e__theta`:xi__j:=theta:  else ;   `h__j`:=a/(cosh(r)-cos(theta));`U__j`:=`u__phi`;`e__j`:=`e__phi`:xi__j:=phi:  end if;     if k=1 then `h__k`:=a/(cosh(r)-cos(theta)); `U__k`:=`u__r`;`e__k`:=`e__r`:xi__k:=r:   else if i=2 then  `h__k`:=a/(cosh(r)-cos(theta));`U__k`:=`u__theta`;`e__k`:=`e__theta`:xi__k:=theta:  else `h__k`:=a/(cosh(r)-cos(theta));`U__k`:=`u__phi`;`e__k`:=`e__phi`:xi__k:=phi:  end if;           end ;  end ;     end ;               "

 

i

i

(1)

j

j

(2)

``


 

Download FOR2.mw

 

 

Please Wait...