00001 subroutine calc_physq_center_peos_grid
00002 use grid_parameter, only : nrf, ntf, npf, ntfxy
00003 use def_matter, only : emd
00004 use def_quantities, only : rho_c, pre_c, epsi_c, q_c, &
00005 & rho_max, pre_max, epsi_max, q_max
00006 implicit none
00007 real(8) :: xsol, hh, emdmax
00008 integer :: irf,itf,ipf, irfmax, itfmax, ipfmax
00009
00010 q_c = emd(0,0,0)
00011 call peos_q2hprho(q_c, hh, pre_c, rho_c, epsi_c)
00012
00013
00014 write(6,'(a6,1p,e23.15,a13)') "q_c =", q_c," at (0,0,0)"
00015
00016 itf=ntfxy; ipf=0
00017 q_max = 0.0d0; itfmax=ntfxy; ipfmax=0
00018 do irf=0, nrf
00019 if ( emd(irf,itf,ipf) > q_max ) then
00020 irfmax = irf
00021 q_max = emd(irf,itf,ipf)
00022 end if
00023 end do
00024
00025 if (irfmax .ne. 0) then
00026 call search_emdmax_xaxis(irfmax, emdmax, xsol)
00027 q_max = emdmax
00028 write(6,'(a6,1p,e23.15,a8)') "q_max=", q_max," at x=", xsol
00029 else
00030 write(6,'(a6,1p,e23.15,a13)') "q_max=", q_max," at (0,0,0)"
00031 end if
00032
00033
00034
00035 call peos_q2hprho(q_max, hh, pre_max, rho_max, epsi_max)
00036
00037 end subroutine calc_physq_center_peos_grid