Skip to content

Commit

Permalink
remove changes that had to do with fixed luminosity core, which was a…
Browse files Browse the repository at this point in the history
… fruitless endeavour
  • Loading branch information
themikelau committed Jan 30, 2024
1 parent 41c8c06 commit cc68da2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 362 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ SRCSETUP= prompting.f90 utils_omp.F90 setup_params.f90 \
set_dust_options.f90 set_units.f90 \
density_profiles.f90 readwrite_kepler.f90 readwrite_mesa.f90 \
set_slab.f90 set_disc.F90 \
set_cubic_core.f90 set_fixedentropycore.f90 set_fixedlumcore.f90 set_softened_core.f90 \
set_cubic_core.f90 set_fixedentropycore.f90 set_softened_core.f90 \
set_star_utils.f90 relax_star.f90 set_star.f90 set_hierarchical.f90 \
set_vfield.f90 set_Bfield.f90 \
${SETUPFILE}
Expand Down
325 changes: 0 additions & 325 deletions src/setup/set_fixedlumcore.f90

This file was deleted.

14 changes: 2 additions & 12 deletions src/setup/set_softened_core.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,21 @@ module setsoftenedcore
! Main subroutine that sets a softened core profile
!+
!-----------------------------------------------------------------------
subroutine set_softened_core(eos_type,isoftcore,isofteningopt,regrid_core,rcore,mcore,Lstar,r,den,pres,m,X,Y,ierr)
subroutine set_softened_core(eos_type,isoftcore,isofteningopt,regrid_core,rcore,mcore,r,den,pres,m,X,Y,ierr)
use eos, only:X_in,Z_in,init_eos,gmw,get_mean_molecular_weight,iopacity_type
use eos_mesa, only:init_eos_mesa
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 setfixedlumcore, only:set_fixedlum_softened_core
use physcon, only:solarr,solarm
use units, only:unit_luminosity
integer, intent(in) :: eos_type,isoftcore,isofteningopt
real, intent(in) :: Lstar
logical, intent(in) :: regrid_core
real, intent(inout) :: rcore,mcore
real, intent(inout), allocatable :: r(:),den(:),m(:),pres(:),X(:),Y(:)
integer :: core_index,ierr,npts,Ncore
real :: Xcore,Zcore,rc,Lstar_cgs
real :: Xcore,Zcore,rc
logical :: isort_decreasing,iexclude_core_mass
real, allocatable :: r1(:),den1(:),pres1(:),m1(:),X1(:),Y1(:)

Expand Down Expand Up @@ -116,13 +113,6 @@ subroutine set_softened_core(eos_type,isoftcore,isofteningopt,regrid_core,rcore,
case(2)
call set_fixedS_softened_core(eos_type,mcore,rcore,den,r,pres,m,Xcore,1.-Xcore-Zcore,ierr)
if (ierr /= 0) call fatal('setup','could not set fixed entropy softened core')
case(3)
if (iopacity_type < 1) then
call fatal('set_softened_core','Cannot use zero opacity (iopacity_type<1) with a fixed-luminosity core')
endif
Lstar_cgs = Lstar * unit_luminosity
call set_fixedlum_softened_core(eos_type,rcore,Lstar_cgs,mcore,den,r,pres,m,Xcore,1.-Xcore-Zcore,ierr)
if (ierr /= 0) call fatal('setup','could not set fixed entropy softened core')
end select

! Reverse arrays so that data is sorted from stellar surface to stellar centre.
Expand Down
Loading

0 comments on commit cc68da2

Please sign in to comment.