!=============================================================================================
! Project name: emtws01_test
! Project version: 1.0.0.4
!---------------------------------------------------------------------------------------------
! Generated by Aqualis (algorithm and equation analyzer for lightwave simulation)
! Aqualis version: 186.0.3.0
! Generated date: 2026/04/11 14:07:30
!=============================================================================================
program emtws01_test
implicit none
complex(kind(0d0)) :: uj=(0d0,1d0)
integer :: i
integer :: j
integer :: i0001
integer :: i0002
integer :: i0003
complex(kind(0d0)) :: z0001
integer,allocatable :: i1001(:)
integer :: i1001_size(1:1) = (/ -1 /)
complex(kind(0d0)),allocatable :: z1001(:)
integer :: z1001_size(1:1) = (/ -1 /)
complex(kind(0d0)),allocatable :: z2001(:,:)
integer :: z2001_size(1:2) = (/ -1,-1 /)
z2001_size(1) = 4
z2001_size(2) = 4
allocate(z2001(1:z2001_size(1),1:z2001_size(2)))
z1001_size(1) = 4
allocate(z1001(1:z1001_size(1)))
do i=0,z2001_size(1)-1
  do j=0,z2001_size(2)-1
    !ハンケル関数計算テスト
    z0001 = dbesj0(1.0d-1*(i+2*j+1))-dbesy0(1.0d-1*(i+2*j+1))*uj
    z2001(i+1,j+1) = z0001
  end do
end do
z1001=0
do i=0,z1001_size(1)-1
  do i0001=0,z2001_size(2)-1
    z1001(i+1) = z1001(i+1)+z2001(i+1,i0001+1)*i0001
  end do
end do
i0001 = z2001_size(1)
i0002 = 1
i1001_size(1) = i0001
allocate(i1001(1:i1001_size(1)))
call zgesv(i0001,i0002,z2001,i0001,i1001,z1001,i0001,i0003)
i1001_size(1) = -1
deallocate(i1001)
do i=0,z1001_size(1)-1
  print *, real(z1001(i+1)),aimag(z1001(i+1))
end do
z1001_size(1) = -1
deallocate(z1001)
z2001_size(1) = -1
z2001_size(2) = -1
deallocate(z2001)
contains
end program emtws01_test
