create_grid.F90
917 Bytes
! Create a uniform grid which is used to model circular conductors
conductor_data(conductor)%nxmax=NINT(conductor_data(conductor)%grid_dim/conductor_data(conductor)%dl)+1
conductor_data(conductor)%nxmin=-conductor_data(conductor)%nxmax
conductor_data(conductor)%nymax=conductor_data(conductor)%nxmax
conductor_data(conductor)%nymin=conductor_data(conductor)%nxmin
nxmin=conductor_data(conductor)%nxmin
nxmax=conductor_data(conductor)%nxmax
nymin=conductor_data(conductor)%nymin
nymax=conductor_data(conductor)%nymax
write(*,*)'Create grid: nxmax=',nxmax,' nymax=',nymax
ALLOCATE( conductor_data(conductor)%grid(nxmin:nxmax,nymin:nymax) )
ALLOCATE( conductor_data(conductor)%depth(nxmin:nxmax,nymin:nymax) )
! Reset the grid
conductor_data(conductor)%grid(nxmin:nxmax,nymin:nymax)=0
conductor_data(conductor)%depth(nxmin:nxmax,nymin:nymax)=0.0