00001 subroutine compute_dBfun(Bfun,dBfundx,dBfundy,dBfundz)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrg, ntg, npg
00004 use interface_grgrad_4th_gridpoint
00005 implicit none
00006 real(long) :: dBdx, dBdy, dBdz
00007 real(long), pointer :: Bfun(:,:,:), dBfundx(:,:,:), dBfundy(:,:,:), dBfundz(:,:,:)
00008 integer :: irg, itg, ipg
00009
00010 do ipg = 0, npg
00011 do itg = 0, ntg
00012 do irg = 0, nrg
00013 call grgrad_4th_gridpoint(Bfun,dBdx,dBdy,dBdz,irg,itg,ipg)
00014 dBfundx(irg,itg,ipg) = dBdx
00015 dBfundy(irg,itg,ipg) = dBdy
00016 dBfundz(irg,itg,ipg) = dBdz
00017 end do
00018 end do
00019 end do
00020
00021 end subroutine compute_dBfun