00001 subroutine poisson_solver_binary_bhex_homosol(sou,sou_exsurf,dsou_exsurf, &
00002 & sou_insurf,dsou_insurf, &
00003 & sou_outsurf,dsou_outsurf,pot)
00004 use phys_constant, only : long
00005 use grid_parameter, only : nrg, npg, ntg
00006 use make_array_3d
00007 use interface_poisson_solver_binary_vol_int
00008 use interface_poisson_solver_binary_surf_int
00009 use interface_poisson_solver_bhex_surf_int
00010 use interface_sourceterm_surface_int_homosol
00011 use interface_copy_to_hgfn_and_gfnsf
00012 implicit none
00013 real(long), pointer :: pot(:,:,:), sou(:,:,:)
00014 real(long), pointer :: sou_exsurf(:,:), dsou_exsurf(:,:)
00015 real(long), pointer :: sou_insurf(:,:), dsou_insurf(:,:)
00016 real(long), pointer :: sou_outsurf(:,:), dsou_outsurf(:,:)
00017 real(long), pointer :: sou_iosurf(:,:,:)
00018 real(long), pointer :: pot_vol(:,:,:), pot_exsurf(:,:,:)
00019 real(long), pointer :: pot_insurf(:,:,:), pot_outsurf(:,:,:)
00020 real(long), pointer :: pot_integrals(:,:,:)
00021
00022 call alloc_array3d(pot_vol,0,nrg,0,ntg,0,npg)
00023 call alloc_array3d(pot_exsurf,0,nrg,0,ntg,0,npg)
00024 call alloc_array3d(pot_insurf,0,nrg,0,ntg,0,npg)
00025 call alloc_array3d(pot_outsurf,0,nrg,0,ntg,0,npg)
00026 call alloc_array3d(pot_integrals,0,nrg,0,ntg,0,npg)
00027 call alloc_array3d(sou_iosurf,0,ntg,0,npg,1,4)
00028
00029
00030 call poisson_solver_binary_vol_int(sou,pot_vol)
00031 call poisson_solver_binary_surf_int(sou_exsurf,dsou_exsurf,pot_exsurf)
00032 sou_iosurf(1:ntg,1:npg,3) = dsou_outsurf(1:ntg,1:npg)
00033 sou_iosurf(1:ntg,1:npg,4) = sou_outsurf(1:ntg,1:npg)
00034 call poisson_solver_bhex_surf_int('ou',sou_iosurf,pot_outsurf)
00035 pot_integrals(0:nrg,0:ntg,0:npg) = pot_vol(0:nrg,0:ntg,0:npg) &
00036 & + pot_exsurf(0:nrg,0:ntg,0:npg) &
00037 & + pot_outsurf(0:nrg,0:ntg,0:npg)
00038
00039 call sourceterm_surface_int_homosol(pot_integrals,0,sou_insurf,dsou_insurf)
00040 sou_iosurf(1:ntg,1:npg,1) = dsou_insurf(1:ntg,1:npg)
00041 sou_iosurf(1:ntg,1:npg,2) = sou_insurf(1:ntg,1:npg)
00042 call poisson_solver_bhex_surf_int('in',sou_iosurf,pot_insurf)
00043 pot(0:nrg,0:ntg,0:npg) = pot_integrals(0:nrg,0:ntg,0:npg) &
00044 & + pot_insurf(0:nrg,0:ntg,0:npg)
00045
00046 deallocate(pot_vol)
00047 deallocate(pot_exsurf)
00048 deallocate(pot_insurf)
00049 deallocate(pot_outsurf)
00050 deallocate(pot_integrals)
00051 deallocate(sou_iosurf)
00052
00053 end subroutine poisson_solver_binary_bhex_homosol