00001 subroutine poisson_solver_binary(sou,sou_surf,dsou_surf,pot)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrg, npg, ntg
00004 use make_array_3d
00005 use interface_poisson_solver_binary_surf_int
00006 use interface_poisson_solver_binary_vol_int
00007 implicit none
00008 real(long), pointer :: pot(:,:,:), sou(:,:,:)
00009 real(long), pointer :: sou_surf(:,:), dsou_surf(:,:)
00010 real(long), pointer :: pot_vol(:,:,:), pot_surf(:,:,:)
00011
00012 call alloc_array3d(pot_vol,0,nrg,0,ntg,0,npg)
00013 call alloc_array3d(pot_surf,0,nrg,0,ntg,0,npg)
00014
00015 call poisson_solver_binary_vol_int(sou,pot_vol)
00016 call poisson_solver_binary_surf_int(sou_surf,dsou_surf,pot_surf)
00017 pot(0:nrg,0:ntg,0:npg) = &
00018 & pot_vol(0:nrg,0:ntg,0:npg) + pot_surf(0:nrg,0:ntg,0:npg)
00019
00020 deallocate(pot_vol)
00021 deallocate(pot_surf)
00022
00023 end subroutine poisson_solver_binary