Skip to content

Commit

Permalink
(#465) run relaxation of polytrope in GR at low resolution in the tes…
Browse files Browse the repository at this point in the history
…t suite, to catch errors like #465
  • Loading branch information
danieljprice committed May 14, 2024
1 parent 9f36374 commit 3621afb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions scripts/buildbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ check_phantomsetup ()
#
myinput="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
prefix="myrun";
flags="--np=1000"
echo -e "$myinput" > myinput.txt;
sed '/-e/d' myinput.txt > mycleanin.txt
./phantomsetup $prefix < mycleanin.txt > /dev/null; err=$?;
./phantomsetup $prefix $flags < mycleanin.txt > /dev/null; err=$?;
if [ $err -eq 0 ]; then
print_result "runs" $pass;
else
Expand All @@ -197,8 +198,8 @@ check_phantomsetup ()
# run phantomsetup up to 3 times to successfully create/rewrite the .setup file
#
infile="${prefix}.in"
./phantomsetup $prefix < myinput.txt > /dev/null;
./phantomsetup $prefix < myinput.txt > /dev/null;
./phantomsetup $prefix $flags < myinput.txt > /dev/null;
./phantomsetup $prefix $flags < myinput.txt > /dev/null;
if [ -e "$prefix.setup" ]; then
print_result "creates .setup file" $pass;
#test_setupfile_options "$prefix" "$prefix.setup" $infile;
Expand Down
8 changes: 5 additions & 3 deletions src/setup/setup_grtde.f90
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
use vectorutils, only:rotatevec
use gravwaveutils, only:theta_gw,calc_gravitwaves
use setup_params, only:rhozero,npart_total
use systemutils, only:get_command_option
integer, intent(in) :: id
integer, intent(inout) :: npart
integer, intent(out) :: npartoftype(:)
Expand All @@ -70,7 +71,7 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
character(len=20), intent(in) :: fileprefix
real, intent(out) :: vxyzu(:,:)
character(len=120) :: filename
integer :: ierr
integer :: ierr,np_default
logical :: iexist,write_profile,use_var_comp
real :: rtidal,rp,semia,period,hacc1,hacc2
real :: vxyzstar(3),xyzstar(3)
Expand Down Expand Up @@ -100,7 +101,8 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
call set_units(mass=mhole*solarm,c=1.d0,G=1.d0) !--Set central mass to M=1 in code units
star%mstar = 1.*solarm/umass
star%rstar = 1.*solarr/udist
star%np = 1e6
np_default = 1e6
star%np = int(get_command_option('np',default=np_default)) ! can set default value with --np=1e5 flag (mainly for testsuite)
star%iprofile = 2
beta = 5.
ecc = 0.8
Expand All @@ -109,7 +111,7 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
theta = 0.
write_profile = .false.
use_var_comp = .false.
relax = .false.
relax = .true.
!
!-- Read runtime parameters from setup file
!
Expand Down

0 comments on commit 3621afb

Please sign in to comment.