From 621a3b64ec10441b20efd32b58a2d141b2d5d6c5 Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Mon, 7 Oct 2024 20:31:02 -0500 Subject: [PATCH] Changes to lift the dependence of turb on star_data --- install | 6 +++--- turb/private/tdc.f90 | 1 - turb/private/tdc_support.f90 | 7 +++---- utils/makefile_header | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/install b/install index bc10bc777..8c2a264db 100755 --- a/install +++ b/install @@ -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 @@ -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 diff --git a/turb/private/tdc.f90 b/turb/private/tdc.f90 index 01d7e015f..f91ec10da 100644 --- a/turb/private/tdc.f90 +++ b/turb/private/tdc.f90 @@ -30,7 +30,6 @@ module tdc use num_lib use utils_lib use auto_diff -use star_data_def use tdc_support implicit none diff --git a/turb/private/tdc_support.f90 b/turb/private/tdc_support.f90 index 25795ebc1..efce8837f 100644 --- a/turb/private/tdc_support.f90 +++ b/turb/private/tdc_support.f90 @@ -30,7 +30,6 @@ module tdc_support use num_lib use utils_lib use auto_diff -use star_data_def implicit none @@ -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 @@ -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: diff --git a/utils/makefile_header b/utils/makefile_header index e94f001a9..4559ea2d7 100644 --- a/utils/makefile_header +++ b/utils/makefile_header @@ -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) @@ -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)