From 4c4b501612d9ae82cf6ab7a10be79114c16057d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=96=B0=E5=AE=87?= Date: Tue, 18 Aug 2026 18:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=A4=E5=A4=84?= =?UTF-8?q?=E4=B8=8D=E4=B8=A5=E8=B0=A8=E7=9A=84=E5=9C=B0=E6=96=B9=EF=BC=8C?= =?UTF-8?q?gfortran=E7=8E=AF=E5=A2=83=E4=B8=8B=E4=BC=9Awarning=EF=BC=8C1?= =?UTF-8?q?=EF=BC=9Aget=5Fnon=5Funiformgrid.f90=E4=B8=AD=EF=BC=8CIF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=B8=ADIF(SourceLength/GridSize.gt.51)?= =?UTF-8?q?=E6=94=B9SourceLength/GridSize=E4=B8=BA=E6=95=B4=E5=9E=8BSource?= =?UTF-8?q?GridNum=EF=BC=9B2=EF=BC=9A=E6=9B=BF=E6=8D=A2=E6=97=A7=E5=86=99?= =?UTF-8?q?=E6=B3=95PAUSE=E8=AF=AD=E5=8F=A5=E4=B8=BAREAD(*,*)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tem3dfdtd/lib/get_non_uniformgrid.f90 | 32 +++++++++++++-------------- tem3dfdtd/lib/time-serious.f90 | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tem3dfdtd/lib/get_non_uniformgrid.f90 b/tem3dfdtd/lib/get_non_uniformgrid.f90 index 69ede10..85b7726 100644 --- a/tem3dfdtd/lib/get_non_uniformgrid.f90 +++ b/tem3dfdtd/lib/get_non_uniformgrid.f90 @@ -30,17 +30,17 @@ SUBROUTINE GET_NON_UNIFORMGRID ! ----------------------------end of mesh------------------------------------! ! -------------------------------mesh x----------------------------------------! IF(Logi_Sourcelenth) THEN !The number of grids occupied by the source is odd - if(SourceLength/GridSize.gt.51)then - do ii=nxs-(SourceLength/GridSize-1)/2,nxs+(SourceLength/GridSize-1)/2,1 + if(SourceGridNum.gt.51)then + do ii=nxs-(SourceGridNum-1)/2,nxs+(SourceGridNum-1)/2,1 Cdelx(ii)=GridSize end do - do ii=nxs-(SourceLength/GridSize-1)/2-1,1,-1 + do ii=nxs-(SourceGridNum-1)/2-1,1,-1 Cdelx(ii)=Cdelx(ii+1)*scale_par if(Cdelx(ii).gt.GridSize_MAX)then Cdelx(ii)=GridSize_MAX end if end do - do ii=nxs+(SourceLength/GridSize-1)/2+1,nx,1 + do ii=nxs+(SourceGridNum-1)/2+1,nx,1 Cdelx(ii)=Cdelx(ii-1)*scale_par if(Cdelx(ii).gt.GridSize_MAX)then Cdelx(ii)=GridSize_MAX @@ -64,17 +64,17 @@ SUBROUTINE GET_NON_UNIFORMGRID end do ENDIF ELSE !The number of grids occupied by the source is even - if(SourceLength/GridSize.gt.51)then - do ii=nxs-(SourceLength/GridSize-1)/2,nxs+1+(SourceLength/GridSize-1)/2,1 + if(SourceGridNum.gt.51)then + do ii=nxs-(SourceGridNum-1)/2,nxs+1+(SourceGridNum-1)/2,1 Cdelx(ii)=GridSize end do - do ii=nxs-(SourceLength/GridSize-1)/2-1,1,-1 + do ii=nxs-(SourceGridNum-1)/2-1,1,-1 Cdelx(ii)=Cdelx(ii+1)*scale_par if(Cdelx(ii).gt.GridSize_MAX)then Cdelx(ii)=GridSize_MAX end if end do - do ii=nxs+(SourceLength/GridSize-1)/2+2,nx,1 + do ii=nxs+(SourceGridNum-1)/2+2,nx,1 Cdelx(ii)=Cdelx(ii-1)*scale_par if(Cdelx(ii).gt.GridSize_MAX)then Cdelx(ii)=GridSize_MAX @@ -101,17 +101,17 @@ SUBROUTINE GET_NON_UNIFORMGRID ! -----------------------------end of mesh------------------------------------! ! --------------------------------mesh y----------------------------------------! IF(Logi_Sourcelenth) THEN !The number of grids occupied by the source is odd - IF(SourceLength/GridSize.gt.51)then - do ii=nys-(SourceLength/GridSize-1)/2,nys+(SourceLength/GridSize-1)/2,1 + IF(SourceGridNum.gt.51)then + do ii=nys-(SourceGridNum-1)/2,nys+(SourceGridNum-1)/2,1 Cdely(ii)=GridSize enddo - do ii=nys-(SourceLength/GridSize-1)/2-1,1,-1 + do ii=nys-(SourceGridNum-1)/2-1,1,-1 Cdely(ii)=Cdely(ii+1)*scale_par if(Cdely(ii).gt.GridSize_MAX)then Cdely(ii)=GridSize_MAX end if end do - do ii=nys+(SourceLength/GridSize-1)/2+1,ny,1 + do ii=nys+(SourceGridNum-1)/2+1,ny,1 Cdely(ii)=Cdely(ii-1)*scale_par if(Cdely(ii).gt.GridSize_MAX)then Cdely(ii)=GridSize_MAX @@ -135,17 +135,17 @@ SUBROUTINE GET_NON_UNIFORMGRID end do end if ELSE !The number of grids occupied by the source is even - IF(SourceLength/GridSize.gt.51)then - do ii=nys-(SourceLength/GridSize-1)/2,nys+1+(SourceLength/GridSize-1)/2,1 + IF(SourceGridNum.gt.51)then + do ii=nys-(SourceGridNum-1)/2,nys+1+(SourceGridNum-1)/2,1 Cdely(ii)=GridSize enddo - do ii=nys-(SourceLength/GridSize-1)/2-1,1,-1 + do ii=nys-(SourceGridNum-1)/2-1,1,-1 Cdely(ii)=Cdely(ii+1)*scale_par if(Cdely(ii).gt.GridSize_MAX)then Cdely(ii)=GridSize_MAX end if end do - do ii=nys+(SourceLength/GridSize-1)/2+2,ny,1 + do ii=nys+(SourceGridNum-1)/2+2,ny,1 Cdely(ii)=Cdely(ii-1)*scale_par if(Cdely(ii).gt.GridSize_MAX)then Cdely(ii)=GridSize_MAX diff --git a/tem3dfdtd/lib/time-serious.f90 b/tem3dfdtd/lib/time-serious.f90 index e150da7..5554b8d 100644 --- a/tem3dfdtd/lib/time-serious.f90 +++ b/tem3dfdtd/lib/time-serious.f90 @@ -62,7 +62,7 @@ SUBROUTINE TIME_SERIOUS WRITE(10005,*)'The number of iteration steps exceeds the range given in the input.dat, please change it. now the Nstop value is determined by Max_off_time.' print*,'The number of iteration steps exceeds the range given in the input.dat, please change it. now the Nstop value is determined by Max_off_time.' print*,'I give you a pause here, you should decide to continue or to quit' - pause + READ(*,*) Nstop=Nstop_temp ENDIF RETURN