Skip to content

Commit

Permalink
Changes to lift the dependence of turb on star_data (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdtownsend authored Oct 8, 2024
1 parent 05a0e06 commit 427c21b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,6 @@ do_one_parallel rates
do_one_parallel neu
do_one_parallel net

do_one star_data
do_one turb

if [ ! -r data/ionization_data ]
then
do_input_data ionization
Expand All @@ -365,8 +362,11 @@ then
do_input_data atm
fi
do_one atm
do_one turb

do_one sample

do_one star_data
do_one_parallel gyre
do_one adipls
do_one_parallel star
Expand Down
1 change: 0 additions & 1 deletion turb/private/tdc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module tdc
use num_lib
use utils_lib
use auto_diff
use star_data_def
use tdc_support

implicit none
Expand Down
7 changes: 3 additions & 4 deletions turb/private/tdc_support.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module tdc_support
use num_lib
use utils_lib
use auto_diff
use star_data_def

implicit none

Expand Down Expand Up @@ -423,9 +422,9 @@ end function safe_tanh
type(auto_diff_real_tdc) function convert(K_in) result(K)
type(auto_diff_real_star_order1), intent(in) :: K_in
K%val = K_in%val
K%d1Array(1:auto_diff_star_num_vars) = K_in%d1Array(1:auto_diff_star_num_vars)
K%d1Array(1:SIZE(K_in%d1Array)) = K_in%d1Array
K%d1val1 = 0d0
K%d1val1_d1Array(1:auto_diff_star_num_vars) = 0d0
K%d1val1_d1Array(1:SIZE(K_in%d1Array)) = 0d0
end function convert

!> The TDC newton solver needs higher-order partial derivatives than
Expand All @@ -442,7 +441,7 @@ end function convert
type(auto_diff_real_star_order1) function unconvert(K_in) result(K)
type(auto_diff_real_tdc), intent(in) :: K_in
K%val = K_in%val
K%d1Array(1:auto_diff_star_num_vars) = K_in%d1Array(1:auto_diff_star_num_vars)
K%d1Array = K_in%d1Array(1:SIZE(K%d1Array))
end function unconvert

!> Q is the residual in the TDC equation, namely:
Expand Down
4 changes: 2 additions & 2 deletions utils/makefile_header
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ LOAD_MESA_NUMERICS_INT = $(addprefix -l,$(LIBS_MESA_NUMERICS))
LOAD_MESA_NUMERICS_EXT = $(LOAD_MATRIX_EXT) $(LOAD_HDF5)
LOAD_MESA_NUMERICS = $(LOAD_MESA_NUMERICS_INT) $(LOAD_MESA_NUMERICS_EXT)

LIBS_MESA_MICRO = star_data net eos kap rates neu chem $(LIBS_MESA_NUMERICS)
LIBS_MESA_MICRO = net eos kap rates neu chem $(LIBS_MESA_NUMERICS)
LOAD_MESA_MICRO_INT = $(addprefix -l,$(LIBS_MESA_MICRO))
LOAD_MESA_MICRO_EXT = $(LOAD_MESA_NUMERICS_EXT)
LOAD_MESA_MICRO = $(LOAD_MESA_MICRO_INT) $(LOAD_MESA_MICRO_EXT)
Expand All @@ -272,7 +272,7 @@ LOAD_MESA_MACRO_INT = $(addprefix -l,$(LIBS_MESA_MACRO))
LOAD_MESA_MACRO_EXT = $(LOAD_MESA_MICRO_EXT)
LOAD_MESA_MACRO = $(LOAD_MESA_MACRO_INT) $(LOAD_MESA_MACRO_EXT)

LIBS_MESA_STAR_SUPPORT = $(LIBS_GYRE) $(LIBS_MESA_MACRO)
LIBS_MESA_STAR_SUPPORT = star_data $(LIBS_GYRE) $(LIBS_MESA_MACRO)
LOAD_MESA_STAR_SUPPORT_INT = $(addprefix -l,$(LIBS_MESA_STAR_SUPPORT))
LOAD_MESA_STAR_SUPPORT_EXT = $(LOAD_MESA_MACRO_EXT) $(LD_FLAGS)
LOAD_MESA_STAR_SUPPORT = $(LOAD_MESA_STAR_SUPPORT_INT) $(LOAD_MESA_STAR_SUPPORT_EXT)
Expand Down

0 comments on commit 427c21b

Please sign in to comment.