From a7f75c427db7f98e85d2a4bca74eab46e2aec141 Mon Sep 17 00:00:00 2001 From: Hiroaki Matsui Date: Mon, 25 Nov 2024 16:26:54 -0800 Subject: [PATCH] Remove debug write and fix the location of flow boundary condition loading routine --- .../MHD_src/sph_MHD/init_sph_radius_variations.f90 | 5 ++++- .../MHD_src/sph_MHD/set_bc_sph_mhd.f90 | 13 ++++++------- .../MHD_src/sph_MHD/set_control_sph_mhd.f90 | 4 +++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Fortran_libraries/MHD_src/sph_MHD/init_sph_radius_variations.f90 b/src/Fortran_libraries/MHD_src/sph_MHD/init_sph_radius_variations.f90 index 34981a0b..f8077a78 100644 --- a/src/Fortran_libraries/MHD_src/sph_MHD/init_sph_radius_variations.f90 +++ b/src/Fortran_libraries/MHD_src/sph_MHD/init_sph_radius_variations.f90 @@ -74,7 +74,10 @@ subroutine init_radius_variations_sph_mhd(sph, r_2nd, MHD_prop, & call alloc_phys_data((sph%sph_rj%nidx_rj(1)+1), radial_variation) ! call set_r_variation_data_address(MHD_prop, radial_variation) - call check_r_variation_data_list(MHD_prop, radial_variation) + + if(iflag_debug .gt. 0) then + call check_r_variation_data_list(MHD_prop, radial_variation) + end if ! if(my_rank .eq. 0) then radial_variation%d_fld(1,1) = 0.0d0 diff --git a/src/Fortran_libraries/MHD_src/sph_MHD/set_bc_sph_mhd.f90 b/src/Fortran_libraries/MHD_src/sph_MHD/set_bc_sph_mhd.f90 index 898b3aa2..3522bb68 100644 --- a/src/Fortran_libraries/MHD_src/sph_MHD/set_bc_sph_mhd.f90 +++ b/src/Fortran_libraries/MHD_src/sph_MHD/set_bc_sph_mhd.f90 @@ -84,6 +84,12 @@ subroutine s_set_bc_sph_mhd(bc_IO, sph_params, sph_rj, & ! ! if(MHD_prop%fl_prop%iflag_scheme .gt. id_no_evolution) then + if(iflag_debug .gt. 0) write(*,*) 'set_sph_bc_velo_sph' + call set_sph_bc_velo_sph(bc_IO, sph_rj, radial_rj_grp, & + & sph_params%radius_ICB, sph_params%radius_CMB, & + & MHD_BC%velo_BC%nod_BC, MHD_BC%velo_BC%surf_BC, & + & sph_MHD_bc%sph_bc_U, sph_MHD_bc%bcs_U) +! kst = sph_MHD_bc%sph_bc_U%kr_in ked = sph_MHD_bc%sph_bc_U%kr_out icomp = MHD_prop%fl_prop%ir_dnu_norm @@ -94,13 +100,6 @@ subroutine s_set_bc_sph_mhd(bc_IO, sph_params, sph_rj, & h_rho_in = zero h_rho_out = zero end if -! - if(iflag_debug .gt. 0) write(*,*) 'set_sph_bc_velo_sph' - call set_sph_bc_velo_sph(bc_IO, sph_rj, radial_rj_grp, & - & sph_params%radius_ICB, sph_params%radius_CMB, & - & MHD_BC%velo_BC%nod_BC, MHD_BC%velo_BC%surf_BC, & - & sph_MHD_bc%sph_bc_U, sph_MHD_bc%bcs_U) -! ! call cal_fdm_coefs_4_BCs & & (sph_rj%nidx_rj(1), sph_rj%radius_1d_rj_r, & diff --git a/src/Fortran_libraries/MHD_src/sph_MHD/set_control_sph_mhd.f90 b/src/Fortran_libraries/MHD_src/sph_MHD/set_control_sph_mhd.f90 index 62faed80..7cebc734 100644 --- a/src/Fortran_libraries/MHD_src/sph_MHD/set_control_sph_mhd.f90 +++ b/src/Fortran_libraries/MHD_src/sph_MHD/set_control_sph_mhd.f90 @@ -260,7 +260,6 @@ subroutine set_ctl_SPH_val_diffusions(model_ctl, MHD_prop) call set_valuable_density_ctl & & (my_rank, model_ctl%polytrope_c, MHD_prop%polytrope_param, & & MHD_prop%flag_ref_density_valiation) - call check_polytrope_parameters(MHD_prop%polytrope_param) ! ! Set valuable diffusivities call set_valuable_diffusion_ctl & @@ -278,6 +277,9 @@ subroutine set_ctl_SPH_val_diffusions(model_ctl, MHD_prop) & (my_rank, model_ctl%val_comp_diffuse_c, & & MHD_prop%val_comp_diffuse_param, & & MHD_prop%flag_comp_diffuse_variation) +! + if(iflag_debug .le. 0) return + call check_polytrope_parameters(MHD_prop%polytrope_param) ! call check_val_diffuse_parameters(MHD_prop%val_viscous_param) call check_val_diffuse_parameters(MHD_prop%val_mag_diffuse_param)