檢視 Subroutine callspecgen(Annode,x,y,Eg,generation) 的原始碼
←
Subroutine callspecgen(Annode,x,y,Eg,generation)
跳至導覽
跳至搜尋
由於以下原因,您無權編輯此頁面:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
This subroutine is activated by [[$usespecgen]]. Below is an example. Users are free to change the code except the global variables and subroutine interface. This subroutine is saved in libspecgen.f90 <br> module specgenmod use nrtype integer(i8b) :: specgen_Nregion integer(i8b),allocatable :: specgen_type(:) real(dp),allocatable :: specgen_xc(:),specgen_sgx(:) real(dp),allocatable :: specgen_yc(:),specgen_sgy(:) real(dp),allocatable :: specgen_A(:),specgen_B(:) logical :: ifspecgen=.false. end module subroutine callspecgen(Annode,x,y,Eg,generation) use nrtype use global2d use specgenmod implicit none integer(i8b), intent(in) :: Annode real(dp) , intent(inout) :: x(Annode),y(Annode),eg(Annode),generation(Annode) real(dp) :: totalgen integer :: i,j do i=1,Annode totalgen=0.0_dp do j=1,specgen_Nregion if(specgen_type(j)==1) then totalgen=totalgen+specgen_A(j)*exp(-(x(i)-specgen_xc(j))**2/(2*specgen_sgx(j)**2)) & *specgen_B(j) *exp(-(y(i)-specgen_yc(j))**2/(2*specgen_sgy(j)**2)) ! print*,totalgen,j,specgen_xc(j),specgen_xy(j),specgen_xgy(j),specgen_sgx(j) elseif(specgen_type(j)==2) then totalgen=totalgen+specgen_A(j)*exp(-(x(i)-specgen_xc(j))**2/(specgen_sgx(j)**2)) & *specgen_B(j)*((y(i)-specgen_yc(j))**2)*exp(-abs(y(i)-specgen_yc(j))/(specgen_sgy(j))) elseif(specgen_type(j)==3) then totalgen=totalgen+specgen_A(j)*exp(-(y(i)-specgen_yc(j))**2/(specgen_sgy(j)**2)) & *specgen_B(j)*((x(i)-specgen_xc(j))**2)*exp(-abs(x(i)-specgen_xc(j))/(specgen_sgx(j))) end if end do generation(i)=generation(i)+totalgen end do end subroutine
返回到「
Subroutine callspecgen(Annode,x,y,Eg,generation)
」。
導覽選單
個人工具
登入
命名空間
頁面
討論
臺灣正體
視圖
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
MediaWiki說明
工具
連結至此的頁面
相關變更
特殊頁面
頁面資訊