88! !
99! !@verbatim
1010! ! subroutine const_radial_mat_sph_mhd(dt, MHD_prop, sph_MHD_bc, &
11- ! ! & sph, r_2nd, leg, sph_MHD_mat)
11+ ! ! & sph, r_2nd, leg, refs, sph_MHD_mat)
1212! ! subroutine const_radial_mat_sph_snap(MHD_prop, sph_MHD_bc, &
1313! ! & sph_rj, r_2nd, leg, sph_MHD_mat)
1414! ! type(MHD_evolution_param), intent(in) :: MHD_prop
1515! ! type(sph_MHD_boundary_data), intent(in) :: sph_MHD_bc
1616! ! type(sph_grids), intent(in) :: sph
1717! ! type(fdm_matrices), intent(in) :: r_2nd
1818! ! type(legendre_4_sph_trans), intent(in) :: leg
19+ ! ! type(radial_reference_field), intent(in) :: refs
1920! ! type(MHD_radial_matrices), intent(inout) :: sph_MHD_mat
2021! !@endverbatim
2122!
@@ -33,7 +34,10 @@ module const_radial_mat_4_sph
3334 use t_spheric_rj_data
3435 use t_fdm_coefs
3536 use t_schmidt_poly_on_rtm
37+ use t_diffusion_term_labels
3638 use t_physical_property
39+ use t_phys_data
40+ use t_radial_reference_field
3741 use t_boundary_data_sph_MHD
3842 use t_boundary_params_sph_MHD
3943 use t_radial_matrices_sph_MHD
@@ -66,13 +70,14 @@ module const_radial_mat_4_sph
6670! -----------------------------------------------------------------------
6771!
6872 subroutine const_radial_mat_sph_mhd (dt , MHD_prop , sph_MHD_bc , &
69- & sph , r_2nd , leg , sph_MHD_mat )
73+ & sph , r_2nd , leg , refs , sph_MHD_mat )
7074!
7175 type (MHD_evolution_param), intent (in ) :: MHD_prop
7276 type (sph_MHD_boundary_data), intent (in ) :: sph_MHD_bc
7377 type (sph_grids), intent (in ) :: sph
7478 type (fdm_matrices), intent (in ) :: r_2nd
7579 type (legendre_4_sph_trans), intent (in ) :: leg
80+ type (radial_reference_field), intent (in ) :: refs
7681!
7782 real (kind = kreal), intent (in ) :: dt
7883!
@@ -83,7 +88,9 @@ subroutine const_radial_mat_sph_mhd(dt, MHD_prop, sph_MHD_bc, &
8388 id_file = 50 + my_rank
8489 call const_radial_matrices_sph &
8590 & (id_file, dt, sph% sph_params, sph% sph_rj, r_2nd, &
86- & MHD_prop, sph_MHD_bc, leg% g_sph_rj, sph_MHD_mat)
91+ & MHD_prop, sph_MHD_bc, leg% g_sph_rj, &
92+ & refs% iref_diffusivity, refs% iref_grad_diffusivity, &
93+ & refs% ref_field, sph_MHD_mat)
8794!
8895 call const_radial_mat_sph_w_center &
8996 & (dt, sph% sph_rj, MHD_prop, sph_MHD_bc, sph_MHD_mat)
@@ -136,8 +143,10 @@ end subroutine const_radial_mat_sph_snap
136143! -----------------------------------------------------------------------
137144!
138145 subroutine const_radial_matrices_sph &
139- & (id_file, dt, sph_params, sph_rj, r_2nd, MHD_prop, &
140- & sph_MHD_bc, g_sph_rj, sph_MHD_mat)
146+ & (id_file, dt, sph_params, sph_rj, &
147+ & r_2nd, MHD_prop, sph_MHD_bc, g_sph_rj, &
148+ & iref_diffusivity, iref_grad_diffusivity, ref_field, &
149+ & sph_MHD_mat)
141150!
142151 use const_r_mat_4_scalar_sph
143152 use const_r_mat_4_vector_sph
@@ -149,6 +158,10 @@ subroutine const_radial_matrices_sph &
149158 type (fdm_matrices), intent (in ) :: r_2nd
150159 type (MHD_evolution_param), intent (in ) :: MHD_prop
151160 type (sph_MHD_boundary_data), intent (in ) :: sph_MHD_bc
161+ !
162+ type (diffusivity_adress), intent (in ) :: iref_diffusivity
163+ type (diffusivity_adress), intent (in ) :: iref_grad_diffusivity
164+ type (phys_data), intent (in ) :: ref_field
152165!
153166 real (kind = kreal), intent (in ) :: dt
154167 real (kind = kreal), intent (in ) :: g_sph_rj(sph_rj% nidx_rj(2 ),13 )
@@ -223,6 +236,8 @@ subroutine const_radial_matrices_sph &
223236 & sph_params, sph_rj, r_2nd, MHD_prop% ht_prop, &
224237 & sph_MHD_bc% sph_bc_T, sph_MHD_bc% bcs_T, &
225238 & sph_MHD_bc% fdm2_center, g_sph_rj, &
239+ & ref_field% d_fld(1 ,iref_diffusivity% i_T_diffusivity), &
240+ & ref_field% d_fld(1 ,iref_grad_diffusivity% i_T_diffusivity), &
226241 & sph_MHD_mat% band_temp_evo)
227242 if (i_debug .eq. iflag_full_msg) then
228243 call check_radial_band_mat(id_file, sph_rj, &
@@ -236,6 +251,8 @@ subroutine const_radial_matrices_sph &
236251 & sph_params, sph_rj, r_2nd, MHD_prop% cp_prop, &
237252 & sph_MHD_bc% sph_bc_C, sph_MHD_bc% bcs_C, &
238253 & sph_MHD_bc% fdm2_center, g_sph_rj, &
254+ & ref_field% d_fld(1 ,iref_diffusivity% i_T_diffusivity), &
255+ & ref_field% d_fld(1 ,iref_grad_diffusivity% i_T_diffusivity), &
239256 & sph_MHD_mat% band_comp_evo)
240257 if (i_debug .eq. iflag_full_msg) then
241258 call check_radial_band_mat(id_file, sph_rj, &
0 commit comments