00001 subroutine helmholtz_solver_asymptotic_patch_homosol &
00002 & (sou,sou_insurf,dsou_insurf,pot)
00003 use phys_constant, only : long
00004 use grid_parameter, only : nrg, npg, ntg
00005 use def_matter_parameter, only : ome
00006 use make_array_2d
00007 use make_array_3d
00008 use radial_green_fn_hrethadv
00009 use radial_green_fn_hrethadv_homosol
00010 use interface_sourceterm_surface_int
00011 use interface_sourceterm_surface_int_homosol
00012 use interface_copy_to_bsjy_and_sbsjy
00013 use interface_helmholtz_solver_vol_int
00014 use interface_helmholtz_solver_surf_int
00015 use interface_helmholtz_solver_outer_surf_int
00016 implicit none
00017 real(long), pointer :: pot(:,:,:), sou(:,:,:)
00018 real(long), pointer :: sou_insurf(:,:), dsou_insurf(:,:)
00019 real(long), pointer :: sou_outsurf(:,:), dsou_outsurf(:,:)
00020 real(long), pointer :: pot_vol(:,:,:)
00021 real(long), pointer :: pot_insurf(:,:,:), pot_outsurf(:,:,:)
00022 real(long), pointer :: pot_integrals(:,:,:)
00023
00024 call alloc_array2d(sou_outsurf,0,ntg,0,npg)
00025 call alloc_array2d(dsou_outsurf,0,ntg,0,npg)
00026
00027 call alloc_array3d(pot_vol,0,nrg,0,ntg,0,npg)
00028 call alloc_array3d(pot_insurf,0,nrg,0,ntg,0,npg)
00029 call alloc_array3d(pot_outsurf,0,nrg,0,ntg,0,npg)
00030 call alloc_array3d(pot_integrals,0,nrg,0,ntg,0,npg)
00031
00032 call calc_radial_green_fn_hrethadv(ome)
00033 call copy_to_bsjy_and_sbsjy(bsjy_hrha,sbsjy_hrha,sbsjyp_hrha)
00034 call helmholtz_solver_vol_int(sou,pot_vol)
00035
00036 pot_integrals(0:nrg,0:ntg,0:npg) = pot_vol(0:nrg,0:ntg,0:npg)
00037
00038
00039 call sourceterm_surface_int_homosol(pot_integrals,0,sou_insurf,dsou_insurf)
00040 call calc_radial_green_fn_hrethadv_homosol(ome,'dh')
00041 call copy_to_bsjy_and_sbsjy(bsjy_hrha,sbsjy_hrha_ho,sbsjyp_hrha_ho)
00042 call helmholtz_solver_surf_int(sou_insurf,dsou_insurf,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(sou_outsurf)
00047 deallocate(dsou_outsurf)
00048
00049 deallocate(pot_vol)
00050 deallocate(pot_insurf)
00051 deallocate(pot_outsurf)
00052 deallocate(pot_integrals)
00053
00054 end subroutine helmholtz_solver_asymptotic_patch_homosol