00001 subroutine helmholtz_solver_asymptotic_patch_homosol_outgoing &
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_hret_mi_hadv
00010 use radial_green_fn_hrethadv_homosol
00011 use radial_green_fn_hret_mi_hadv_homosol
00012 use interface_sourceterm_surface_int
00013 use interface_sourceterm_surface_int_homosol
00014 use interface_copy_to_bsjy_and_sbsjy
00015 use interface_helmholtz_solver_vol_int
00016 use interface_helmholtz_solver_vol_int_hret_mi_hadv
00017 use interface_helmholtz_solver_surf_int
00018 use interface_helmholtz_solver_surf_int_hret_mi_hadv
00019 use interface_helmholtz_solver_outer_surf_int
00020 implicit none
00021 real(long), pointer :: pot(:,:,:), sou(:,:,:)
00022 real(long), pointer :: sou_insurf(:,:), dsou_insurf(:,:)
00023 real(long), pointer :: sou_outsurf(:,:), dsou_outsurf(:,:)
00024 real(long), pointer :: pot_vol(:,:,:), pot_outsurf(:,:,:)
00025 real(long), pointer :: pot_insurf_hr_pl_ha(:,:,:)
00026 real(long), pointer :: pot_insurf_hr_mi_ha(:,:,:)
00027 real(long), pointer :: pot_integrals(:,:,:)
00028 real(long), pointer :: pot_vol_hret_pl_hadv(:,:,:)
00029 real(long), pointer :: pot_vol_hret_mi_hadv(:,:,:)
00030 integer :: irg, itg, ipg
00031
00032 call alloc_array2d(sou_outsurf,0,ntg,0,npg)
00033 call alloc_array2d(dsou_outsurf,0,ntg,0,npg)
00034
00035 call alloc_array3d(pot_vol,0,nrg,0,ntg,0,npg)
00036 call alloc_array3d(pot_insurf_hr_pl_ha,0,nrg,0,ntg,0,npg)
00037 call alloc_array3d(pot_insurf_hr_mi_ha,0,nrg,0,ntg,0,npg)
00038 call alloc_array3d(pot_outsurf,0,nrg,0,ntg,0,npg)
00039 call alloc_array3d(pot_integrals,0,nrg,0,ntg,0,npg)
00040
00041 call alloc_array3d(pot_vol_hret_pl_hadv,0,nrg,0,ntg,0,npg)
00042 call alloc_array3d(pot_vol_hret_mi_hadv,0,nrg,0,ntg,0,npg)
00043
00044 call calc_radial_green_fn_hrethadv(ome)
00045 call copy_to_bsjy_and_sbsjy(bsjy_hrha,sbsjy_hrha,sbsjyp_hrha)
00046 call helmholtz_solver_vol_int(sou,pot_vol_hret_pl_hadv)
00047 call calc_radial_green_fn_hret_mi_hadv(ome)
00048 call copy_to_bsjy_and_sbsjy(bsjy_hrmiha,sbsjy_hrmiha,sbsjyp_hrmiha)
00049 call helmholtz_solver_vol_int_hret_mi_hadv(sou,pot_vol_hret_mi_hadv)
00050
00051
00052 pot_integrals(0:nrg,0:ntg,0:npg) = pot_vol_hret_pl_hadv(0:nrg,0:ntg,0:npg) &
00053 & + pot_vol_hret_mi_hadv(0:nrg,0:ntg,0:npg)
00054
00055 call sourceterm_surface_int_homosol(pot_integrals,0,sou_insurf,dsou_insurf)
00056 call calc_radial_green_fn_hrethadv_homosol(ome,'dh')
00057 call copy_to_bsjy_and_sbsjy(bsjy_hrha,sbsjy_hrha_ho,sbsjyp_hrha_ho)
00058 call helmholtz_solver_surf_int(sou_insurf,dsou_insurf,pot_insurf_hr_pl_ha)
00059 call calc_radial_green_fn_hret_mi_hadv_homosol(ome,'dh')
00060 call copy_to_bsjy_and_sbsjy(bsjy_hrmiha,sbsjy_hrmiha_ho,sbsjyp_hrmiha_ho)
00061 call helmholtz_solver_surf_int_hret_mi_hadv(sou_insurf,dsou_insurf, &
00062 & pot_insurf_hr_mi_ha)
00063
00064 pot(0:nrg,0:ntg,0:npg) = pot_integrals(0:nrg,0:ntg,0:npg) &
00065 & + pot_insurf_hr_pl_ha(0:nrg,0:ntg,0:npg) &
00066 & + pot_insurf_hr_mi_ha(0:nrg,0:ntg,0:npg)
00067
00068 deallocate(sou_outsurf)
00069 deallocate(dsou_outsurf)
00070
00071 deallocate(pot_vol)
00072 deallocate(pot_insurf_hr_pl_ha)
00073 deallocate(pot_insurf_hr_mi_ha)
00074 deallocate(pot_outsurf)
00075 deallocate(pot_integrals)
00076
00077 deallocate(pot_vol_hret_pl_hadv)
00078 deallocate(pot_vol_hret_mi_hadv)
00079
00080 end subroutine helmholtz_solver_asymptotic_patch_homosol_outgoing