声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3216|回复: 1

[Fortran] about hankel function

[复制链接]
发表于 2005-8-28 16:56 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
<P>1由于国内常见的fortran程序集合中没有直接关于hankel 函数的,且IMSL 函数中也只有<BR>bessel 函数,希望下面的小程序对大家有一点帮助。<BR>2。是基于bessel 的IMSL 函数的<BR><BR>3。subroutine hankel(order,class,x,res)<BR> <BR> !  Function: Compute the hankel function values <BR> !   <BR> !  Note:<BR> !<BR> !  This is a very useful subroutine,for that in IMSL<BR> !  the hankel function is not provided directly.  <BR> !  The bessel function in IMsl LIBARY is not very good<BR> !  when CLASS=3 WHICH REPRENTS THE FIRST  KIND BESSEL FUNCTION<BR> !  when class=4 WHICH REPRENTS THE second KIND BESSEL FUNCTION <BR> !<BR> ! Input:<BR> !    <BR> !      order-------- the order number describing the hankel's function  <BR> !      class-------- the hankel fuction's classfication <BR> !      x    ---------the  variable (real)   <BR> !<BR> ! Output:<BR> !      res --------- the results (complex)<BR> !<BR> !         <BR>        <BR>       Implicit  None<BR>    <BR>    Integer order,N        !the order number requried for computation <BR>    Integer class        !the kind number<BR>    <BR>    Real  x,CBS1(order+1),CBS2(order+1) !argument x                <BR>       complex  res,i </P>
<P>!--------------------------------------------------------------------</P>
<P>    i=(0,1)      ! the false root<BR>    N=order+1           ! in order compute the order-th results</P>
<P>    Call BSJNS(x,N,CBS1)<BR>    Call BSYS(0.0,x,N,CBS2)  </P>
<P>!--------------------------------------------------------------------</P>
<P>       If(class==1)Then</P>
<P>   res=CBS1(N)+i*(CBS2(N))     !the first kind hankel function<BR>       <BR>    Else if(class==2) then<BR>         <BR>    res=CBS1(N)-i*(CBS2(N)) !the second kind hankel function<BR>    <BR>    Else if(class==3) then  !the REPRENTS THE FIRST  KIND BESSEL FUNCTION<BR>        <BR>    res=CBS1(N)+i*0.0</P>
<P>    Else if(class==4) then  ! the REPRENTS THE Second KIND BESSEL FUNCTION<BR>        <BR>    res=CBS2(N)+i*0.0<BR>     <BR>  Else<BR>            <BR>   write(*,*) 'the order num is illegal'<BR>  <BR>   stop <BR>     <BR>    End if<BR> <BR> End subroutine </P>
回复
分享到:

使用道具 举报

发表于 2005-8-28 20:16 | 显示全部楼层

回复:(xj2070)about hankel function

<P>谢谢搂主,希望搂住以后能提供更多的好东西</P>
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-14 04:14 , Processed in 0.054053 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表