!**************************************************************************** ! 磁界の計算 !**************************************************************************** subroutine magnetic_field use fdtd implicit none integer :: i,j,id ! Hz do j=1,ny do i=1,nx id=media_id(i,j) if(id.eq.1) then ! 1: 自由空間 hz(i,j)=hz(i,j) & -chzrx0*(ey(i+1,j)-ey(i,j)) & +chzry0*(ex(i,j+1)-ex(i,j)) else if(id.eq.2) then ! 2: 完全導体 hz(i,j)=0.0d0 else ! 3以上: 任意媒質 hz(i,j)=hz(i,j) & -chzrx(id)*(ey(i+1,j)-ey(i,j)) & +chzry(id)*(ex(i,j+1)-ex(i,j)) end if end do end do return end subroutine ! ! End of file !