Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read grad(E) as vector #83

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/labels.f90
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module labels
integer :: ipmass,ike,ispsound,itemp,ikappa
integer :: idivb,iJfirst,irhostar,ipmomx
integer :: iacplane,ipowerspec
integer :: icv,iradenergy
integer :: icv,iradenergy,iradFx
integer :: isurfdens,itoomre
integer :: ipdf,icolpixmap
integer :: irhorestframe,idustfrac,ideltav
Expand Down Expand Up @@ -87,6 +87,7 @@ subroutine reset_columnids
ivrel = 0 ! relative velocity
itemp = 0 ! temperature
ikappa = 0 ! opacity
iradFx = 0
iacplane = 0
ike = 0
idivB = 0
Expand Down
9 changes: 8 additions & 1 deletion src/read_data_sphNG.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2563,7 +2563,7 @@ subroutine set_labels_sphNG
use labels, only:label,unitslabel=>unitslabel_default,&
labelzintegration=>labelzintegration_default,labeltype,labelvec,iamvec, &
ix,ipmass,irho,ih,iutherm,ipr,ivx,iBfirst,idivB,iJfirst,icv,iradenergy,&
idustfrac,ideltav,idustfracsum,ideltavsum,igrainsize,igraindens, &
idustfrac,ideltav,idustfracsum,ideltavsum,igrainsize,igraindens,iradFx, &
ivrel,make_vector_label,get_label_grain_size,itemp,ikappa,ipmomx,irhorestframe
use params
use settings_data, only:ndim,ndimV,ntypes,ncolumns,UseTypeInRenderings,debugmode
Expand Down Expand Up @@ -2684,6 +2684,8 @@ subroutine set_labels_sphNG
case('kappa')
unitslabel(i) = ' [cm^2/g]'
units(i) = udist**2/umass
case('radFx')
iradFx = i
case('radP')
label(i) = 'radiation pressure'
unitslabel(i) = ' [g / (cm s^2)]'
Expand Down Expand Up @@ -2778,6 +2780,7 @@ subroutine set_labels_sphNG
call make_vector_label('B',iBfirst,ndimV,iamvec,labelvec,label,labelcoord(:,1))
call make_vector_label('J',iJfirst,ndimV,iamvec,labelvec,label,labelcoord(:,1))
call make_vector_label('p',ipmomx,ndimV,iamvec,labelvec,label,labelcoord(:,1))
call make_vector_label('grad E',iradFx,ndimV,iamvec,labelvec,label,labelcoord(:,1))
!
!--ensure labels are unique by appending numbers where necessary
!
Expand Down Expand Up @@ -2805,6 +2808,10 @@ subroutine set_labels_sphNG
units(ivx:ivx+ndimV-1) = unitvel
unitslabel(ivx:ivx+ndimV-1) = unitlabelv
endif
if (iradFx > 0) then
units(iradFx:iradFx+ndimV-1) = umass/(udist*utime)**2
unitslabel(iradFx:iradFx+ndimV-1) = ' [erg/cm^4]'
endif
if (ipmomx > 0) then
units(ipmomx:ipmomx+ndimV-1) = unitvel
unitslabel(ipmomx:ipmomx+ndimV-1) = unitlabelv
Expand Down
Loading