! if (conductor_data(conductor)%auto_grid_density) then ! required_dl=conductor_data(conductor)%skin_depth ! could add reduction factor here e.g. /2.0 ! conductor_data(conductor)%dl=required_dl ! end if 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