00001 subroutine helmholtz_solver_binary_eqm(fnc,sou,pot)
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrg, npg, ntg
00004 use def_matter_parameter, only : ome
00005 use radial_green_fn_hrethadv
00006 use make_array_2d
00007 use make_array_3d
00008 use interface_copy_to_bsjy_and_sbsjy
00009 use interface_sourceterm_exsurf_eqm_binary
00010 use interface_sourceterm_outsurf_eqm_binary
00011 use interface_helmholtz_solver_binary_vol_int
00012 use interface_helmholtz_solver_binary_surf_int
00013 use interface_helmholtz_solver_outer_surf_int
00014 implicit none
00015 real(long), pointer :: pot(:,:,:), sou(:,:,:), fnc(:,:,:)
00016 real(long), pointer :: sou_exsurf(:,:), dsou_exsurf(:,:)
00017 real(long), pointer :: sou_outsurf(:,:), dsou_outsurf(:,:)
00018 real(long), pointer :: pot_vol(:,:,:),pot_exsurf(:,:,:),pot_outsurf(:,:,:)
00019
00020 call alloc_array3d(pot_vol,0,nrg,0,ntg,0,npg)
00021 call alloc_array3d(pot_exsurf,0,nrg,0,ntg,0,npg)
00022 call alloc_array2d(sou_exsurf,0,ntg,0,npg)
00023 call alloc_array2d(dsou_exsurf,0,ntg,0,npg)
00024 call alloc_array3d(pot_outsurf,0,nrg,0,ntg,0,npg)
00025 call alloc_array2d(sou_outsurf,0,ntg,0,npg)
00026 call alloc_array2d(dsou_outsurf,0,ntg,0,npg)
00027
00028 call calc_radial_green_fn_hrethadv(ome)
00029 call copy_to_bsjy_and_sbsjy(bsjy_hrha,sbsjy_hrha,sbsjyp_hrha)
00030 call sourceterm_exsurf_eqm_binary(fnc,sou_exsurf,dsou_exsurf)
00031 call sourceterm_outsurf_eqm_binary(fnc,sou_outsurf,dsou_outsurf)
00032 call helmholtz_solver_binary_vol_int(sou,pot_vol)
00033 call helmholtz_solver_binary_surf_int(sou_exsurf,dsou_exsurf,pot_exsurf)
00034 call helmholtz_solver_outer_surf_int(sou_outsurf,dsou_outsurf,pot_outsurf)
00035 pot(0:nrg,0:ntg,0:npg) = pot_vol(0:nrg,0:ntg,0:npg) &
00036 & + pot_exsurf(0:nrg,0:ntg,0:npg)
00037
00038
00039 deallocate(pot_vol)
00040 deallocate(pot_exsurf)
00041 deallocate(sou_exsurf)
00042 deallocate(dsou_exsurf)
00043 deallocate(pot_outsurf)
00044 deallocate(sou_outsurf)
00045 deallocate(dsou_outsurf)
00046
00047 end subroutine helmholtz_solver_binary_eqm