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

PhantomNR #480

Merged
merged 37 commits into from
Oct 31, 2023
Merged

PhantomNR #480

merged 37 commits into from
Oct 31, 2023

Conversation

spencermagnall
Copy link
Contributor

Type of PR:
New physics

Description:
Adds the code detailed in Magnall et al. 2023

Testing:
See Magnall et al. 2023

Did you run the bots? no

Did you update relevant documentation in the docs directory? yes

spencermagnall and others added 30 commits June 20, 2022 15:12
@@ -364,6 +370,26 @@ subroutine write_fulldump_fortran(t,dumpfile,ntotal,iorder,sphNG)
if (gr) then
call write_array(1,pxyzu,pxyzu_label,maxvxyzu,npart,k,ipass,idump,nums,ierrs(8))
call write_array(1,dens,'dens prim',npart,k,ipass,idump,nums,ierrs(8))
#ifdef GR
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the #ifdef GR here and just use an if (gr) then

see #55

@@ -227,6 +230,9 @@ subroutine write_fulldump_fortran(t,dumpfile,ntotal,iorder,sphNG)
#ifdef PRDRAG
use lumin_nsdisc, only:beta
#endif
#ifdef GR
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the ifdef GR here, metric_tools is always compiled even with the non-relativistic code

@@ -218,6 +218,9 @@ subroutine write_fulldump_fortran(t,dumpfile,ntotal,iorder,sphNG)
rad,rad_label,radprop,radprop_label,do_radiation,maxirad,maxradprop,itemp,igasP,igamma,&
iorig,iX,iZ,imu,nucleation,nucleation_label,n_nucleation,tau,itau_alloc,tau_lucy,itauL_alloc,&
luminosity,eta_nimhd,eta_nimhd_label
#ifdef GR
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the ifdef here, it is not necessary, see #55

@@ -385,7 +411,7 @@ subroutine write_fulldump_fortran(t,dumpfile,ntotal,iorder,sphNG)
endif

! smoothing length written as real*4 to save disk space
call write_array(1,xyzh,xyzh_label,1,npart,k,ipass,idump,nums,ierrs(14),use_kind=4,index=4)
call write_array(1,xyzh,xyzh_label,1,npart,k,ipass,idump,nums,ierrs(14),use_kind=8,index=4)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please undo this if possible, or put an if (imet=imet_et) around it and revert to real*4 otherwise

@@ -791,7 +794,7 @@ subroutine step_extern_gr(npart,ntypes,dtsph,dtextforce,xyzh,vxyzu,pxyzu,dens,me
!
if (dtextforce < dtsph) then
dt = dtextforce
last_step = .false.
last_step = .true. ! Just to check if things are working
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please undo this, it's dangerous

return
endif


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete commented out stuff

use mpidomain, only:i_belong
use stretchmap, only:set_density_profile
use utils_gr, only:perturb_metric, get_u0, get_sqrtg
!use cons2primsolver, only:primative2conservative
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comment

call write_inopt(perturb_direction, 'FLRWSolver::FLRW_perturb_direction','Pertubation direction',iunit)
call write_inopt(radiation_dominated, 'radiation_dominated','Radiation dominated universe (yes/no)',iunit)
call write_inopt(perturb_wavelength,'FLRWSolver::single_perturb_wavelength','Perturbation wavelength',iunit)
if (use_dustfrac) then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete unused options to do with dust and MHD

call get_grforce_all(npart,xyzh,metrics,metricderivs,vxyzu,dens,fext,dtextforce)
!print*, "Before get_tmunu_all"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove debugging statements

SETUPFILE= setup_flrw.f90
PERIODIC=yes
endif
ifeq ($(SETUP), flrwpspec)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a comment after the #ifeq giving a description of the setup (this is used in the docs)

@danieljprice danieljprice merged commit 0b2f16d into danieljprice:master Oct 31, 2023
177 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants