00001 subroutine source_MoC_CF_qeos(souvec)
00002 use grid_parameter, only : nrg, ntg, npg, nrf, ntf, npf
00003
00004 use interface_sourceterm_MoC_CF_drot_SFC_qeos
00005 use interface_sourceterm_MoC_CF_with_divshift
00006 use interface_interpo_fl2gr_midpoint
00007 use interface_correct_matter_source_midpoint
00008 use make_array_3d
00009 use make_array_4d
00010 implicit none
00011 real(8), pointer :: souvec(:,:,:,:), sou(:,:,:), souf(:,:,:)
00012 real(8), pointer :: souvec1(:,:,:,:), souvec2(:,:,:,:), souvecf(:,:,:,:)
00013 integer :: ipg, itg, irg, ia
00014
00015 call alloc_array3d(sou,0,nrg,0,ntg,0,npg)
00016 call alloc_array3d(souf,0,nrf,0,ntf,0,npf)
00017 call alloc_array4d(souvec1,0,nrg,0,ntg,0,npg,1,3)
00018 call alloc_array4d(souvec2,0,nrg,0,ntg,0,npg,1,3)
00019 call alloc_array4d(souvecf,0,nrf,0,ntf,0,npf,1,3)
00020
00021
00022 call sourceterm_MoC_CF_drot_SFC_qeos(souvecf)
00023 do ia = 1, 3
00024
00025 souf(0:nrf,0:ntf,0:npf) = souvecf(0:nrf,0:ntf,0:npf,ia)
00026 call interpo_fl2gr_midpoint(souf,sou)
00027 call correct_matter_source_midpoint(sou)
00028 souvec1(0:nrg,0:ntg,0:npg,ia) = sou(0:nrg,0:ntg,0:npg)
00029 end do
00030 call sourceterm_MoC_CF_with_divshift(souvec2)
00031
00032 souvec(0:nrg,0:ntg,0:npg,1:3) = souvec1(0:nrg,0:ntg,0:npg,1:3) &
00033 & + souvec2(0:nrg,0:ntg,0:npg,1:3)
00034
00035 deallocate(sou)
00036 deallocate(souf)
00037 deallocate(souvec1)
00038 deallocate(souvec2)
00039 deallocate(souvecf)
00040
00041 end subroutine source_MoC_CF_qeos