Skip to content

Commit

Permalink
Merge pull request #407 from danieljprice/set_star
Browse files Browse the repository at this point in the history
(set_star) shifted all the work in setup_star into set_star routine
  • Loading branch information
danieljprice committed Apr 28, 2023
2 parents 29790d8 + 8e15b8b commit b3f892b
Show file tree
Hide file tree
Showing 9 changed files with 988 additions and 744 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ SRCSETUP= prompting.f90 set_dust_options.f90 \
density_profiles.f90 set_slab.f90 set_disc.F90 \
set_cubic_core.f90 set_fixedentropycore.f90 set_softened_core.f90 \
set_star_kepler.f90 set_star_mesa.f90 \
set_star.f90 relax_star.f90 set_hierarchical.f90 \
set_star_utils.f90 relax_star.f90 set_star.f90 set_hierarchical.f90 \
set_vfield.f90 set_Bfield.f90 \
${SETUPFILE}

Expand Down
2 changes: 1 addition & 1 deletion src/setup/relax_star.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ subroutine relax_star(nt,rho,pr,r,npart,xyzh,use_var_comp,Xfrac,Yfrac,mu,ierr)
use physcon, only:pi
use options, only:iexternalforce
use io_summary, only:summary_initialise
use setstar, only:set_star_thermalenergy,set_star_composition
use setstar_utils, only:set_star_thermalenergy,set_star_composition
integer, intent(in) :: nt
integer, intent(inout) :: npart
real, intent(in) :: rho(nt),pr(nt),r(nt)
Expand Down
2 changes: 1 addition & 1 deletion src/setup/set_cubic_core.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module setcubiccore
!
! :Dependencies: io, kernel, physcon, table_utils
!
use physcon, only:solarm,solarr
use physcon, only:solarm,solarr
use table_utils, only:interpolator,diff

implicit none
Expand Down
18 changes: 9 additions & 9 deletions src/setup/set_softened_core.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ module setsoftenedcore
! table_utils
!
implicit none
real :: rcore,mcore

! rcore: Radius / Rsun below which we replace the original profile with a
! softened profile.
! mcore: Mass / Msun of core particle
Expand All @@ -32,14 +30,16 @@ module setsoftenedcore
! Main subroutine that sets a softened core profile
!+
!-----------------------------------------------------------------------
subroutine set_softened_core(isoftcore,isofteningopt,r,den,pres,m,X,Y,ierr)
use eos, only:ieos,X_in,Z_in,init_eos,get_mean_molecular_weight
use io, only:fatal
use table_utils, only:interpolator,yinterp,flip_array
use setcubiccore,only:set_cubic_core,find_mcore_given_rcore,find_rcore_given_mcore,check_rcore_and_mcore
use setfixedentropycore,only:set_fixedS_softened_core
use physcon, only:solarr,solarm
subroutine set_softened_core(isoftcore,isofteningopt,rcore,mcore,r,den,pres,m,X,Y,ierr)
use eos, only:ieos,X_in,Z_in,init_eos,get_mean_molecular_weight
use io, only:fatal
use table_utils, only:interpolator,yinterp,flip_array
use setcubiccore, only:set_cubic_core,find_mcore_given_rcore,&
find_rcore_given_mcore,check_rcore_and_mcore
use setfixedentropycore, only:set_fixedS_softened_core
use physcon, only:solarr,solarm
integer, intent(in) :: isoftcore,isofteningopt
real, intent(inout) :: rcore,mcore
real, intent(inout) :: r(:),den(:),m(:),pres(:),X(:),Y(:)
integer :: core_index,ierr
real :: Xcore,Zcore,rc
Expand Down

0 comments on commit b3f892b

Please sign in to comment.